author | shivsood |
Sat, 12 Jun 2010 14:30:11 +0530 | |
branch | MSRP_FrameWork |
changeset 25 | 505ad3f0ce5c |
child 58 | cdb720e67852 |
permissions | -rw-r--r-- |
25
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
1 |
/* |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
2 |
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
3 |
* All rights reserved. |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html." |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
8 |
* Initial Contributors: |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
9 |
* Nokia Corporation - initial contribution. |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
10 |
* Contributors: |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
11 |
* |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
12 |
* Description: |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
13 |
* MSRP Implementation |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
14 |
* |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
15 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
16 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
17 |
#ifndef RMSRPSESSION_CPP_ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
18 |
#define RMSRPSESSION_CPP_ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
19 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
20 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
21 |
// Include Files |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
22 |
#include "MsrpCommon.h" |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
23 |
#include "RMSRPSession.h" |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
24 |
#include "RMSRP.h" |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
25 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
26 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
27 |
// Member Functions |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
28 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
29 |
RMSRPSession::RMSRPSession() : |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
30 |
RSubSessionBase() |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
31 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
32 |
MSRPLOG("RMSRP Session.. Ctor"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
33 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
34 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
35 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
36 |
TInt RMSRPSession::CreateServerSubSession( RMSRP& aRMSRP, const TUint32 aIapId ) |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
37 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
38 |
MSRPLOG("RMSRP Session.. Create client-server SubSession"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
39 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
40 |
return CreateSubSession( aRMSRP, EMSRPCreateSubSession, TIpcArgs( aIapId ) ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
41 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
42 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
43 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
44 |
void RMSRPSession::CloseServerSubSession( ) |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
45 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
46 |
MSRPLOG("RMSRP Session.. Close client-server SubSession"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
47 |
CloseSubSession(EMSRPCloseSubSession); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
48 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
49 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
50 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
51 |
void RMSRPSession::GetLocalPathL( TDes8 &aLocalHost, TDes8 &aSessionID ) |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
52 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
53 |
MSRPLOG("RMSRP Session.. GetLocalPath"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
54 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
55 |
User::LeaveIfError( SendReceive(EMSRPLocalPath, TIpcArgs( &iLocalPathMSRPDataPckg )) ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
56 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
57 |
aLocalHost = iLocalPathMSRPDataPckg().iLocalHost; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
58 |
aSessionID = iLocalPathMSRPDataPckg().iSessionID; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
59 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
60 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
61 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
62 |
void RMSRPSession::Connect( const TDesC8& aRemoteHost, |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
63 |
const TUint aRemotePort, |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
64 |
const TDesC8& aRemoteSessionID, |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
65 |
TRequestStatus& aStatus ) |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
66 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
67 |
MSRPLOG("RMSRP Session.. Connect"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
68 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
69 |
iConnectMSRPDataPckg().iRemoteHost = aRemoteHost; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
70 |
iConnectMSRPDataPckg().iRemotePort = aRemotePort; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
71 |
iConnectMSRPDataPckg().iRemoteSessionID = aRemoteSessionID; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
72 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
73 |
SendReceive( EMSRPConnect, TIpcArgs( &iConnectMSRPDataPckg ), aStatus ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
74 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
75 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
76 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
77 |
void RMSRPSession::ListenConnections( const TDesC8& aRemoteHost, |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
78 |
const TUint aRemotePort, |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
79 |
const TDesC8& aRemoteSessionID, |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
80 |
TBool aIsMessage, |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
81 |
TRequestStatus& aStatus ) |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
82 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
83 |
MSRPLOG("RMSRP Session.. Listen for incoming connections"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
84 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
85 |
iListenMSRPDataPckg().iRemoteHost = aRemoteHost; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
86 |
iListenMSRPDataPckg().iRemotePort = aRemotePort; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
87 |
iListenMSRPDataPckg().iRemoteSessionID = aRemoteSessionID; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
88 |
iListenMSRPDataPckg().iIsMessage = aIsMessage; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
89 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
90 |
SendReceive( EMSRPListenConnections, TIpcArgs( &iListenMSRPDataPckg ), aStatus ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
91 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
92 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
93 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
94 |
void RMSRPSession::ListenMessages( TBool aIsMessage, |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
95 |
TRequestStatus& aStatus ) |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
96 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
97 |
MSRPLOG("RMSRP Session.. Listen for incoming messages"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
98 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
99 |
iListenMSRPDataPckg().iIsMessage = aIsMessage; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
100 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
101 |
SendReceive( EMSRPListenMessages, TIpcArgs( &iListenMSRPDataPckg ), aStatus ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
102 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
103 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
104 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
105 |
void RMSRPSession::ListenSendResult( const TDesC8& aSessionID, TRequestStatus& aStatus ) |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
106 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
107 |
MSRPLOG("RMSRP Session.. ListenSendResult"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
108 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
109 |
iSendResultListenMSRPDataPckg().iSessionID = aSessionID; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
110 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
111 |
SendReceive( EMSRPListenSendResult, TIpcArgs( &iSendResultListenMSRPDataPckg ), aStatus ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
112 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
113 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
114 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
115 |
TInt RMSRPSession::SendMessage( TDesC8& aMessageBuffer ) |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
116 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
117 |
MSRPLOG("RMSRP Session.. SendMessage"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
118 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
119 |
iSendMSRPDataPckg().iExtMessageBuffer = aMessageBuffer; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
120 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
121 |
return SendReceive( EMSRPSendMessage, TIpcArgs( &iSendMSRPDataPckg ) ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
122 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
123 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
124 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
125 |
TInt RMSRPSession::CancelSending( TDesC8& aMessageId ) |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
126 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
127 |
MSRPLOG("RMSRP Session.. CancelSending"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
128 |
return SendReceive( EMSRPCancelSending, TIpcArgs( &aMessageId ) ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
129 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
130 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
131 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
132 |
void RMSRPSession::CancelReceiving( ) |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
133 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
134 |
MSRPLOG("RMSRP Session.. CancelReceiving Entered"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
135 |
SendReceive( EMSRPCancelReceiving ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
136 |
MSRPLOG("RMSRP Session.. CancelReceiving Done "); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
137 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
138 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
139 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
140 |
void RMSRPSession::CancelSendResultListening( ) |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
141 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
142 |
MSRPLOG("RMSRP Session.. CancelSendRespListening"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
143 |
SendReceive( EMSRPCancelSendRespListening ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
144 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
145 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
146 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
147 |
const TDesC8& RMSRPSession::GetMessageIdOfSentMessage() const |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
148 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
149 |
MSRPLOG("RMSRP Session.. GetMessageIdOfSentMessage"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
150 |
return iSendResultListenMSRPDataPckg().iMessageId; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
151 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
152 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
153 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
154 |
TInt RMSRPSession::GetStatusOfSentMessage() const |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
155 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
156 |
MSRPLOG("RMSRP Session.. GetStatusOfSentMessage"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
157 |
return iSendResultListenMSRPDataPckg().iStatus; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
158 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
159 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
160 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
161 |
TInt RMSRPSession::GetStatusOfReceivedMessage() const |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
162 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
163 |
MSRPLOG("RMSRP Session.. GetStatusOfReceivedMessage"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
164 |
return iListenMSRPDataPckg().iStatus; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
165 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
166 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
167 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
168 |
const TDesC8& RMSRPSession::GetReceivedMessage() const |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
169 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
170 |
MSRPLOG("RMSRP Session.. GetReceivedMessage"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
171 |
return iListenMSRPDataPckg().iExtMessageBuffer; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
172 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
173 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
174 |
TBool RMSRPSession::GetListenProgress() const |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
175 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
176 |
MSRPLOG("RMSRP Session.. GetListenProgress"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
177 |
return iListenMSRPDataPckg().iIsProgress; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
178 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
179 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
180 |
TInt RMSRPSession::GetBytesReceived() const |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
181 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
182 |
MSRPLOG("RMSRP Session.. GetBytesReceived"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
183 |
return iListenMSRPDataPckg().iBytesRecvd; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
184 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
185 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
186 |
TInt RMSRPSession::GetTotalBytesReceived() const |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
187 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
188 |
MSRPLOG("RMSRP Session.. GetTotalBytesReceived"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
189 |
return iListenMSRPDataPckg().iTotalBytes; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
190 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
191 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
192 |
TBool RMSRPSession::GetSendProgress() const |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
193 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
194 |
MSRPLOG("RMSRP Session.. GetSendProgress"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
195 |
return iSendResultListenMSRPDataPckg().iIsProgress; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
196 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
197 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
198 |
TInt RMSRPSession::GetBytesSent() const |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
199 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
200 |
MSRPLOG("RMSRP Session.. GetBytesSent"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
201 |
return iSendResultListenMSRPDataPckg().iBytesSent; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
202 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
203 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
204 |
TInt RMSRPSession::GetTotalBytes() const |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
205 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
206 |
MSRPLOG("RMSRP Session.. GetTotalBytes"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
207 |
return iSendResultListenMSRPDataPckg().iTotalBytes; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
208 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
209 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
210 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
211 |
TInt RMSRPSession::SendFileL(TDesC8& aFileParamBuffer) |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
212 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
213 |
/* Send File Params to the sub-session */ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
214 |
MSRPLOG("RMSRP Session.. SendFileParams"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
215 |
iSendMSRPDataPckg().iExtMessageBuffer = aFileParamBuffer; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
216 |
return SendReceive( EMSRPSendFile, TIpcArgs( &iSendMSRPDataPckg ) ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
217 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
218 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
219 |
TInt RMSRPSession::ReceiveFileL(TDesC8& aFileParamBuffer) |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
220 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
221 |
/* Send File Params to the sub-session */ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
222 |
MSRPLOG("RMSRP Session.. SendFileParams"); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
223 |
iSendMSRPDataPckg().iExtMessageBuffer = aFileParamBuffer; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
224 |
return SendReceive( EMSRPReceiveFile, TIpcArgs( &iSendMSRPDataPckg ) ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
225 |
} |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
226 |
#endif /* RMSRPSESSION_CPP_ */ |