Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <tranp.h>
Link against: irtranp.lib

Class CTranpSession

class CTranpSession : public CBase;

Description

Encapsulates the behaviour for sending a picture to a peer device and for receiving a picture from a peer device.

Derivation

Members

Defined in CTranpSession:

Inherited from CBase:


Construction and destruction


NewL(MTranpNotification &)

IMPORT_C static CTranpSession* NewL(MTranpNotification &aNotifier);

Description

Constructs and returns a pointer to a new picture transmission session.

Parameters

MTranpNotification &aNotifier

An implementation of the picture transmission callback interface.

Return value

CTranpSession *

A pointer to the new picture transmission session.


~CTranpSession()

IMPORT_C ~CTranpSession();

Description

Frees all resources owned by the object, prior to its destruction.

[Top]


Member functions


Connect()

IMPORT_C void Connect();

Description

Establishes a connection with a peer device. This function is called before sending a picture.

The callback function CTranpSession::Connect() is called when the connection has been successfully established.

See also:


Disconnect()

IMPORT_C void Disconnect();

Description

Breaks the connection with a peer device. This function is called after sending a picture.

The callback function Disconnected() is called when the connection has been broken.

See also:


Abort()

IMPORT_C void Abort();

Description

Aborts any transmission in progress.


Query(TTranP)

IMPORT_C void Query(TTranP aWhat);

Description

Requests information on the processing ability of the peer device. Typically, this is called before sending a picture to that peer device. The information is returned through the callback function QueryComplete().

Parameters

CTranpSession::TTranP aWhat

The specific type of information required from the peer device.

See also:


Get(TTranpPicture &)

IMPORT_C void Get(TTranpPicture &aPicture);

Description

Receives a picture from a peer device.

The following sequence of events is expected:

A peer device connects successfully, resulting in a call to the CTranpSession::Connect() callback function.

The peer device sends picture data, resulting in successive calls to the ProgressIndication() callback function indicating how much of the picture data has been received.

Reception of picture data is complete, resulting in a call to the GetComplete() call back function.

Disconnection from the peer device, resulting in a call the Disconnected() callback function.

If the connection with the peer device is dropped at any stage in the transmission, then this results in a call to the Error() callback function.

Parameters

TTranpPicture &aPicture

The picture object

See also:


Put(const TTranpPicture &)

IMPORT_C void Put(const TTranpPicture &aPicture);

Description

Sends a picture to a peer device.

The following sequence of events is expected:

This device sends picture data to the peer device, resulting in successive calls to the ProgressIndication() callback function indicating how much of the picture data has been received.

Transmission of picture data is complete, resulting in a call to the GetComplete() callback function.

If the connection with the peer device is dropped at any stage in the transmission, then this results in a call to the Error() callback function.

Parameters

const TTranpPicture &aPicture

The picture object

See also:


Config(const TTranpConfig &)

IMPORT_C void Config(const TTranpConfig &aConfig);

Description

Sets the configuration parameters.

Parameters

const TTranpConfig &aConfig

The configuration parameters


Config()const

IMPORT_C TTranpConfig Config() const;

Description

Returns the configuration parameters.

Return value

TTranpConfig

The configuration parameters.

[Top]


Member enumerations


Enum TTranP

TTranP

Description

The type of information required from a peer device.

EReqImageInfo

Request still-information from the peer, e.g. resolution and size.

EReqStatus

Request information about the peer's battery status and free memory.

EReqCommands

Request how many commands can be executed in one SCEP session.