»
Symbian OS v6.1 Edition for C++ »
API Reference »
WAP Stack »
RWSPCOConn
Location:
 wapcli.h 
Link against:  wapstkcli.lib 
 RWSPCOConn
Support
Supported from 6.0
Description
Connection-oriented WSP. WSP (Wireless Session Protocol) is the
upper-level application layer of the WAP communications stack. The
connection-orientated mode operates above the transaction layer protocol,
WTP.
For error codes, see TReturnCodes, and
RWAPConn::TReturnCodes.
Derivation
| 
| RSubSessionBase | Client-side handle to a sub-session |  | RWAPConn | Operations available on connections in all stack layers |  | RWSPCOConn | Connection-oriented WSP |  | 
Defined in RWSPCOConn:
CancelGetEvent(), Close(), Connect(), CreateTransaction(), Disconnect(), EAbort_ind_t, EBufferTooSmall, ECapabilities, EClientHeaders, EConfirmedPush_ind_t, EConnect_cnf_s, EConnected, EConnecting, EDisconReason, EDisconnect_ind_s, EDisconnected, EErrorBody, EErrorHeaders, EException_ind_e, EInit, EInvalidSession, EInvalidState, EMRUExceeded, EMethodInvoke_cnf_t, EMethodResult_ind_t, ENotSupported, EParameterError, EPush_ind_t, EQueueLen, ERedirectAddresses, ERedirectOptions, ERedirect_ind_s, EReplying, EResume_cnf_s, EResuming, EServerHeaders, ESessionClosed, ESessionNotConnected, ESuspendReason, ESuspend_ind_s, ESuspended, GetEvent(), GetNrOfEvents(), GetSessionData(), GetSessionState(), Open(), Resume(), Suspend(), TEvent, TEventType, TReturnCodes, TSessionDataType, TSessionState
Inherited from RSubSessionBase:
CloseSubSession(),
CreateSubSession(),
Send(),
SendReceive(),
SubSessionHandle(),
operator=()
Inherited from RWAPConn:
CancelAll(),
EBadConnection,
EBearerError,
ECannotOpenPort,
EDelete,
EGet,
EHead,
EMoreData,
EOptions,
EPortAlreadyBound,
EPost,
EPut,
ETooManyConnections,
ETrace,
GetBearer(),
GetLocalPort(),
GetRemoteAddress(),
TMethod,
TPort
Member functions
void CancelGetEvent();
Description
Cancels an asynchronous GetEvent() request.
TInt Close();
Description
Closes sub-session.
Return value
See also:
TInt Connect(const TDesC8& aClientHeaders, CCapCodec* aCap);
Description
Starts a WSP session with the server. Initialise a connection first
with Open().
Parameters
| 
|  const TDesC8& aClientHeaders  |  Session headers communicated to the server during session
establishment  |  
|  CCapCodec* aCap  |  Proposed capabilities. If 0, the default is used.  |  | 
Return value
TInt CreateTransaction(TMethod aMethod, const TDesC& aURI, const TDesC8& aHeaders, const TDesC8& aBody, RWSPCOTrans& aTrans);
Description
Creates and executes a new method invocation transaction. The
returned RWSPCOTrans is then used to manage the
transaction.
Parameters
| 
|  TMethod aMethod  |  Method type. |  
|  const TDesC& aURI  |  URI  |  
|  const TDesC8& aHeaders  |  Headers. The content type must be the first header field if
aBodyis given. This can be empty. |  
|  const TDesC8& aBody  |  Data associated with the invoke. This is semantically equivalent to
an HTTP entity body. If aMethoddoesn't require a body, then this
parameter must be empty. |  
|  RWSPCOTrans& aTrans  |  On return, a handle to the transaction created. |  | 
Return value
TInt Disconnect();
Description
Ends a WSP session with the server. All pending transactions are
aborted.
Return value
TInt GetEvent(TEvent& aEvent,RWSPCOTrans& aTrans) const;
Description
Gets next session or transaction event on this session, synchronous
version.
Parameters
| 
|  TEvent& aEvent  |  On return, the event. |  
|  RWSPCOTrans& aTrans  |  The transaction associated with the event, if aEventis a
transaction event. |  | 
Return value
void GetEvent(TEvent& aEvent,RWSPCOTrans& aTrans,TRequestStatus& aStatus) const;
Description
Gets next session or transaction event on this session, asynchronous
version.
Parameters
| 
|  TEvent& aEvent  |  On completion, the event.  |  
|  RWSPCOTrans& aTrans  |  On completion, The transaction associated with the event, if aEventis a
transaction event. This will contain an empty transaction untill the requests completes. |  
|  TRequestStatus& aStatus  |  Asynchronous request status  |  | 
TInt GetNrOfEvents(TUint& aNrOfEvents) const;
Description
Gets the number of events pending for the session.
Parameters
| 
|  TUint& aNrOfEvents  |  On return, the number of events  |  | 
Return value
TInt GetSessionData(TDes8& aData, TSessionDataType aType) const;
Description
Gets data associated with a session. If the passed buffer is smaller than
the available data, the function returns EMoreData and the
remaining data can be read with successive calls.
Parameters
| 
|  TDes8& aData  |  On return, the data of the requested type  |  
|  TSessionDataType aType  |  Type of data to get  |  | 
Return value
TInt GetSessionState(TSessionState& aState) const;
Description
Gets the session state.
Parameters
Return value
TInt Open(RWAPServ& aServer, const TDesC8& aRemoteHost, TPort aRemotePort, TPort aLocalPort, TBearer aBearer, TBool aSecureConn);
Description
Initialises a fully specified connection.
Parameters
| 
|  RWAPServ& aServer  |  Handle to the session with the EPOC WAP server. |  
|  const TDesC8& aRemoteHost  |  Remote address. The format is dependent on the bearer.  |  
|  TPort aRemotePort  |  Remote port. |  
|  TPort aLocalPort  |  Local port. If 0, the port is allocated automatically.  |  
|  TBearer aBearer  |  Bearer to use  |  
|  TBool aSecureConn  |  Always EFalse |  | 
Return value
TInt Resume(RWSPCOConn& aBlankConn, const TDesC8& aHeaders);
Description
Resumes suspended session.
Parameters
| 
|  RWSPCOConn& aBlankConn  | 
 |  
|  const TDesC8& aHeaders  |  Session headers communicated to the server during session establishment
 |  | 
Return value
TInt Suspend();
Description
Suspends session. No incoming or outgoing activity is allowed within the
session. All pending transactions of the session are aborted, and events
corresponding to aborted transactions are not delivered through
GetEvent().
Note: suspend and resume must be defined as part of the protocol
capabilities for this session.
Return value
typedef TPckgBuf<TInt> TEvent;
Description
Event description. It contains a TEventType value, which can be accessed
through the () operator.
See also:
TEventType
Description
Event types.
See also:
TReturnCodes
Description
Error codes.
TSessionDataType
Description
Session data types.
See also:
TSessionState
Description
Session state. 
See also: