RPtp Class Reference

class RPtp : public RSessionBase

RPtp class is used to create a PTP Server session and a connection to the selected transport medium.

Inherits from

Public Member Functions
RPtp()
IMPORT_C voidCancelIsDpsPrinter()
IMPORT_C voidCancelObjectReceivedNotify()
IMPORT_C voidCancelSendObject()
IMPORT_C voidClose()
IMPORT_C TIntConnect()
IMPORT_C TIntCreatePtpStack(const TUid)
IMPORT_C voidDestroyPtpStatck()
IMPORT_C TIntGetNameByObjectHandle(TDes &, const TUint32)
IMPORT_C TIntGetObjectHandleByName(const TDesC &, TUint32 &, TBool)
IMPORT_C voidIsDpsPrinter(TRequestStatus &)
IMPORT_C voidObjectReceivedNotify(const TDesC &, TDes &, TRequestStatus &, TBool)
IMPORT_C const TDesC &PtpFolder()
IMPORT_C voidSendObject(const TDesC &, TRequestStatus &, TBool, TInt, TBool)
Private Member Functions
TInt DoConnect()
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Private Attributes
TBool iConnected
TBuf< KFileExtLength >iExt
TFileName iFile
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RPtp()

IMPORT_CRPtp()

Member Functions Documentation

CancelIsDpsPrinter()

IMPORT_C voidCancelIsDpsPrinter()

Cancels previously issued Asynch request IsDpsPrinter

CancelObjectReceivedNotify()

IMPORT_C voidCancelObjectReceivedNotify()

Cancel Object received notification

CancelSendObject()

IMPORT_C voidCancelSendObject()

Cancel object sending request.

Close()

IMPORT_C voidClose()

Connect()

IMPORT_C TIntConnect()

Creates new session to PTP Server. This also register the observer to the ptp server. This should be only used by the client

CreatePtpStack(const TUid)

IMPORT_C TIntCreatePtpStack(const TUidaTransport)

Creates connection to the server and initializes the ptp stack based on specified transport medium.

Parameters

const TUid aTransport

DestroyPtpStatck()

IMPORT_C voidDestroyPtpStatck()

Closes the connection to PTP server.

DoConnect()

TInt DoConnect()[private]

GetNameByObjectHandle(TDes &, const TUint32)

IMPORT_C TIntGetNameByObjectHandle(TDes &aNameAndPath,
const TUint32aHandle
)

Gets the file name.

Parameters

TDes & aNameAndPath
const TUint32 aHandle

GetObjectHandleByName(const TDesC &, TUint32 &, TBool)

IMPORT_C TIntGetObjectHandleByName(const TDesC &aNameAndPath,
TUint32 &aHandle,
TBoolaAdd = EFalse
)

Gets the object handle (whether the object exists). The client may use this function to delete certain file (mainly for dps now)

Parameters

const TDesC & aNameAndPath
TUint32 & aHandle
TBool aAdd = EFalseif ETrue, this object is added to the list if not found.

IsDpsPrinter(TRequestStatus &)

IMPORT_C voidIsDpsPrinter(TRequestStatus &aStatus)

Performs DPS discovery.

Parameters

TRequestStatus & aStatusthe result of the Dps discovery, either EAvailable or NotAvailable from TDpsPrinterState enum

ObjectReceivedNotify(const TDesC &, TDes &, TRequestStatus &, TBool)

IMPORT_C voidObjectReceivedNotify(const TDesC &aFileExtension,
TDes &aNameAndPath,
TRequestStatus &aStatus,
TBoolaDelete = EFalse
)

Registers the certain DPS files arrival (from the host) notification. Note that the received file is deleted when next call on this API is made. . The recveived file is always deleted when next call to any method on this API is made.

Parameters

const TDesC & aFileExtension
TDes & aNameAndPathname and path of the file.
TRequestStatus & aStatus
TBool aDelete = EFalse

PtpFolder()

IMPORT_C const TDesC &PtpFolder()

Returns name and path of folder. Note: while this still returns a valid folder name, that folder is no more used for anything.

SendObject(const TDesC &, TRequestStatus &, TBool, TInt, TBool)

IMPORT_C voidSendObject(const TDesC &aNameAndPath,
TRequestStatus &aStatus,
TBoolaTimeout,
TIntaSize = 0,
TBoolaAdd = EFalse
)

Client sends object and get informed when the object is received by the host. This method is intended for sending DPS files only. 5.2 5.2

Parameters

const TDesC & aNameAndPath
TRequestStatus & aStatus
TBool aTimeoutwhether the client needs the reply for this request. If it needs the timeout will be true, which means if timout happened, the reply is KErrTimedout.
TInt aSize = 0size of the object to be sent. Not used.
TBool aAdd = EFalseNot used.

Member Data Documentation

TBool iConnected

TBool iConnected[private]

TBuf< KFileExtLength > iExt

TBuf< KFileExtLength >iExt[private]

TFileName iFile

TFileName iFile[private]