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;
91 ///
\83j
\83R
\83j
\83R
\93®
\89æ
\83}
\83C
\83\8a\83X
\83g
\83A
\83C
\83e
\83\80\83I
\83u
\83W
\83F
\83N
\83g
93 typedef struct nicomylistitem_t *NicoMyListItem_P;
96 ///
\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
98 typedef struct nicoitemdata_t *NicoItemData_P;
101 ///
\83j
\83R
\83j
\83R
\93®
\89æ
\82Ì
\83}
\83C
\83\8a\83X
\83g
\83I
\83u
\83W
\83F
\83N
\83g
103 typedef struct nicomylist_t *NicoMyList_P;
106 ///
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\83C
\83x
\83\93\83g
\83n
\83\93\83h
\83\89
108 typedef NLIB_RESULT (*NicoRecvCallBack)(NICOLIVE_EVENT eventType,NicoLiveStream_P pNicoLiveStream,LPVOID option,NICOLIVE_PARAM param1,NICOLIVE_PARAM param2);
111 ///
\83j
\83R
\83j
\83R
\83}
\83C
\83\8a\83X
\83g
\83C
\83x
\83\93\83g
\83n
\83\93\83h
\83\89
113 typedef NLIB_RESULT (*NicoMyListCallBack)(LPVOID option,NicoMyListItem_P pVideo);
116 ///
\83j
\83R
\83j
\83R
\83}
\83C
\83\8a\83X
\83g
\88ê
\97\97\83C
\83x
\83\93\83g
\83n
\83\93\83h
\83\89
118 typedef NLIB_RESULT (*NicoMyListGroupCallBack)(LPVOID option,NicoMyList_P pMyList);
122 ///
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\83`
\83\83\83b
\83g
\83R
\83\81\83\93\83g
\8d\
\91¢
\91Ì
137 }NicoLiveChat,*NicoLiveChat_P;
143 ///
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\83X
\83\8c\83b
\83h
\83R
\83\81\83\93\83g
\8d\
\91¢
\91Ì
150 }NicoLiveThreadComment,*NicoLiveThreadComment_P;
154 ///
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\91\97\90M
\8c\8b\89Ê
\83R
\83\81\83\93\83g
\8d\
\91¢
\91Ì
160 }NicoLiveSendResultComment,*NicoLiveSendResultComment_P;
164 ///
\83j
\83R
\90¶
\83n
\81[
\83g
\83r
\81[
\83g
\8d\
\91¢
\91Ì
174 UINT_PTR commentCount;
181 }NicoLiveHeartBeat,*NicoLiveHeartBeat_P;
193 ///nlib
\8f\89\8aú
\89»
\8aÖ
\90\94
195 NLIB_DECLSPEC NLIB_RESULT InitializeNLIB(HINTERNET hInternet);
198 ///nlib
\8cã
\8en
\96\96\8aÖ
\90\94
200 NLIB_DECLSPEC VOID FinalizeNLIB();
204 ///
\83G
\83\89\81[
\83\81\83b
\83Z
\81[
\83W
\8eæ
\93¾
206 NLIB_DECLSPEC LPCTSTR NLIB_GetErrorMessage(NLIB_RESULT rsltCode);
209 //
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\8aÖ
\98A
\8aÖ
\90\94
210 /////////////////////////////////////////////////////////////////////////////////////////////////////
213 ///
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\83I
\83u
\83W
\83F
\83N
\83g
\93®
\93I
\90¶
\90¬
215 NLIB_DECLSPEC NicoLiveStream_P NicoLiveStream_new();
218 ///
\93®
\93I
\82É
\90¶
\90¬
\82µ
\82½
\83j
\83R
\83j
\83R
\90¶
\95ú
\91\97\83I
\83u
\83W
\83F
\83N
\83g
\82ð
\94j
\8aü
220 NLIB_DECLSPEC VOID NicoLiveStream_delete(NicoLiveStream_P* self);
223 ///
\8ew
\92è
\82µ
\82½URL
\82Ì
\95ú
\91\97\82É
\90Ú
\91±
225 NLIB_DECLSPEC NLIB_RESULT NicoLiveStream_connect(NicoLiveStream_P self,NicoVideoAuth_P nicoVideoAuth,LPCTSTR url,NicoRecvCallBack callback,LPVOID option);
229 ///
\95ú
\91\97\82Æ
\82Ì
\90Ú
\91±
\82ð
\90Ø
\92f
\82·
\82é
231 NLIB_DECLSPEC VOID NicoLiveStream_disConnect(NicoLiveStream_P self);
234 ///
\90Ú
\91±
\8e\9e\82Ì
\8eó
\90M
\82·
\82é
\83R
\83\81\83\93\83g
\90\94\82ð
\90Ý
\92è
236 NLIB_DECLSPEC VOID NicoLiveStrream_setResFrom(NicoLiveStream_P self,INT_PTR res);
240 ///
\90Ú
\91±
\8e\9e\82Ì
\8eó
\90M
\82·
\82é
\83R
\83\81\83\93\83g
\90\94\82ð
\8eæ
\93¾
242 NLIB_DECLSPEC INT_PTR NicoLiveStream_getResFrom(NicoLiveStream_P self);
245 ///
\83n
\81[
\83g
\83r
\81[
\83g
\82Ì
\8aÔ
\8au
\82ð
\90Ý
\92è
\81i
\83~
\83\8a\95b)
247 NLIB_DECLSPEC VOID NicoLiveStream_setHeartBeatMsec(NicoLiveStream_P self,DWORD msec);
251 ///
\83n
\81[
\83g
\83r
\81[
\83g
\82Ì
\8aÔ
\8au
\82ð
\8eæ
\93¾(
\83~
\83\8a\95b)
253 NLIB_DECLSPEC DWORD NicoLiveStream_getHeartBeatMsec(NicoLiveStream_P self);
256 ///
\83n
\81[
\83g
\83r
\81[
\83g
\97L
\8cø
\81E
\96³
\8cø
\90Ý
\92è
258 NLIB_DECLSPEC VOID NicoLiveStream_setHeartBeatFlag(NicoLiveStream_P self,BOOL flag);
262 ///
\83n
\81[
\83g
\83r
\81[
\83g
\97L
\8cø
\83t
\83\89\83O
\8eæ
\93¾
264 NLIB_DECLSPEC BOOL NicoLiveStream_getHeartBeatFlag(NicoLiveStream_P self);
267 ///
\83L
\81[
\83v
\83A
\83\89\83C
\83u
\82Ì
\8aÔ
\8au
\82ð
\90Ý
\92è(
\83~
\83\8a\95b)
269 NLIB_DECLSPEC VOID NicoLiveStream_setKeapALiveMsec(NicoLiveStream_P self,DWORD msec);
272 ///
\83L
\81[
\83v
\83A
\83\89\83C
\83u
\82Ì
\8aÔ
\8au
\82ð
\8eæ
\93¾(
\83~
\83\8a\95b)
274 NLIB_DECLSPEC DWORD NicoLiveStream_getKeapALiveMsec(NicoLiveStream_P self);
278 ///
\83L
\81[
\83v
\83A
\83\89\83C
\83u
\97L
\8cø
\81E
\96³
\8cø
\90Ý
\92è
280 NLIB_DECLSPEC VOID NicoLiveStream_setKeapALiveFlag(NicoLiveStream_P self,BOOL flag);
284 ///
\83L
\81[
\83v
\83A
\83\89\83C
\83u
\83t
\83\89\83O
\8eæ
\93¾
286 NLIB_DECLSPEC BOOL NicoLiveStream_getKeapALiveFlag(NicoLiveStream_P self);
290 ///
\90¶
\95ú
\91\97\83X
\83e
\81[
\83^
\83X
\8eæ
\93¾
292 NLIB_DECLSPEC StreamStatus_P NicoLiveStream_getStreamStatus(NicoLiveStream_P self);
295 ///
\83R
\83\81\83\93\83g
\91\97\90M
297 NLIB_DECLSPEC NLIB_RESULT NicoLiveStream_sendChat(NicoLiveStream_P self,LPCTSTR chatbuf,LPCTSTR *mail,LPCTSTR *extends);
300 ///
\83n
\81[
\83g
\83r
\81[
\83g
\91\97\90M
302 NLIB_DECLSPEC NLIB_RESULT NicoLiveStream_sendHeartBeat(NicoLiveStream_P self);
305 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82ÌID
\82ð
\8eæ
\93¾
307 NLIB_DECLSPEC LPCTSTR StreamStatus_getId(StreamStatus_P self);
311 ///
\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¾
313 NLIB_DECLSPEC LPCTSTR StreamStatus_getDefaultCommunity(StreamStatus_P self);
317 ///
\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¾
319 NLIB_DECLSPEC PROVIDERTYPE StreamStatus_getProviderType(StreamStatus_P self);
323 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82Ì
\83I
\81[
\83i
\81[
\83t
\83\89\83O
\82ð
\8eæ
\93¾
325 NLIB_DECLSPEC BOOL StreamStatus_isOwner(StreamStatus_P self);
328 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82Ì
\8aJ
\8en
\8e\9e\8d\8f\82ð
\8eæ
\93¾
330 NLIB_DECLSPEC time_t StreamStatus_getStartTime(StreamStatus_P self);
333 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82Ì
\8fI
\97¹
\8e\9e\8d\8f\82ð
\8eæ
\93¾
335 NLIB_DECLSPEC time_t StreamStatus_getEndTime(StreamStatus_P self);
338 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82Ì
\8aJ
\8fê
\8e\9e\8d\8f\82ð
\8eæ
\93¾
340 NLIB_DECLSPEC time_t StreamStatus_getOpenTime(StreamStatus_P self);
343 ///
\83X
\83g
\83\8a\81[
\83\80\83X
\83e
\81[
\83^
\83X
\82Ì
\83x
\81[
\83X
\8e\9e\8d\8f\82ð
\8eæ
\93¾
345 NLIB_DECLSPEC time_t StreamStatus_getBaseTime(StreamStatus_P self);
348 //
\83j
\83R
\83j
\83R
\93®
\89æ
\94F
\8fØ
\8aÖ
\98A
\8aÖ
\90\94
349 /////////////////////////////////////////////////////////////////////////////////////////////////
352 ///
\83j
\83R
\83j
\83R
\93®
\89æ
\94F
\8fØ
\83I
\83u
\83W
\83F
\83N
\83g
\90¶
\90¬
354 NLIB_DECLSPEC NicoVideoAuth_P NicoVideoAuth_new();
357 ///
\83j
\83R
\83j
\83R
\93®
\89æ
\94F
\8fØ
\83I
\83u
\83W
\83F
\83N
\83g
\94j
\8aü
359 NLIB_DECLSPEC VOID NicoVideoAuth_delete(NicoVideoAuth_P *self);
363 ///
\83j
\83R
\83j
\83R
\93®
\89æ
\94F
\8fØ
\8fî
\95ñ
\8eæ
\93¾
365 NLIB_DECLSPEC NLIB_RESULT NicoVideoAuth_getNicoVideoAuth(NicoVideoAuth_P self,BROWSERTYPE browserType);
369 //
\83j
\83R
\83j
\83R
\93®
\89æ
\83}
\83C
\83\8a\83X
\83g
\8aÖ
\98A
\8aÖ
\90\94
370 ////////////////////////////////////////////////////////////////////////////////////////////////////
373 ///
\82Æ
\82è
\82 \82¦
\82¸
\83}
\83C
\83\8a\83X
\83g
\88ê
\97\97\8eæ
\93¾
375 NLIB_DECLSPEC NLIB_RESULT NicoMyList_getDefList(NicoVideoAuth_P pAuth,NicoMyListCallBack callback,LPVOID option);
378 ///
\83}
\83C
\83\8a\83X
\83g
\8eæ
\93¾
380 NLIB_DECLSPEC NLIB_RESULT NicoMyList_getMyList(NicoVideoAuth_P pAuth,LPCTSTR id,NicoMyListCallBack callback,LPVOID option);
383 ///
\83}
\83C
\83\8a\83X
\83g
\83O
\83\8b\81[
\83v
\8eæ
\93¾
385 NLIB_DECLSPEC NLIB_RESULT NicoMyList_getMyListGroup(NicoVideoAuth_P pAuth,NicoMyListGroupCallBack callback,LPVOID option);
389 ///
\83}
\83C
\83\8a\83X
\83g
\93o
\98^
\8cÄ
\82Ñ
\8fo
\82µ
391 NLIB_DECLSPEC NLIB_RESULT NicoMyList_addItem(LPCTSTR video_id);
404 #pragma comment(lib,"Wininet.lib")
405 #pragma comment(lib,"WinHttp.lib")
406 #pragma comment(lib,"Iepmapi.lib")
407 #pragma comment(lib,"ws2_32.lib")
408 #pragma comment(lib, "shell32.lib" )
409 #pragma comment(lib,"expat.lib")
410 #pragma comment(lib,"sqlite3.lib")
411 #pragma comment(lib,"sqliteManager.lib")
412 #pragma comment(lib,"shareCookie.lib")
413 #pragma comment(lib,"winmm.lib")
414 #pragma comment(lib,"JSONParser.lib")