CObexServer Class Reference

class CObexServer : public CObex

OBEX server.

CObexServer provides a framework for servicing OBEX requests from remote clients. It is designed to be able to act as either a "default" application (in IrDA terms, registering on the IrDA:OBEX IAS class), or as a application specific server (registering itself on a private IAS class).

You implement service-specific behaviour by providing a MObexServerNotify interface implementation to the server object. The server calls the interface's functions to provide notification of server events, which specific implementations can process (or ignore) as appropriate.

This class is not designed for user derivation.

Inherits from

Public Member Functions
~CObexServer()
TBool CheckObjectForConnectionId(CObexBaseObject &)
TBool CheckPacketForConnectionId(CObexPacket &)
IMPORT_C TOperationCurrentOperation()
IMPORT_C TAny *ExtensionInterfaceL(TUid)
IMPORT_C TBoolIsStarted()
IMPORT_C CObexServer *NewL(TObexProtocolInfo &)
IMPORT_C CObexServer *NewL(TObexProtocolInfo &, TObexProtocolPolicy &)
IMPORT_C CObexServer *NewL(TObexTransportInfo &)
IMPORT_C TIntPacketHeaders(CObexHeaderSet *&)
IMPORT_C TIntPacketHeaders(CObexHeaderSet *&, MObexHeaderCheck &)
TInt ParseConnectPacket(CObexPacket &)
TInt PrepareConnectPacket(CObexPacket &)
TInt PrepareErroredConnectPacket(CObexPacket &)
IMPORT_C TIntRequestCompleteIndicationCallback(TObexResponse)
IMPORT_C TIntRequestCompleteIndicationCallback(TInt)
IMPORT_C TIntRequestIndicationCallback(CObexBaseObject *)
IMPORT_C TIntRequestIndicationCallbackWithError(TObexResponse)
IMPORT_C TIntRequestIndicationCallbackWithError(TInt)
IMPORT_C voidResetChallenge()
IMPORT_C voidSetChallengeL(const TDesC &)
voidSetCurrentOperation(const TOperation)
IMPORT_C TIntSetPutFinalResponseHeaders(CObexHeaderSet *)
IMPORT_C voidSetReadActivityObserver(MObexReadActivityObserver *)
IMPORT_C voidSetTargetChecking(TTargetChecking)
voidSignalPacketProcessEvent(TInt)
voidSignalReadActivity()
IMPORT_C TIntStart(MObexServerNotify *)
IMPORT_C TIntStart(MObexServerNotifyAsync *)
IMPORT_C voidStop()
IMPORT_C const TObexTransportInfo *TransportInfo()
IMPORT_C voidUserPasswordL(const TDesC &)
Private Member Functions
CObexServer()
TInt AcceptConnection()
TInt AddConnectionIDHeader(CObexPacket &)
voidCheckServerAppResponseCode(TObexOpcode, TObexResponse)
voidCheckTarget(TConnectState &, TInt &)
TUint32 ConnectionID()
voidConstructL(TObexTransportInfo &)
TInt DoPacketHeaders(CObexHeaderSet *&, MObexHeaderCheck *)
voidOnError(TInt)
voidOnPacketReceive(CObexPacket &)
voidOnTransportDown()
voidOnTransportUp()
TInt PrepareFinalChallResponse(CObexPacket &, TConnectState &)
voidResetConnectionID()
voidSetConnectionID(TUint32)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CObex::CObex()
CObex::CancelObexConnection()
CObex::ConnectState()const
CObex::ControlledTransportDown()
CObex::Error(TInt)
CObex::ForcedTransportDown()
CObex::GenerateChallenge(CObexPacket &)
CObex::GetConnectState()const
CObex::IsAuthenticating()const
CObex::IsConnected()const
CObex::IsStrictPeer()const
CObex::LocalInfo()const
CObex::NotifyError(TInt)
CObex::NotifyProcess(CObexPacket &)
CObex::NotifyTransportDown(TBool)
CObex::NotifyTransportUp()
CObex::PrepareChallResponseL(const TDesC &)
CObex::Process(CObexPacket &)
CObex::ProcessChallResponseL(const TObexInternalHeader &)
CObex::ProcessChallengeL(const TObexInternalHeader &)
CObex::RemoteAddr(TSockAddr &)
CObex::RemoteInfo()const
CObex::RemoteInfoCleanup()
CObex::SetCallBack(MObexAuthChallengeHandler &)
CObex::SetConnectState(TConnectState)
CObex::SetLocalWho(const TDesC8 &)
CObex::SuppressAuthenticationHeaderElements(TObexSuppressedAuthElements)
CObex::TransportDown(TBool)
CObex::TransportUp()
CObex::~CObex()
Public Member Enumerations
enumTTargetChecking { ENoChecking, EIfPresent, EAlways }
Inherited Enumerations
CObex:TConnectState
CObex:TObexSuppressedAuthElements
CObex:TOperation
Private Attributes
TUint32 iConnectionID
TBool iConnectionIdSet
TBool iEnabled
CObexHeader *iHeader
MObexServerNotifyAsync *iOwner
CObexPacketSignaller *iPacketProcessSignaller
CObexServerRequestPacketEngine *iServerRequestPacketEngine
TBool iSpecDone
CObexServerStateMachine *iStateMachine
CObexServerNotifySyncWrapper *iSyncWrapper
TTargetChecking iTargetChecking
TBool iTargetReceived
Inherited Attributes
CObex::iAuthEngine
CObex::iCallBack
CObex::iChallPassword
CObex::iChallenge
CObex::iConnectState
CObex::iCurrentOperation
CObex::iIncomingChallResp
CObex::iIncomingNonce
CObex::iIncomingRequestDigest
CObex::iLocalInfo
CObex::iNotifyHandler
CObex::iOutgoingChallResp
CObex::iOutgoingNonce
CObex::iRemoteInfo
CObex::iRemoteRealm
CObex::iRemoteUID
CObex::iReserved
CObex::iRespPassword
CObex::iRxChallenge
CObex::iSuppressedObexAuthElements
CObex::iTransportController
CObex::iUserIDRequested

Constructor & Destructor Documentation

CObexServer()

CObexServer()[private]

~CObexServer()

~CObexServer()

Member Functions Documentation

AcceptConnection()

TInt AcceptConnection()[private]

AddConnectionIDHeader(CObexPacket &)

TInt AddConnectionIDHeader(CObexPacket &aPacket)[private]

Parameters

CObexPacket & aPacket

CheckObjectForConnectionId(CObexBaseObject &)

TBool CheckObjectForConnectionId(CObexBaseObject &aObject)

Parameters

CObexBaseObject & aObject

CheckPacketForConnectionId(CObexPacket &)

TBool CheckPacketForConnectionId(CObexPacket &aObject)

Parameters

CObexPacket & aObject

CheckServerAppResponseCode(TObexOpcode, TObexResponse)

voidCheckServerAppResponseCode(TObexOpcodeaOpcode,
TObexResponseaResponse
)[private]

Parameters

TObexOpcode aOpcode
TObexResponse aResponse

CheckTarget(TConnectState &, TInt &)

voidCheckTarget(TConnectState &aNextState,
TInt &aRetVal
)[private]

Parameters

TConnectState & aNextState
TInt & aRetVal

ConnectionID()

TUint32 ConnectionID()[private]

ConstructL(TObexTransportInfo &)

voidConstructL(TObexTransportInfo &aObexTransportInfo)[private, virtual]

Parameters

TObexTransportInfo & aObexTransportInfo

CurrentOperation()

IMPORT_C TOperationCurrentOperation()const

DoPacketHeaders(CObexHeaderSet *&, MObexHeaderCheck *)

TInt DoPacketHeaders(CObexHeaderSet *&aHeaderSet,
MObexHeaderCheck *aHeaderCheck
)[private]

Parameters

CObexHeaderSet *& aHeaderSet
MObexHeaderCheck * aHeaderCheck

ExtensionInterfaceL(TUid)

IMPORT_C TAny *ExtensionInterfaceL(TUidaUid)

Parameters

TUid aUid

IsStarted()

IMPORT_C TBoolIsStarted()

NewL(TObexProtocolInfo &)

IMPORT_C CObexServer *NewL(TObexProtocolInfo &aObexProtocolInfoPtr)[static]

Parameters

TObexProtocolInfo & aObexProtocolInfoPtr

NewL(TObexProtocolInfo &, TObexProtocolPolicy &)

IMPORT_C CObexServer *NewL(TObexProtocolInfo &aObexProtocolInfoPtr,
TObexProtocolPolicy &aObexProtocolPolicy
)[static]

Parameters

TObexProtocolInfo & aObexProtocolInfoPtr
TObexProtocolPolicy & aObexProtocolPolicy

NewL(TObexTransportInfo &)

IMPORT_C CObexServer *NewL(TObexTransportInfo &aObexTransportInfo)[static]

Parameters

TObexTransportInfo & aObexTransportInfo

OnError(TInt)

voidOnError(TIntaError)[private, virtual]

Parameters

TInt aError

OnPacketReceive(CObexPacket &)

voidOnPacketReceive(CObexPacket &aPacket)[private, virtual]

Parameters

CObexPacket & aPacket

OnTransportDown()

voidOnTransportDown()[private, virtual]

OnTransportUp()

voidOnTransportUp()[private, virtual]

PacketHeaders(CObexHeaderSet *&)

IMPORT_C TIntPacketHeaders(CObexHeaderSet *&aHeaderSet)

Parameters

CObexHeaderSet *& aHeaderSet

PacketHeaders(CObexHeaderSet *&, MObexHeaderCheck &)

IMPORT_C TIntPacketHeaders(CObexHeaderSet *&aHeaderSet,
MObexHeaderCheck &aHeaderCheck
)

Parameters

CObexHeaderSet *& aHeaderSet
MObexHeaderCheck & aHeaderCheck

ParseConnectPacket(CObexPacket &)

TInt ParseConnectPacket(CObexPacket &aPacket)[virtual]

Parameters

CObexPacket & aPacket

PrepareConnectPacket(CObexPacket &)

TInt PrepareConnectPacket(CObexPacket &aPacket)

Parameters

CObexPacket & aPacket

PrepareErroredConnectPacket(CObexPacket &)

TInt PrepareErroredConnectPacket(CObexPacket &aPacket)

Parameters

CObexPacket & aPacket

PrepareFinalChallResponse(CObexPacket &, TConnectState &)

TInt PrepareFinalChallResponse(CObexPacket &aPacket,
TConnectState &aNextState
)[private]

Parameters

CObexPacket & aPacket
TConnectState & aNextState

RequestCompleteIndicationCallback(TObexResponse)

IMPORT_C TIntRequestCompleteIndicationCallback(TObexResponseaResponseCode)

Parameters

TObexResponse aResponseCode

RequestCompleteIndicationCallback(TInt)

IMPORT_C TIntRequestCompleteIndicationCallback(TIntaErrorCode)

Parameters

TInt aErrorCode

RequestIndicationCallback(CObexBaseObject *)

IMPORT_C TIntRequestIndicationCallback(CObexBaseObject *aObject)

Parameters

CObexBaseObject * aObject

RequestIndicationCallbackWithError(TObexResponse)

IMPORT_C TIntRequestIndicationCallbackWithError(TObexResponseaResponseCode)

Parameters

TObexResponse aResponseCode

RequestIndicationCallbackWithError(TInt)

IMPORT_C TIntRequestIndicationCallbackWithError(TIntaErrorCode)

Parameters

TInt aErrorCode

ResetChallenge()

IMPORT_C voidResetChallenge()

ResetConnectionID()

voidResetConnectionID()[private]

SetChallengeL(const TDesC &)

IMPORT_C voidSetChallengeL(const TDesC &aPassword)

Parameters

const TDesC & aPassword

SetConnectionID(TUint32)

voidSetConnectionID(TUint32aConnectionID)[private]

Parameters

TUint32 aConnectionID

SetCurrentOperation(const TOperation)

voidSetCurrentOperation(const TOperationaOperation)

Parameters

const TOperation aOperation

SetPutFinalResponseHeaders(CObexHeaderSet *)

IMPORT_C TIntSetPutFinalResponseHeaders(CObexHeaderSet *aHeaderSet)

Parameters

CObexHeaderSet * aHeaderSet

SetReadActivityObserver(MObexReadActivityObserver *)

IMPORT_C voidSetReadActivityObserver(MObexReadActivityObserver *aObserver)

Parameters

MObexReadActivityObserver * aObserver

SetTargetChecking(TTargetChecking)

IMPORT_C voidSetTargetChecking(TTargetCheckingaChecking)

Parameters

TTargetChecking aChecking

SignalPacketProcessEvent(TInt)

voidSignalPacketProcessEvent(TIntaEvent)

Parameters

TInt aEvent

SignalReadActivity()

voidSignalReadActivity()

Start(MObexServerNotify *)

IMPORT_C TIntStart(MObexServerNotify *aOwner)

Parameters

MObexServerNotify * aOwner

Start(MObexServerNotifyAsync *)

IMPORT_C TIntStart(MObexServerNotifyAsync *aOwner)

Parameters

MObexServerNotifyAsync * aOwner

Stop()

IMPORT_C voidStop()

TransportInfo()

IMPORT_C const TObexTransportInfo *TransportInfo()const

UserPasswordL(const TDesC &)

IMPORT_C voidUserPasswordL(const TDesC &aPassword)[virtual]

Parameters

const TDesC & aPassword

Member Enumerations Documentation

Enum TTargetChecking

The target header checking to apply to incoming connection requests. Defaults to EIfPresent. CObexServer::SetTargetChecking

Enumerators

ENoChecking
EIfPresent

Allow all target headers to connect.

EAlways

Only check target header in response to receiving one. Allows all clients specifying an Inbox service to connect.

Member Data Documentation

TUint32 iConnectionID

TUint32 iConnectionID[private]

TBool iConnectionIdSet

TBool iConnectionIdSet[private]

TBool iEnabled

TBool iEnabled[private]

CObexHeader * iHeader

CObexHeader *iHeader[private]

MObexServerNotifyAsync * iOwner

MObexServerNotifyAsync *iOwner[private]

CObexPacketSignaller * iPacketProcessSignaller

CObexPacketSignaller *iPacketProcessSignaller[private]

CObexServerRequestPacketEngine * iServerRequestPacketEngine

CObexServerRequestPacketEngine *iServerRequestPacketEngine[private]

TBool iSpecDone

TBool iSpecDone[private]

CObexServerStateMachine * iStateMachine

CObexServerStateMachine *iStateMachine[private]

CObexServerNotifySyncWrapper * iSyncWrapper

CObexServerNotifySyncWrapper *iSyncWrapper[private]

TTargetChecking iTargetChecking

TTargetChecking iTargetChecking[private]

TBool iTargetReceived

TBool iTargetReceived[private]