AppEasy Core SDK  1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
CzPlatformComms.h
Go to the documentation of this file.
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_COMMS_H_)
00015 #define _CCZ_PLATFORM_COMMS_H_
00016 
00017 #include "IzPlatformComms.h"
00018 #include "IwHTTP.h"
00019 
00020 class CzPlatformComms : public IzPlatformComms
00021 {
00022     // Properties
00023 protected:
00024 public:
00025     // Properties end
00026 public:
00027     int     Init();
00028     void    Release();
00029 
00030     CzHttpObject    HttpCreate();
00031     void            HttpDestroy(CzHttpObject http_object);
00032     void            HttpUpdate(CzHttpObject http_object);
00033 
00034     void            HttpCancel(CzHttpObject http_object);
00035     bool            HttpGetHeader(CzHttpObject http_object, const char* header_name, CzString& header_data);
00036     int             HttpGetResponseCode(CzHttpObject http_object);
00037     void            HttpSetRequestHeader(CzHttpObject http_object, const char* header_name, const char* header_data);
00038     bool            HttpProcessRequest(CzHttpObject http_object, CzHttpRequest* request);
00039 
00040     CzString        HttpDetermineUserAgent();
00041 
00042     // Internal
00043     static int      HttpReadContent(CzHttpObject http_object, char *buf, int max_bytes, s3eCallback callback = NULL, void *cb_data = NULL);
00044     static bool     HttpGetSuccess(CzHttpObject http_object);
00045     static int      HttpGetContentReceived(CzHttpObject http_object);
00046     static int      HttpGetContentLength(CzHttpObject http_object);
00047     static int      HttpGetContentExpected(CzHttpObject http_object);
00048 };
00049 
00050 
00051 #endif  // _CCZ_PLATFORM_COMMS_H_