CRConnection Class Reference

List of all members.

Public Member Functions

 CRConnection (CConsoleBase *aConsole)
 ~CRConnection ()
void StartESOCK ()
void DemoApiWithoutDbOverrideL ()
void DemoApiWithDbOverrideL ()
void AttachToExistingInterfaceL ()
TInt ConnectWithDbOverrideL ()
TInt ConnectWithoutDbOverrideL ()
void GetProgressNotification ()
void DisplayProgressinfo (const TNifProgress &aProgress)
void DisplaySectionToDemo (const TDesC &aText)
TInt PrepareSocket ()
TInt SendUdpData (TUint aPayloadSize)
TInt RecvUdpData (TUint aPayloadSize)
void DataSendAndReceive (TUint aPayloadSize)
void DataTransferredRequest ()
void DataTransferNotificationRequest ()

Detailed Description

Definition at line 40 of file rconnection.h.


Constructor & Destructor Documentation

CRConnection::CRConnection ( CConsoleBase *  aConsole  ) 

Constructor.

Definition at line 63 of file rconnection.cpp.

CRConnection::~CRConnection (  ) 

Destructor.

Definition at line 86 of file rconnection.cpp.


Member Function Documentation

void CRConnection::StartESOCK (  ) 

Connects to the socket server and opens a monitor for receiving interface notification. The client is notified via monitor, whenever another connection that uses a socket server (iSocketServ) goes up or down.

Definition at line 98 of file rconnection.cpp.

void CRConnection::DemoApiWithoutDbOverrideL (  ) 

Demonstrates the following RConnection functionality: 1) requests connection/disconnection (interface up/down) notification 2) starts an explicit connection without Commdb override 3) obtains and prints connection progress information 4) prepares socket for data transfer 5) sends and receives data over the socket 6) prints the amount of data transferred 7) closes the socket and connection

Definition at line 567 of file rconnection.cpp.

void CRConnection::DemoApiWithDbOverrideL (  ) 

Demonstrates the following RConnection functionality: 1) requests connection/disconnection (interface up/down) notification 2) starts an explicit connection with CommDb override 3) obtains and prints connection progress information 4) prepares socket for data transfer 5) sends and receives data over the socket 6) requests data send and receive notification 7) closes the socket and connection

Definition at line 646 of file rconnection.cpp.

void CRConnection::AttachToExistingInterfaceL (  ) 

Attaches a connection to an undelying interface. This demonstrates the following RConnection functionality: 1) Opens 2 connections and starts one of them. The other is not yet associated with an underlying interface. 2) Gets the connection info of the 1st connection. 3) Attaches the 2nd connection to the existing interface, 4) Gets the current state of the attached connection. 5) Closes both connections.

Definition at line 724 of file rconnection.cpp.

TInt CRConnection::ConnectWithDbOverrideL (  ) 

Starts an explicit connection, overriding the default Commdb connection settings.

Definition at line 155 of file rconnection.cpp.

TInt CRConnection::ConnectWithoutDbOverrideL (  ) 

Starts an explicit connection using the default CommDb connection preferences. CommDb is the Symbian platform Communications Database.

'Explicit' means the connection is established using an RConnection instance, rather than implicitly, where the application opens and uses an RSocket or RHostResolver rather than RConnection.

Definition at line 126 of file rconnection.cpp.

void CRConnection::GetProgressNotification (  ) 

Gets progress notification about the connection. RConnection::ProgressNotification() is used to monitor the state of the connection as it undergoes various stages before it is fully established.

Definition at line 191 of file rconnection.cpp.

void CRConnection::DisplayProgressinfo ( const TNifProgress &  aProgress  ) 

Gets progress information at each stage of the connection.

Parameters:
aProgress Filled with progress/error information on completion.

Definition at line 214 of file rconnection.cpp.

TInt CRConnection::PrepareSocket (  ) 

Prepares the socket for carrying out data transfer by: 1) opening the socket and associating it with the connection. 2) setting options on the socket and the local port for it.

Definition at line 278 of file rconnection.cpp.

TInt CRConnection::SendUdpData ( TUint  aPayloadSize  ) 

Sends UDP data (an ICMP packet) over the socket specified to the address specified.

Parameters:
aPayloadSize The size of the packet to send.
Returns:
Error code

Definition at line 311 of file rconnection.cpp.

TInt CRConnection::RecvUdpData ( TUint  aPayloadSize  ) 

Receives UDP packet from the network

Parameters:
aPayloadSize The size of the packet to receive
Returns:
Error code

Definition at line 344 of file rconnection.cpp.

void CRConnection::DataSendAndReceive ( TUint  aPayloadSize  ) 

Sends and receives data.

Definition at line 435 of file rconnection.cpp.

void CRConnection::DataTransferredRequest (  ) 

Gets and prints the amount of data transmitted and received.

Definition at line 470 of file rconnection.cpp.

void CRConnection::DataTransferNotificationRequest (  ) 

Requests notification when an amount of data equal to a threshold value has been sent and received. The threshold used here is 100 bytes.

Definition at line 491 of file rconnection.cpp.


Generated by  doxygen 1.6.2