OSDN Git Service

クッキー取得ができない現象の調査中
[nlite/nlite.git] / nlib / nlib_nicoVideoAuth.cpp
1 #include "StdAfx.h"
2 #include "nlib_include.h"
3
4
5
6
7
8 NicoVideoAuth_P NicoVideoAuth_new(){
9
10
11         return (NicoVideoAuth_P)calloc(1,sizeof(NicoVideoAuth));
12
13 }
14
15 VOID NicoVideoAuth_delete(NicoVideoAuth_P* self){
16
17         
18         free(*self);
19         *self = NULL;
20
21 }
22
23
24
25 NLIB_RESULT NicoVideoAuth_getNicoVideoAuth(NicoVideoAuth_P self,BROWSERTYPE browserType){
26
27         NLIB_RESULT rslt = NLIB_ERR_CODE_NOTSET;
28         //\83N\83b\83L\81[\82Ì\8eæ\93¾
29         if( GetCookie(browserType,self->userSession,sizeof(self->userSession),L"user_session",WTEXT(NICO_VIDEO_DOMEINNAME)) != COOKIE_ERR_OK){
30                 rslt = NLIB_ERR_COOKIE_FAILED;
31                 goto end;
32         }
33
34         rslt = NLIB_ERR_OK;
35 end:
36
37         return rslt;
38 }
39
40 LPCTSTR NicoVideoAuth_getUserSession(NicoVideoAuth_P self){
41
42         return self->userSession;
43         
44 }