OSDN Git Service

見対応のエラーメッセージ対応
[nlite/nlite.git] / nlib / nlib.h
index edde352..20b8444 100644 (file)
@@ -6,9 +6,8 @@
 
 #include <Windows.h>
 #include <qwerty\qwerty_common.h>
-#include <winhttp.h>
 #include <shareCookie\browserType.h>
-
+#include <winhttp.h>
 #include "nlib_define.h"
 
 #ifdef NLIB_EXPORTS
@@ -82,7 +81,13 @@ typedef struct nicovideoauth_t *NicoVideoAuth_P;
 ///
 ///\83j\83R\83j\83R\90\95ú\91\97\83X\83e\81[\83^\83X
 ///
-typedef struct streamstatus_t *StreamStatus_P;
+//typedef struct streamstatus_t *StreamStatus_P;
+
+
+///
+///\83j\83R\83j\83R\90\95ú\91\97\8fî\95ñ\83I\83u\83W\83F\83N\83g
+///
+//typedef struct streaminfo_t *StreamInfo_P;
 
 
 
@@ -132,7 +137,7 @@ typedef struct{
        LPCTSTR user_id;
        LPCTSTR name;
        LPCTSTR chatBuf;
-       LPCTSTR* mail;
+       LPTSTR* mail;
        UINT_PTR mailCount;
 }NicoLiveChat,*NicoLiveChat_P;
 
@@ -146,7 +151,7 @@ typedef struct{
        LPCTSTR thread;
        LPCTSTR ticket;
        LPCTSTR last_res;
-       LPCTSTR server_time;
+       time_t server_time;
 }NicoLiveThreadComment,*NicoLiveThreadComment_P;
 
 
@@ -180,13 +185,57 @@ typedef struct{
 
 }NicoLiveHeartBeat,*NicoLiveHeartBeat_P;
 
+namespace nlib{
 
 
+///
+///nlib\97á\8aO\8f\88\97\9d\83N\83\89\83X
+///
+class Exception:public std::exception{
+               
+private:
+       std::wstring  wErrMessage;
+       UINT_PTR line;
+       std::wstring fileName;
+       std::wstring function;
+
+               
+public:
+       ///
+       ///\83R\83\93\83X\83g\83\89\83N\83^
+       ///
+       Exception();
+       Exception(const char* const& errMessage);
+       Exception(const wchar_t * const & errMessage,UINT_PTR in_line,LPCTSTR in_fileName,LPCTSTR in_function);
+               
+               
+       ///
+       ///\83G\83\89\81[\95\8c¾\8eæ\93¾
+       ///
+       LPCTSTR what();
+
+
+       ///
+       ///\83G\83\89\81[\94­\90\8ds\8eæ\93¾
+       ///
+       UINT_PTR getLineNo();
+
+       ///
+       ///\83G\83\89\81[\94­\90\83t\83@\83C\83\8b\96¼\8eæ\93¾
+       ///
+       LPCTSTR getFileName();
+
+
+       ///
+       ///\83G\83\89\81[\94­\90\8aÖ\90\94\96¼\82ð\8eæ\93¾
+       ///
+       LPCTSTR getFunctionName();
+
+};
+}
+
 
 
-#ifdef __cplusplus
-extern "C" {
-#endif
 
        
        ///
@@ -205,10 +254,16 @@ extern "C" {
        ///
        NLIB_DECLSPEC LPCTSTR NLIB_GetErrorMessage(NLIB_RESULT rsltCode);
 
-       //
-       //\83j\83R\83j\83R\90\95ú\91\97\8aÖ\98A\8aÖ\90\94
-       /////////////////////////////////////////////////////////////////////////////////////////////////////
 
+
+
+
+
+//
+//\83j\83R\83j\83R\90\95ú\91\97\8aÖ\98A\8aÖ\90\94
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+       
        ///
        ///\83j\83R\83j\83R\90\95ú\91\97\83I\83u\83W\83F\83N\83g\93®\93I\90\90¬
        ///
@@ -289,60 +344,85 @@ extern "C" {
        ///
        ///\90\95ú\91\97\83X\83e\81[\83^\83X\8eæ\93¾
        ///
-       NLIB_DECLSPEC StreamStatus_P NicoLiveStream_getStreamStatus(NicoLiveStream_P self);
+//     NLIB_DECLSPEC StreamStatus_P NicoLiveStream_getStreamStatus(NicoLiveStream_P self);
 
        ///
        ///\83R\83\81\83\93\83g\91\97\90M
        ///
        NLIB_DECLSPEC NLIB_RESULT NicoLiveStream_sendChat(NicoLiveStream_P self,LPCTSTR chatbuf,LPCTSTR *mail,LPCTSTR *extends);
 
+
+       ///
+       ///\90\8eå\83R\83\81\83\93\83g\91\97\90M
+       ///
+       NLIB_DECLSPEC NLIB_RESULT NicoLiveStream_sendOwnerChat(NicoLiveStream_P self,LPCTSTR chatbuf,LPCTSTR *mail,LPCTSTR *extends);
+
        ///
        ///\83n\81[\83g\83r\81[\83g\91\97\90M
        ///
        NLIB_DECLSPEC NLIB_RESULT NicoLiveStream_sendHeartBeat(NicoLiveStream_P self);
 
+
+       ///
+       ///\90Ú\91±\92\86\82Ì\95ú\91\97\8fî\95ñ\82ð\96â\82¢\8d\87\82í\82¹\82é
+       ///
+//     NLIB_DECLSPEC StreamInfo_P NicoLiveStream_queryStreamInfo(NicoLiveStream_P self);
+
+
        ///
        ///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82ÌID\82ð\8eæ\93¾
        ///
-       NLIB_DECLSPEC LPCTSTR StreamStatus_getId(StreamStatus_P self);
+       NLIB_DECLSPEC LPCTSTR NicoLiveStream_getId(NicoLiveStream_P self);
 
 
        ///
        ///\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¾
        ///
-       NLIB_DECLSPEC LPCTSTR StreamStatus_getDefaultCommunity(StreamStatus_P self);
+       NLIB_DECLSPEC LPCTSTR NicoLiveStream_getDefaultCommunity(NicoLiveStream_P self);
 
 
        ///
        ///\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¾
        ///
-       NLIB_DECLSPEC PROVIDERTYPE StreamStatus_getProviderType(StreamStatus_P self);
+       NLIB_DECLSPEC PROVIDERTYPE NicoLiveStream_getProviderType(NicoLiveStream_P self);
 
 
        ///
        ///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\83I\81[\83i\81[\83t\83\89\83O\82ð\8eæ\93¾
        ///
-       NLIB_DECLSPEC BOOL StreamStatus_isOwner(StreamStatus_P self);
+       NLIB_DECLSPEC BOOL NicoLiveStream_isOwner(NicoLiveStream_P self);
 
        ///
        ///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\8aJ\8en\8e\9e\8d\8f\82ð\8eæ\93¾
        ///
-       NLIB_DECLSPEC time_t StreamStatus_getStartTime(StreamStatus_P self);
+       NLIB_DECLSPEC time_t NicoLiveStream_getStartTime(NicoLiveStream_P self);
 
        ///
        ///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\8fI\97¹\8e\9e\8d\8f\82ð\8eæ\93¾
        ///
-       NLIB_DECLSPEC time_t StreamStatus_getEndTime(StreamStatus_P self);
+       NLIB_DECLSPEC time_t NicoLiveStream_getEndTime(NicoLiveStream_P self);
 
        ///
        ///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\8aJ\8fê\8e\9e\8d\8f\82ð\8eæ\93¾
        ///
-       NLIB_DECLSPEC time_t StreamStatus_getOpenTime(StreamStatus_P self);
+       NLIB_DECLSPEC time_t NicoLiveStream_getOpenTime(NicoLiveStream_P self);
 
        ///
        ///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\83x\81[\83X\8e\9e\8d\8f\82ð\8eæ\93¾
        ///
-       NLIB_DECLSPEC time_t StreamStatus_getBaseTime(StreamStatus_P self);
+       NLIB_DECLSPEC time_t NicoLiveStream_getBaseTime(NicoLiveStream_P self);
+
+
+       ///
+       ///\83X\83g\83\8a\81[\83\80\83X\83e\81[\83^\83X\82Ì\83^\83C\83g\83\8b\8eæ\93¾
+       ///
+       NLIB_DECLSPEC LPCTSTR NicoLiveStream_getTitle(NicoLiveStream_P self);
+
+
+       ///
+       ///\83v\83\8c\83~\83A\83\80\83t\83\89\83O\82Ì\8eæ\93¾
+       ///
+       NLIB_DECLSPEC BOOL NicoLiveStream_isPremium(NicoLiveStream_P self);
 
        //
        //\83j\83R\83j\83R\93®\89æ\94F\8fØ\8aÖ\98A\8aÖ\90\94
@@ -360,6 +440,11 @@ extern "C" {
 
 
        ///
+       ///\83\86\81[\83U\81[\83Z\83b\83V\83\87\83\93\8eæ\93¾
+       ///
+       NLIB_DECLSPEC LPCTSTR NicoVideoAuth_getUserSession(NicoVideoAuth_P self);
+
+       ///
        ///\83j\83R\83j\83R\93®\89æ\94F\8fØ\8fî\95ñ\8eæ\93¾
        ///
        NLIB_DECLSPEC NLIB_RESULT NicoVideoAuth_getNicoVideoAuth(NicoVideoAuth_P self,BROWSERTYPE browserType);
@@ -395,10 +480,6 @@ extern "C" {
 
 
 
-#ifdef __cplusplus
-}
-#endif
-
 
 
 #pragma comment(lib,"Wininet.lib")
@@ -408,7 +489,6 @@ extern "C" {
 #pragma comment(lib, "shell32.lib" )
 #pragma comment(lib,"expat.lib")
 #pragma comment(lib,"sqlite3.lib")
-#pragma comment(lib,"sqliteManager.lib")
 #pragma comment(lib,"shareCookie.lib")
 #pragma comment(lib,"winmm.lib")
 #pragma comment(lib,"JSONParser.lib")