![]() |
AppEasy Core SDK
1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
|
00001 // 00002 // 00003 // AppEasy SDK - Cross Platform Multi-purpose Game and App Engine 00004 // 00005 // Developed by Matthew Hopwood of Pocketeers Limited - www.pocketeers.co.uk 00006 // 00007 // For updates, tutorials and more details check out www.appeasymobile.com 00008 // 00009 // This code is provided free of charge and without any warranty whatsoever. You must ensure that this whole notice is present in all files and derivatives, so the reader knows its origin. 00010 // If you use this SDK in your product then please ensure that you credit AppEasy's usage appropriately. Please see www.appeasymobile.com for licensing details and support 00011 // 00012 // 00013 00014 #if !defined(_CCZ_PLATFORM_FACEBOOK_H_) 00015 #define _CCZ_PLATFORM_FACEBOOK_H_ 00016 00017 #include "IzPlatformFacebook.h" 00018 #include "CzString.h" 00019 #include "s3eFacebook.h" 00020 00021 class CzPlatformFacebook: public IzPlatformFacebook 00022 { 00023 // Properties 00024 protected: 00025 public: 00026 // Properties end 00027 00028 protected: 00029 00030 public: 00031 CzPlatformFacebook() {} 00032 int Init(); 00033 void Release(); 00034 00035 bool Login(const char** permissions, int num_permissions); 00036 bool Logout(); 00037 bool Reauthorise(const char** permissions, int num_permissions); 00038 CzFacebookRequest InitRequest(const char* method_name, const char* http_method); 00039 CzFacebookRequest InitGraphRequest(const char* graph_path, const char* http_method); 00040 bool AddParamString(CzFacebookRequest request, const char* parameter, const char* value); 00041 bool AddParamNumber(CzFacebookRequest request, const char* parameter, int64 value); 00042 bool SendRequest(CzFacebookRequest request); 00043 void DeleteRequest(CzFacebookRequest request); 00044 const char* GetResponse(CzFacebookRequest request); 00045 int GetErrorCode(CzFacebookRequest request); 00046 const char* GetError(CzFacebookRequest request); 00047 const char* GetAccessToken(); 00048 bool IsLoggedIn() const { return SessionStatus == FB_LOGGED_IN; } 00049 00050 // bool PostWall(const char* message, const char* link_uri, const char* image_uri, const char* name, const char* description); 00051 00052 00053 // Internal 00054 protected: 00055 eFBStatus SessionStatus; 00056 s3eFBSession* CurrentSession; 00057 bool WaitingForCallback; 00058 public: 00059 void setWaitingForCallback(bool waiting) { WaitingForCallback = waiting; } 00060 void setSessionStatus(eFBStatus status) { SessionStatus = status; } 00061 void setCurrentSession(s3eFBSession* session) { CurrentSession = session; } 00062 void WaitForCallback(); 00063 00064 }; 00065 00066 00067 #endif // _CCZ_PLATFORM_FACEBOOK_H_