ZFFramework
 
Loading...
Searching...
No Matches
ZFPInterface_ZFHttpRequest Class Referenceabstract

protocol for ZFHttpRequest More...

#include <ZFProtocolZFHttpRequest.h>

Inheritance diagram for ZFPInterface_ZFHttpRequest:
ZFProtocol

Public Member Functions

virtual const zfcharprotocolName (void) const
 get the name of the protocol module, e.g. "ZFObject"
 
virtual zfbool httpsAvailable (void)=0
 whether https supported
 
virtual void * nativeTaskCreate (ZFHttpRequest *request)=0
 create native task
 
virtual void nativeTaskDestroy (void *nativeTask)=0
 destroy native task
 
virtual void url (void *nativeTask, const zfstring &url)=0
 change the request url
 
virtual void httpMethod (void *nativeTask, ZFHttpMethod httpMethod)=0
 set http method
 
virtual void header (void *nativeTask, const zfstring &key, const zfstring &value)=0
 set http header
 
virtual void headerRemove (void *nativeTask, const zfstring &key)=0
 remove http header
 
virtual zfstring header (void *nativeTask, const zfstring &key)=0
 get http header
 
virtual zfindex headerCount (void *nativeTask)=0
 http header access
 
virtual zfiter headerIter (void *nativeTask)=0
 http header access
 
virtual zfstring headerIterKey (void *nativeTask, const zfiter &it)=0
 http header access
 
virtual zfstring headerIterValue (void *nativeTask, const zfiter &it)=0
 http header access
 
virtual void headerIterValue (void *nativeTask, zfiter &it, const zfstring &value)=0
 http header access
 
virtual void headerIterRemove (void *nativeTask, zfiter &it)=0
 http header access
 
virtual void body (void *nativeTask, const void *buffer, zfindex byteSize)=0
 append bytes to body
 
virtual zfstring body (void *nativeTask)=0
 return the current body contents
 
virtual void request (void *nativeTask, ZFHttpResponse *response)=0
 start the http request, impl must notify notifyResponse even if fail or error
 
virtual void requestCancel (void *nativeTask)=0
 cancel the request
 
void notifyResponse (ZFHttpRequest *request, ZFHttpResponse *response)
 implementation must notify when receive response
 
virtual zfstring responseHeader (void *nativeTask, const zfstring &key)=0
 get response header
 
virtual zfindex responseHeaderCount (void *nativeTask)=0
 response header access
 
virtual zfiter responseHeaderIter (void *nativeTask)=0
 response header access
 
virtual zfstring responseHeaderIterKey (void *nativeTask, const zfiter &it)=0
 response header access
 
virtual zfstring responseHeaderIterValue (void *nativeTask, const zfiter &it)=0
 response header access
 
- Public Member Functions inherited from ZFProtocol
virtual void protocolOnInit (void)
 called to init the protocol
 
virtual void protocolOnInitFinish (void)
 see protocolOnInit
 
virtual void protocolOnDeallocPrepare (void)
 see protocolOnInit
 
virtual void protocolOnDealloc (void)
 see protocolOnInit
 
virtual ZFProtocolInstanceState protocolInstanceState (void)
 protocol instance's state
 
virtual const zfcharprotocolImplName (void) const
 get the name of the protocol implementation, e.g. "ZFObject_default"
 
virtual ZFProtocolLevel protocolImplLevel (void) const
 get the level of the protocol implementation
 
virtual const zfcharprotocolImplPlatformHint (void) const
 get type hint of the implementation or empty string if not defined, e.g. "iOS:NSString" for iOS's string impl, use ZFPROTOCOL_IMPLEMENTATION_PLATFORM_HINT to register
 
virtual void objectInfoT (zfstring &ret) const
 see objectInfo
 
virtual zfstring objectInfo (void) const
 get a short info about this object
 

Protected Types

typedef ZFProtocol zfsuper
 class ref to super
 
typedef ZFPInterface_ZFHttpRequest zfself
 class ref to self
 

Detailed Description

protocol for ZFHttpRequest

Member Function Documentation

◆ protocolName()

virtual const zfchar * ZFPInterface_ZFHttpRequest::protocolName ( void ) const
inlinevirtual

get the name of the protocol module, e.g. "ZFObject"

Reimplemented from ZFProtocol.

◆ notifyResponse()

void ZFPInterface_ZFHttpRequest::notifyResponse ( ZFHttpRequest * request,
ZFHttpResponse * response )
inline

implementation must notify when receive response

before notify, you must fill these:


The documentation for this class was generated from the following file: