CObex Class Reference

class CObex : public CBase

This class is the common base class for CObexClient and CObexServer. It is an abstract class and cannot be instantiated in itself. However, it does contain user functionality common to both client and server connections.

Provides the basic OBEX transport functionality (sending and receiving files) Client and server provide the more specialied APIs for
  • initiation or response to puts & gets

  • (possible) handling of more generalised 'objects' (prob. with data buffered through a file).

This class is not designed for user derivation

Inherits from

Nested Classes and Structures

Public Member Functions
~CObex()
voidError(TInt)
TConnectState GetConnectState()
IMPORT_C TBoolIsAuthenticating()
IMPORT_C TBoolIsConnected()
IMPORT_C TBoolIsStrictPeer()
IMPORT_C const TObexConnectInfo &LocalInfo()
voidNotifyError(TInt)
voidNotifyProcess(CObexPacket &)
voidNotifyTransportDown(TBool)
voidNotifyTransportUp()
voidProcess(CObexPacket &)
IMPORT_C voidRemoteAddr(TSockAddr &)
IMPORT_C const TObexConnectInfo &RemoteInfo()
IMPORT_C voidSetCallBack(MObexAuthChallengeHandler &)
IMPORT_C TIntSetLocalWho(const TDesC8 &)
IMPORT_C voidSuppressAuthenticationHeaderElements(TObexSuppressedAuthElements)
voidTransportDown(TBool)
voidTransportUp()
voidUserPasswordL(const TDesC &)
Protected Member Functions
CObex()
voidCancelObexConnection()
IMPORT_C TConnectStateConnectState()
voidConstructL(TObexTransportInfo &)
voidControlledTransportDown()
voidForcedTransportDown()
TInt GenerateChallenge(CObexPacket &)
voidOnError(TInt)
voidOnPacketReceive(CObexPacket &)
voidOnTransportDown()
voidOnTransportUp()
TInt ParseConnectPacket(CObexPacket &)
voidPrepareChallResponseL(const TDesC &)
voidProcessChallResponseL(const TObexInternalHeader &)
voidProcessChallengeL(const TObexInternalHeader &)
voidRemoteInfoCleanup()
voidSetConnectState(TConnectState)
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()
Public Member Enumerations
enumTConnectState {
EConnIdle, EConnTransport, EConnObex, ESimpleConnRequest, EConnChallRxed, ESimpleConnChallIssued, EChallConnRequested, EChallConnChallIssued, EWaitForFinalResponse, EFinalResponseReceived, EFinalChallRxed, EWaitForUserInput, EDropLink
}
enumTObexSuppressedAuthElements { EObexNoSuppressedAuthElements = 0x00, EObexSuppressChallengeOptionsAuthElement = 0x01, EObexSuppressRealmAuthElement = 0x02, EObexSuppressAllAuthElements = EObexSuppressChallengeOptionsAuthElement | EObexSuppressRealmAuthElement }
enumTOperation {
EOpConnect = 0x00, EOpDisconnect = 0x01, EOpPut = 0x02, EOpGet = 0x03, EOpSetPath = 0x05, EOpAbort = 0xFF, EOpAbortNoFBit = 0x7F, EOpGetResponse = 0xFD, EOpIdle = 0xFE
}
Protected Attributes
CObexAuthenticator *iAuthEngine
MObexAuthChallengeHandler *iCallBack
HBufC8 *iChallPassword
TBool iChallenge
TConnectState iConnectState
TOperation iCurrentOperation
TBuf8< KChallResponseSize >iIncomingChallResp
TNonce iIncomingNonce
TBuf8< KObexRespSize >iIncomingRequestDigest
TObexConnectInfo iLocalInfo
CObexNotifyHandlerBase *iNotifyHandler
TBuf8< KChallResponseSize >iOutgoingChallResp
TNonce iOutgoingNonce
TObexConnectInfo iRemoteInfo
HBufC *iRemoteRealm
HBufC *iRemoteUID
TBool iReserved
HBufC8 *iRespPassword
HBufC8 *iRxChallenge
TUint iSuppressedObexAuthElements
CObexTransportControllerBase *iTransportController
TBool iUserIDRequested

Constructor & Destructor Documentation

CObex()

CObex()[protected]

~CObex()

~CObex()[virtual]

Member Functions Documentation

CancelObexConnection()

voidCancelObexConnection()[protected]

ConnectState()

IMPORT_C TConnectStateConnectState()const [protected]

ConstructL(TObexTransportInfo &)

voidConstructL(TObexTransportInfo &aObexTransportInfo)[protected, virtual]

Parameters

TObexTransportInfo & aObexTransportInfo

ControlledTransportDown()

voidControlledTransportDown()[protected]

Error(TInt)

voidError(TIntaError)[virtual]

Parameters

TInt aError

ForcedTransportDown()

voidForcedTransportDown()[protected]

GenerateChallenge(CObexPacket &)

TInt GenerateChallenge(CObexPacket &aPacket)[protected]

Parameters

CObexPacket & aPacket

GetConnectState()

TConnectState GetConnectState()const

IsAuthenticating()

IMPORT_C TBoolIsAuthenticating()const

IsConnected()

IMPORT_C TBoolIsConnected()const

IsStrictPeer()

IMPORT_C TBoolIsStrictPeer()const

LocalInfo()

IMPORT_C const TObexConnectInfo &LocalInfo()const

NotifyError(TInt)

voidNotifyError(TIntaError)

Parameters

TInt aError

NotifyProcess(CObexPacket &)

voidNotifyProcess(CObexPacket &aPacket)

Parameters

CObexPacket & aPacket

NotifyTransportDown(TBool)

voidNotifyTransportDown(TBool)

Parameters

TBool

NotifyTransportUp()

voidNotifyTransportUp()

OnError(TInt)

voidOnError(TIntaError)[protected, pure virtual]

Parameters

TInt aError

OnPacketReceive(CObexPacket &)

voidOnPacketReceive(CObexPacket &aPacket)[protected, pure virtual]

Parameters

CObexPacket & aPacket

OnTransportDown()

voidOnTransportDown()[protected, pure virtual]

OnTransportUp()

voidOnTransportUp()[protected, pure virtual]

ParseConnectPacket(CObexPacket &)

TInt ParseConnectPacket(CObexPacket &aPacket)[protected, pure virtual]

Parameters

CObexPacket & aPacket

PrepareChallResponseL(const TDesC &)

voidPrepareChallResponseL(const TDesC &aPassword)[protected]

Parameters

const TDesC & aPassword

Process(CObexPacket &)

voidProcess(CObexPacket &aPacket)[virtual]

Parameters

CObexPacket & aPacket

ProcessChallResponseL(const TObexInternalHeader &)

voidProcessChallResponseL(const TObexInternalHeader &hdr)[protected]

Parameters

const TObexInternalHeader & hdr

ProcessChallengeL(const TObexInternalHeader &)

voidProcessChallengeL(const TObexInternalHeader &hdr)[protected]

Parameters

const TObexInternalHeader & hdr

RemoteAddr(TSockAddr &)

IMPORT_C voidRemoteAddr(TSockAddr &anAddr)

Parameters

TSockAddr & anAddr

RemoteInfo()

IMPORT_C const TObexConnectInfo &RemoteInfo()const

RemoteInfoCleanup()

voidRemoteInfoCleanup()[protected]

SetCallBack(MObexAuthChallengeHandler &)

IMPORT_C voidSetCallBack(MObexAuthChallengeHandler &aCallBack)

Parameters

MObexAuthChallengeHandler & aCallBack

SetConnectState(TConnectState)

voidSetConnectState(TConnectStateaNewState)[protected]

Parameters

TConnectState aNewState

SetLocalWho(const TDesC8 &)

IMPORT_C TIntSetLocalWho(const TDesC8 &aInfo)

Parameters

const TDesC8 & aInfo

SuppressAuthenticationHeaderElements(TObexSuppressedAuthElements)

IMPORT_C voidSuppressAuthenticationHeaderElements(TObexSuppressedAuthElementsaSuppressedObexAuthElements)

Parameters

TObexSuppressedAuthElements aSuppressedObexAuthElements

TransportDown(TBool)

voidTransportDown(TBoolaForceTransportDeletion)[virtual]

Parameters

TBool aForceTransportDeletion

TransportUp()

voidTransportUp()[virtual]

UserPasswordL(const TDesC &)

voidUserPasswordL(const TDesC &aPassword)[pure virtual]

Parameters

const TDesC & aPassword

Member Enumerations Documentation

Enum TConnectState

Current obex connection state In general, the further through the enum the values are, the further through the connection process the state machine will be.

Enumerators

EConnIdle
EConnTransport

Nothing is happening

EConnObex

Transport Link connected not yet established true Link

ESimpleConnRequest

full connection established

EConnChallRxed

Connect without Auth has been sent by ClientReceived by Server

ESimpleConnChallIssued

Server has issued a challenge, to a Client cionnect

EChallConnRequested

Server, received Simple Connect but Server Challenge issued

EChallConnChallIssued

Connect with Auth has been sent by Client/Received by Server

EWaitForFinalResponse

Server has sent a Challenge & Resp to a Client EChallConnRequest

EFinalResponseReceived

Client, waiting for final success/fail not chall-response expected Server, Waiting for final Resp fromm Client to Challenge

EFinalChallRxed

Server, the final response has been received

EWaitForUserInput

Server, Client connect with challenge, Server responds with challenge, Client re-issued original/new challenge

EDropLink

waiting for the user drop the link

Enum TObexSuppressedAuthElements

Flags to suppress the authentication elements of the authentication challenge header.

Enumerators

EObexNoSuppressedAuthElements = 0x00
EObexSuppressChallengeOptionsAuthElement = 0x01
EObexSuppressRealmAuthElement = 0x02
EObexSuppressAllAuthElements = EObexSuppressChallengeOptionsAuthElement | EObexSuppressRealmAuthElement

Enum TOperation

The Obex operation currently being performed.

Enumerators

EOpConnect = 0x00
EOpDisconnect = 0x01

Connect

EOpPut = 0x02

Disconnect

EOpGet = 0x03

Put

EOpSetPath = 0x05

Get

EOpAbort = 0xFF

SetPath

EOpAbortNoFBit = 0x7F

Abort - must fit in one pkt so final bit is always set

EOpGetResponse = 0xFD

Abort (internal, never transmitted)

EOpIdle = 0xFE

Internal - not actually an obex operation.

Member Data Documentation

CObexAuthenticator * iAuthEngine

CObexAuthenticator *iAuthEngine[protected]

MObexAuthChallengeHandler * iCallBack

MObexAuthChallengeHandler *iCallBack[protected]

HBufC8 * iChallPassword

HBufC8 *iChallPassword[protected]

TBool iChallenge

TBool iChallenge[protected]

TConnectState iConnectState

TConnectState iConnectState[protected]

TOperation iCurrentOperation

TOperation iCurrentOperation[protected]

TBuf8< KChallResponseSize > iIncomingChallResp

TBuf8< KChallResponseSize >iIncomingChallResp[protected]

TNonce iIncomingNonce

TNonce iIncomingNonce[protected]

TBuf8< KObexRespSize > iIncomingRequestDigest

TBuf8< KObexRespSize >iIncomingRequestDigest[protected]

TObexConnectInfo iLocalInfo

TObexConnectInfo iLocalInfo[protected]

CObexNotifyHandlerBase * iNotifyHandler

CObexNotifyHandlerBase *iNotifyHandler[protected]

TBuf8< KChallResponseSize > iOutgoingChallResp

TBuf8< KChallResponseSize >iOutgoingChallResp[protected]

TNonce iOutgoingNonce

TNonce iOutgoingNonce[protected]

TObexConnectInfo iRemoteInfo

TObexConnectInfo iRemoteInfo[protected]

HBufC * iRemoteRealm

HBufC *iRemoteRealm[protected]

HBufC * iRemoteUID

HBufC *iRemoteUID[protected]

TBool iReserved

TBool iReserved[protected]

HBufC8 * iRespPassword

HBufC8 *iRespPassword[protected]

HBufC8 * iRxChallenge

HBufC8 *iRxChallenge[protected]

TUint iSuppressedObexAuthElements

TUint iSuppressedObexAuthElements[protected]

CObexTransportControllerBase * iTransportController

CObexTransportControllerBase *iTransportController[protected]

TBool iUserIDRequested

TBool iUserIDRequested[protected]