3 #ifndef WIN32_LEAN_AND_MEAN
4 #define WIN32_LEAN_AND_MEAN
8 #include <qwerty\qwerty_common.h>
10 #include <shareCookie\browserType.h>
12 #include "nlib_define.h"
17 #define NLIB_DECLSPEC __declspec(dllexport)
22 #define NLIB_DECLSPEC __declspec(dllimport)
25 #define NLIB_DECLSPEC extern
34 //////////////////////////////////////////////////////////////////////////////////////////////////////
40 ///nlib
\82Ì
\96ß
\82è
\92l
\82Ì
\8c^
42 typedef UINT_PTR NLIB_RESULT;
46 ///
\83v
\83\8d\83o
\83C
\83_
\83^
\83C
\83v
48 typedef UINT_PTR PROVIDERTYPE;
52 ///NicoLiveStream
\82Ì
\83R
\81[
\83\8b\83o
\83b
\83N
\8aÖ
\90\94\82Ì
\83C
\83x
\83\93\83g
\83^
\83C
\83v
\8c^
54 typedef UINT_PTR NICOLIVE_EVENT;
57 ///NicoLiveStream
\82Ì
\83R
\81[
\83\8b\83o
\83b
\83N
\8aÖ
\90\94\82Ì
\83p
\83\89\83\81\81[
\83^
\83^
\83C
\83v
59 typedef UINT_PTR NICOLIVE_PARAM;
63 ///NicoMyList
\82Ì
\83R
\81[
\83\8b\83o
\83b
\83N
\8aÖ
\90\94\82Ì
\83C
\83x
\83\93\83g
\83^
\83C
\83v
\8c^
65 typedef UINT_PTR NICOMYLIST_EVENT;
71 ///
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\83I
\83u
\83W
\83F
\83N
\83g
\83|
\83C
\83\93\83^
73 typedef struct nicolivestream_t *NicoLiveStream_P;
76 ///
\83j
\83R
\83j
\83R
\93®
\89æ
\94F
\8fØ
\83I
\83u
\83W
\83F
\83N
\83g
78 typedef struct nicovideoauth_t *NicoVideoAuth_P;
83 ///
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\83X
\83e
\81[
\83^
\83X
85 //typedef struct streamstatus_t *StreamStatus_P;
89 ///
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\8fî
\95ñ
\83I
\83u
\83W
\83F
\83N
\83g
91 //typedef struct streaminfo_t *StreamInfo_P;
97 ///
\83j
\83R
\83j
\83R
\93®
\89æ
\83}
\83C
\83\8a\83X
\83g
\83A
\83C
\83e
\83\80\83I
\83u
\83W
\83F
\83N
\83g
99 typedef struct nicomylistitem_t *NicoMyListItem_P;
102 ///
\83j
\83R
\83j
\83R
\93®
\89æ
\83}
\83C
\83\8a\83X
\83g
\83A
\83C
\83e
\83\80\83f
\81[
\83^
\83I
\83u
\83W
\83F
\83N
\83g
104 typedef struct nicoitemdata_t *NicoItemData_P;
107 ///
\83j
\83R
\83j
\83R
\93®
\89æ
\82Ì
\83}
\83C
\83\8a\83X
\83g
\83I
\83u
\83W
\83F
\83N
\83g
109 typedef struct nicomylist_t *NicoMyList_P;
112 ///
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\83C
\83x
\83\93\83g
\83n
\83\93\83h
\83\89
114 typedef NLIB_RESULT (*NicoRecvCallBack)(NICOLIVE_EVENT eventType,NicoLiveStream_P pNicoLiveStream,LPVOID option,NICOLIVE_PARAM param1,NICOLIVE_PARAM param2);
117 ///
\83j
\83R
\83j
\83R
\83}
\83C
\83\8a\83X
\83g
\83C
\83x
\83\93\83g
\83n
\83\93\83h
\83\89
119 typedef NLIB_RESULT (*NicoMyListCallBack)(LPVOID option,NicoMyListItem_P pVideo);
122 ///
\83j
\83R
\83j
\83R
\83}
\83C
\83\8a\83X
\83g
\88ê
\97\97\83C
\83x
\83\93\83g
\83n
\83\93\83h
\83\89
124 typedef NLIB_RESULT (*NicoMyListGroupCallBack)(LPVOID option,NicoMyList_P pMyList);
128 ///
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\83`
\83\83\83b
\83g
\83R
\83\81\83\93\83g
\8d\
\91¢
\91Ì
143 }NicoLiveChat,*NicoLiveChat_P;
149 ///
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\83X
\83\8c\83b
\83h
\83R
\83\81\83\93\83g
\8d\
\91¢
\91Ì
156 }NicoLiveThreadComment,*NicoLiveThreadComment_P;
160 ///
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\91\97\90M
\8c\8b\89Ê
\83R
\83\81\83\93\83g
\8d\
\91¢
\91Ì
166 }NicoLiveSendResultComment,*NicoLiveSendResultComment_P;
170 ///
\83j
\83R
\90¶
\83n
\81[
\83g
\83r
\81[
\83g
\8d\
\91¢
\91Ì
180 UINT_PTR commentCount;
187 }NicoLiveHeartBeat,*NicoLiveHeartBeat_P;
199 ///nlib
\8f\89\8aú
\89»
\8aÖ
\90\94
201 NLIB_DECLSPEC NLIB_RESULT InitializeNLIB(HINTERNET hInternet);
204 ///nlib
\8cã
\8en
\96\96\8aÖ
\90\94
206 NLIB_DECLSPEC VOID FinalizeNLIB();
210 ///
\83G
\83\89\81[
\83\81\83b
\83Z
\81[
\83W
\8eæ
\93¾
212 NLIB_DECLSPEC LPCTSTR NLIB_GetErrorMessage(NLIB_RESULT rsltCode);
220 //
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\8aÖ
\98A
\8aÖ
\90\94
221 ////////////////////////////////////////////////////////////////////////////////////////////////////
225 ///
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\83I
\83u
\83W
\83F
\83N
\83g
\93®
\93I
\90¶
\90¬
227 NLIB_DECLSPEC NicoLiveStream_P NicoLiveStream_new();
230 ///
\93®
\93I
\82É
\90¶
\90¬
\82µ
\82½
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\83I
\83u
\83W
\83F
\83N
\83g
\82ð
\94j
\8aü
232 NLIB_DECLSPEC VOID NicoLiveStream_delete(NicoLiveStream_P* self);
235 ///
\8ew
\92è
\82µ
\82½URL
\82Ì
\95ú
\91\97\82É
\90Ú
\91±
237 NLIB_DECLSPEC NLIB_RESULT NicoLiveStream_connect(NicoLiveStream_P self,NicoVideoAuth_P nicoVideoAuth,LPCTSTR url,NicoRecvCallBack callback,LPVOID option);
241 ///
\95ú
\91\97\82Æ
\82Ì
\90Ú
\91±
\82ð
\90Ø
\92f
\82·
\82é
243 NLIB_DECLSPEC VOID NicoLiveStream_disConnect(NicoLiveStream_P self);
246 ///
\90Ú
\91±
\8e\9e\82Ì
\8eó
\90M
\82·
\82é
\83R
\83\81\83\93\83g
\90\94\82ð
\90Ý
\92è
248 NLIB_DECLSPEC VOID NicoLiveStrream_setResFrom(NicoLiveStream_P self,INT_PTR res);
252 ///
\90Ú
\91±
\8e\9e\82Ì
\8eó
\90M
\82·
\82é
\83R
\83\81\83\93\83g
\90\94\82ð
\8eæ
\93¾
254 NLIB_DECLSPEC INT_PTR NicoLiveStream_getResFrom(NicoLiveStream_P self);
257 ///
\83n
\81[
\83g
\83r
\81[
\83g
\82Ì
\8aÔ
\8au
\82ð
\90Ý
\92è
\81i
\83~
\83\8a\95b)
259 NLIB_DECLSPEC VOID NicoLiveStream_setHeartBeatMsec(NicoLiveStream_P self,DWORD msec);
263 ///
\83n
\81[
\83g
\83r
\81[
\83g
\82Ì
\8aÔ
\8au
\82ð
\8eæ
\93¾(
\83~
\83\8a\95b)
265 NLIB_DECLSPEC DWORD NicoLiveStream_getHeartBeatMsec(NicoLiveStream_P self);
268 ///
\83n
\81[
\83g
\83r
\81[
\83g
\97L
\8cø
\81E
\96³
\8cø
\90Ý
\92è
270 NLIB_DECLSPEC VOID NicoLiveStream_setHeartBeatFlag(NicoLiveStream_P self,BOOL flag);
274 ///
\83n
\81[
\83g
\83r
\81[
\83g
\97L
\8cø
\83t
\83\89\83O
\8eæ
\93¾
276 NLIB_DECLSPEC BOOL NicoLiveStream_getHeartBeatFlag(NicoLiveStream_P self);
279 ///
\83L
\81[
\83v
\83A
\83\89\83C
\83u
\82Ì
\8aÔ
\8au
\82ð
\90Ý
\92è(
\83~
\83\8a\95b)
281 NLIB_DECLSPEC VOID NicoLiveStream_setKeapALiveMsec(NicoLiveStream_P self,DWORD msec);
284 ///
\83L
\81[
\83v
\83A
\83\89\83C
\83u
\82Ì
\8aÔ
\8au
\82ð
\8eæ
\93¾(
\83~
\83\8a\95b)
286 NLIB_DECLSPEC DWORD NicoLiveStream_getKeapALiveMsec(NicoLiveStream_P self);
290 ///
\83L
\81[
\83v
\83A
\83\89\83C
\83u
\97L
\8cø
\81E
\96³
\8cø
\90Ý
\92è
292 NLIB_DECLSPEC VOID NicoLiveStream_setKeapALiveFlag(NicoLiveStream_P self,BOOL flag);
296 ///
\83L
\81[
\83v
\83A
\83\89\83C
\83u
\83t
\83\89\83O
\8eæ
\93¾
298 NLIB_DECLSPEC BOOL NicoLiveStream_getKeapALiveFlag(NicoLiveStream_P self);
302 ///
\90¶
\95ú
\91\97\83X
\83e
\81[
\83^
\83X
\8eæ
\93¾
304 // NLIB_DECLSPEC StreamStatus_P NicoLiveStream_getStreamStatus(NicoLiveStream_P self);
307 ///
\83R
\83\81\83\93\83g
\91\97\90M
309 NLIB_DECLSPEC NLIB_RESULT NicoLiveStream_sendChat(NicoLiveStream_P self,LPCTSTR chatbuf,LPCTSTR *mail,LPCTSTR *extends);
312 ///
\83n
\81[
\83g
\83r
\81[
\83g
\91\97\90M
314 NLIB_DECLSPEC NLIB_RESULT NicoLiveStream_sendHeartBeat(NicoLiveStream_P self);
318 ///
\90Ú
\91±
\92\86\82Ì
\95ú
\91\97\8fî
\95ñ
\82ð
\96â
\82¢
\8d\87\82í
\82¹
\82é
320 // NLIB_DECLSPEC StreamInfo_P NicoLiveStream_queryStreamInfo(NicoLiveStream_P self);
324 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82ÌID
\82ð
\8eæ
\93¾
326 NLIB_DECLSPEC LPCTSTR NicoLiveStream_getId(NicoLiveStream_P self);
330 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82Ì
\83R
\83~
\83\85\83j
\83e
\83B
\94Ô
\8d\86\82ð
\8eæ
\93¾
332 NLIB_DECLSPEC LPCTSTR NicoLiveStream_getDefaultCommunity(NicoLiveStream_P self);
336 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82Ì
\83v
\83\8d\83o
\83C
\83_
\83^
\83C
\83v
\82ð
\8eæ
\93¾
338 NLIB_DECLSPEC PROVIDERTYPE NicoLiveStream_getProviderType(NicoLiveStream_P self);
342 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82Ì
\83I
\81[
\83i
\81[
\83t
\83\89\83O
\82ð
\8eæ
\93¾
344 NLIB_DECLSPEC BOOL NicoLiveStream_isOwner(NicoLiveStream_P self);
347 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82Ì
\8aJ
\8en
\8e\9e\8d\8f\82ð
\8eæ
\93¾
349 NLIB_DECLSPEC time_t NicoLiveStream_getStartTime(NicoLiveStream_P self);
352 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82Ì
\8fI
\97¹
\8e\9e\8d\8f\82ð
\8eæ
\93¾
354 NLIB_DECLSPEC time_t NicoLiveStream_getEndTime(NicoLiveStream_P self);
357 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82Ì
\8aJ
\8fê
\8e\9e\8d\8f\82ð
\8eæ
\93¾
359 NLIB_DECLSPEC time_t NicoLiveStream_getOpenTime(NicoLiveStream_P self);
362 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82Ì
\83x
\81[
\83X
\8e\9e\8d\8f\82ð
\8eæ
\93¾
364 NLIB_DECLSPEC time_t NicoLiveStream_getBaseTime(NicoLiveStream_P self);
368 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82Ì
\83^
\83C
\83g
\83\8b\8eæ
\93¾
370 NLIB_DECLSPEC LPCTSTR NicoLiveStream_getTitle(NicoLiveStream_P self);
374 ///
\83v
\83\8c\83~
\83A
\83\80\83t
\83\89\83O
\82Ì
\8eæ
\93¾
376 NLIB_DECLSPEC BOOL NicoLiveStream_isPremium(NicoLiveStream_P self);
379 //
\83j
\83R
\83j
\83R
\93®
\89æ
\94F
\8fØ
\8aÖ
\98A
\8aÖ
\90\94
380 /////////////////////////////////////////////////////////////////////////////////////////////////
383 ///
\83j
\83R
\83j
\83R
\93®
\89æ
\94F
\8fØ
\83I
\83u
\83W
\83F
\83N
\83g
\90¶
\90¬
385 NLIB_DECLSPEC NicoVideoAuth_P NicoVideoAuth_new();
388 ///
\83j
\83R
\83j
\83R
\93®
\89æ
\94F
\8fØ
\83I
\83u
\83W
\83F
\83N
\83g
\94j
\8aü
390 NLIB_DECLSPEC VOID NicoVideoAuth_delete(NicoVideoAuth_P *self);
394 ///
\83j
\83R
\83j
\83R
\93®
\89æ
\94F
\8fØ
\8fî
\95ñ
\8eæ
\93¾
396 NLIB_DECLSPEC NLIB_RESULT NicoVideoAuth_getNicoVideoAuth(NicoVideoAuth_P self,BROWSERTYPE browserType);
400 //
\83j
\83R
\83j
\83R
\93®
\89æ
\83}
\83C
\83\8a\83X
\83g
\8aÖ
\98A
\8aÖ
\90\94
401 ////////////////////////////////////////////////////////////////////////////////////////////////////
404 ///
\82Æ
\82è
\82 \82¦
\82¸
\83}
\83C
\83\8a\83X
\83g
\88ê
\97\97\8eæ
\93¾
406 NLIB_DECLSPEC NLIB_RESULT NicoMyList_getDefList(NicoVideoAuth_P pAuth,NicoMyListCallBack callback,LPVOID option);
409 ///
\83}
\83C
\83\8a\83X
\83g
\8eæ
\93¾
411 NLIB_DECLSPEC NLIB_RESULT NicoMyList_getMyList(NicoVideoAuth_P pAuth,LPCTSTR id,NicoMyListCallBack callback,LPVOID option);
414 ///
\83}
\83C
\83\8a\83X
\83g
\83O
\83\8b\81[
\83v
\8eæ
\93¾
416 NLIB_DECLSPEC NLIB_RESULT NicoMyList_getMyListGroup(NicoVideoAuth_P pAuth,NicoMyListGroupCallBack callback,LPVOID option);
420 ///
\83}
\83C
\83\8a\83X
\83g
\93o
\98^
\8cÄ
\82Ñ
\8fo
\82µ
422 NLIB_DECLSPEC NLIB_RESULT NicoMyList_addItem(LPCTSTR video_id);
435 #pragma comment(lib,"Wininet.lib")
436 #pragma comment(lib,"WinHttp.lib")
437 #pragma comment(lib,"Iepmapi.lib")
438 #pragma comment(lib,"ws2_32.lib")
439 #pragma comment(lib, "shell32.lib" )
440 #pragma comment(lib,"expat.lib")
441 #pragma comment(lib,"sqlite3.lib")
442 #pragma comment(lib,"sqliteManager.lib")
443 #pragma comment(lib,"shareCookie.lib")
444 #pragma comment(lib,"winmm.lib")
445 #pragma comment(lib,"JSONParser.lib")