#pragma once



#define NLIB_VERTION 0001
#define USER_AGENT  WTEXT("nlib/")  WTEXT(TOSTR(NLIB_VERTION)) WTEXT(" (qwerty ") WTEXT(__DATE__) WTEXT(")")


typedef struct  {
	UINT64 nord;
	void *userData;
	NLIB_RESULT errcode;
}UserDataContainer,*UserDataContainer_P;

///
///httpセッションハンドル
///
extern HINTERNET hHttpSession;			//HINTERNET

///
///watch.live.nicoコネクションオブジェクト
///
extern HINTERNET hWatchLiveNicoConnect;


///
///nicovideoコネクションオブジェクト
///
extern HINTERNET hNicoVideoConnect;

///
///appDataフォルダ
///
extern TCHAR appDataPath[];


///
///localAppDAtaフォルダ
///
extern TCHAR localAppDataPath[];


///
///httpボディ読取
///
extern INLINE BOOL ReadHttpBody(HINTERNET hRequest,LPBYTE lpBuffer,DWORD dwBufSize,LPDWORD lpDwSize);

extern XML_Parser xmlParser;

///
///プレイヤーステータスパース処理
///
extern NLIB_RESULT XMLParse(LPVOID option,LPCSTR body,XML_StartElementHandler startElementEvent,XML_EndElementHandler endElementEvent,XML_CharacterDataHandler characterDataEvent);


extern NLIB_RESULT HttpXMLParse(LPVOID userData,LPCTSTR userSession,HINTERNET hConnect,XML_StartElementHandler startElementEvent,XML_EndElementHandler endElementEvent,XML_CharacterDataHandler characterDataEvent);