OSDN Git Service

IEコンポーネント使い始めまで
[nlite/nlite.git] / nlib / nlib.h
index a875d8d..ce72471 100644 (file)
@@ -82,13 +82,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;
+//typedef struct streaminfo_t *StreamInfo_P;
 
 
 
@@ -152,7 +152,7 @@ typedef struct{
        LPCTSTR thread;
        LPCTSTR ticket;
        LPCTSTR last_res;
-       LPCTSTR server_time;
+       time_t server_time;
 }NicoLiveThreadComment,*NicoLiveThreadComment_P;
 
 
@@ -186,8 +186,54 @@ 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
@@ -301,7 +347,7 @@ 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
@@ -317,57 +363,63 @@ extern "C" {
        ///
        ///\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);
+//     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 StreamStatus_getTitle(StreamStatus_P self);
+       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
@@ -385,6 +437,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);