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
IzPlatformComms.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(_CIZ_PLATFORM_COMMS_H_)
00015 #define _CIZ_PLATFORM_COMMS_H_
00016 
00017 #include "CzPlatform.h"
00018 #include "CzHttp.h"
00019 
00020 #define PLATFORM_COMMS      PLATFORM->getComms()
00021 
00022 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
00023 //
00024 // IzPlatformComms
00025 //
00026 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
00027 class IzPlatformComms
00028 {
00029     // Properties
00030 protected:
00031     bool        Initialised;
00032 public:
00033     bool        isInitialised() const   { return Initialised; }
00034     // Properties end
00035 public:
00036     virtual int Init() = 0;
00037     virtual void Release() = 0;
00038 
00039     virtual CzHttpObject    HttpCreate() = 0;
00040     virtual void            HttpDestroy(CzHttpObject http_object) = 0;
00041     virtual void            HttpUpdate(CzHttpObject http_object) = 0;
00042 
00043     virtual void            HttpCancel(CzHttpObject http_object) = 0;
00044     virtual bool            HttpGetHeader(CzHttpObject http_object, const char* header_name, CzString& header_data) = 0;
00045     virtual int             HttpGetResponseCode(CzHttpObject http_object) = 0;
00046     virtual void            HttpSetRequestHeader(CzHttpObject http_object, const char* header_name, const char* header_data) = 0;
00047     virtual bool            HttpProcessRequest(CzHttpObject http_object, CzHttpRequest* request) = 0;
00048 
00049     virtual CzString        HttpDetermineUserAgent() = 0;
00050 };
00051 
00052 #endif  // _CIZ_PLATFORM_COMMS_H_