21 #include "MsrpCommon.h" |
21 #include "MsrpCommon.h" |
22 |
22 |
23 // FORWARD DECLARATIONS |
23 // FORWARD DECLARATIONS |
24 class CMSRPMessage; |
24 class CMSRPMessage; |
25 |
25 |
26 |
|
27 class MMSRPSessionObserver |
26 class MMSRPSessionObserver |
28 { |
27 { |
29 public: |
28 public: |
30 |
29 |
31 /** |
30 /** |
32 * An MSRP SEND request has been received from the network. |
31 * An MSRP message has been received from the network. |
33 * The content of the request is given to the client, along with the |
32 * The content of the request is given to the client, along with the |
34 * status of receiving the request. Ownership of the content is transferred. |
33 * status of receiving the request. Ownership of the content is transferred. |
35 * @param aMessageContent the received message content |
34 * This method is used to give smaller messages to the clients in buffer |
|
35 * @param aMessageContent the received message content, ownership is transferred |
|
36 * @param aMimeType mimetype of the received data, ownership is transferred |
36 * @param aStatus KErrNone with complete message, KErrCancel if terminated |
37 * @param aStatus KErrNone with complete message, KErrCancel if terminated |
37 */ |
38 */ |
38 virtual void IncomingMessage( HBufC8* aMessageContent, TInt aStatus ) = 0; |
39 virtual void IncomingMessageInBuffer( HBufC8* aMessageContent, HBufC8* aMimeType, TInt aStatus ) = 0; |
|
40 |
|
41 /** |
|
42 * An MSRP message has been received from the network. |
|
43 * The content of the request is given to the client, along with the |
|
44 * status of receiving the request. |
|
45 * Note: the file is a temporary file which should be moved/renamed to correct |
|
46 * location. |
|
47 * @param aFileName file name and path of the received file |
|
48 * @param aMimeType mimetype of the received file, ownership is transferred |
|
49 * @param aStatus KErrNone with complete message, KErrCancel if terminated |
|
50 */ |
|
51 virtual void IncomingMessageInFile( TFileName& aFileName, HBufC8* aMimeType, TInt aStatus ) = 0; |
39 |
52 |
40 /** |
53 /** |
41 * An MSRP REPORT request has been received from the network. |
54 * An MSRP REPORT request has been received from the network. |
42 * This function is called to notify the client that a recipient wishes |
55 * This function is called to notify the client that a recipient wishes |
43 * to indicate a range of bytes as received, or to indicate an error. |
56 * to indicate a range of bytes as received, or to indicate an error. |
51 virtual void IncomingReport( TInt aStatus, TInt aRangeStart, |
64 virtual void IncomingReport( TInt aStatus, TInt aRangeStart, |
52 TInt aRangeEnd, TInt aTotal ) = 0; |
65 TInt aRangeEnd, TInt aTotal ) = 0; |
53 |
66 |
54 /** |
67 /** |
55 * Result of the send operation initiated by the client |
68 * Result of the send operation initiated by the client |
56 * @param aStatus error code as defined in MsrpCommon::TErrorCode |
69 * @param aStatus error code as defined in MsrpCommon.h, TMSRPRequests |
|
70 * or system-wide error code |
57 * @param aMessageId message identifier of the sent message that |
71 * @param aMessageId message identifier of the sent message that |
58 * was returned by the SendBuffer call |
72 * was returned by the SendBuffer call |
59 */ |
73 */ |
60 virtual void SendResult( TInt aStatus, const TDesC8& aMessageid ) = 0; |
74 virtual void SendResult( TInt aStatus, const TDesC8& aMessageid ) = 0; |
61 |
|
62 /** |
|
63 * Indicates a failure in connection establishment |
|
64 * or in case of any error in an established connection |
|
65 * @param aStatus a system wide error code |
|
66 */ |
|
67 virtual void ListenPortFailure( TInt aStatus ) = 0; |
|
68 |
75 |
69 /** |
76 /** |
70 * Result of the connection attempt made by the client. This callback is |
77 * Result of the connection attempt made by the client. This callback is |
71 * issued, both while initiating a connection with ConnectL and while |
78 * issued, both while initiating a connection with ConnectL and while |
72 * receiving a connection with ListenL, once the call completes. |
79 * receiving a connection with ListenL, once the call completes. |
73 * Client must wait for this callback before trying to send out any |
80 * Client must wait for this callback before trying to send out any |
74 * messages to the remote user. |
81 * messages to the remote user. |
75 * @param aStatus KErrNone or a system wide error code |
82 * @param aStatus KErrNone or a system wide error code |
76 */ |
83 */ |
77 virtual void ConnectStatus( TInt aStatus ) = 0; |
84 virtual void ConnectStatus( TInt aStatus ) = 0; |
78 |
85 |
79 /** |
86 /** |
80 * Notifies that the entire file has been sent successfully |
87 * Data transfer progress. returns the progress of data transfer |
81 */ |
88 * @param aMessageId message identifier of the data to be sent |
82 virtual void SendFileNotification(TBool aStatus) = 0; |
|
83 |
|
84 /** |
|
85 * Notifies that the entire file has been received successfully |
|
86 */ |
|
87 virtual void ReceiveFileNotification(TBool status) = 0; |
|
88 |
|
89 /** |
|
90 * File data transfer progress. returns the progress of data transfer |
|
91 * @param aTransferred number of bytes transferred |
89 * @param aTransferred number of bytes transferred |
92 * @param aTotal Total amount of bytes to be transferred |
90 * @param aTotal Total amount of bytes to be transferred |
93 */ |
91 */ |
94 virtual void FileSendProgress( TInt aTransferred, TInt aTotal ) = 0; |
92 virtual void SendProgress( const TDesC8& aMessageid, TInt aTransferred, TInt aTotal ) = 0; |
95 |
93 |
96 /** |
94 /** |
97 * File receive progress, number of bytes received from incoming data |
95 * Data receive progress, number of bytes received from incoming data |
|
96 * @param aMessageId message identifier of the data to be received |
98 * @param aReceived number of bytes received |
97 * @param aReceived number of bytes received |
99 * @param aTotal Total amount of bytes to be received |
98 * @param aTotal Total amount of bytes to be received |
100 */ |
99 */ |
101 virtual void FileReceiveProgress( TInt aReceived, TInt aTotal ) = 0; |
100 virtual void ReceiveProgress( const TDesC8& aMessageid, TInt aReceived, TInt aTotal ) = 0; |
102 |
|
103 }; |
101 }; |
104 |
102 |
105 #endif /* MMSRPSESSIONOBSERVER_H_ */ |
103 #endif /* MMSRPSESSIONOBSERVER_H_ */ |