51
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Interface for IM protocol messaging object.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef MPROTOCOLIMCONVERSATION_H
|
|
19 |
#define MPROTOCOLIMCONVERSATION_H
|
|
20 |
|
|
21 |
|
|
22 |
#include <e32std.h>
|
|
23 |
#include <badesca.h>
|
|
24 |
#include <ximpbase.h>
|
|
25 |
#include <improtocolpluginifids.hrh>
|
|
26 |
|
|
27 |
|
|
28 |
class MXIMPIdentity;
|
|
29 |
class MImConversationInfo;
|
|
30 |
/**
|
|
31 |
* Interface for IM protocol message handling object.
|
|
32 |
* Interface must be implemented by a IM protocol
|
|
33 |
* plug-ins.
|
|
34 |
*
|
|
35 |
* This interface defines actions that IM
|
|
36 |
* requests from a IM protocol connection to
|
|
37 |
* execute conversation related tasks.
|
|
38 |
*
|
|
39 |
* Protocol implementation must route requests received through
|
|
40 |
* this interface, to same remote IM service destination,
|
|
41 |
* as where the parent MXIMPProtocolConnection is connected.
|
|
42 |
* (Here the parent MXIMPProtocolConnection means the protocol
|
|
43 |
* connection instance from where this interface instance
|
|
44 |
* was retrieved.)
|
|
45 |
*
|
|
46 |
* @see MXIMPProtocolConnection
|
|
47 |
* @ingroup Improtocolpluginapi
|
|
48 |
*
|
|
49 |
*/
|
|
50 |
class MProtocolImConversation : public MXIMPBase
|
|
51 |
{
|
|
52 |
public:
|
|
53 |
|
|
54 |
/** Interface ID for the MProtocolImConversation. */
|
|
55 |
enum { KInterfaceId = IM_IF_ID_PROTOCOL_CONVERSATION };
|
|
56 |
|
|
57 |
|
|
58 |
protected:
|
|
59 |
|
|
60 |
/**
|
|
61 |
* Protected destructor. MProtocolImConversation
|
|
62 |
* instancies can't be destroyed via this interface.
|
|
63 |
*/
|
|
64 |
virtual inline ~MProtocolImConversation() {};
|
|
65 |
|
|
66 |
public:
|
|
67 |
/**
|
|
68 |
* Request the protocol to send a message.
|
|
69 |
*
|
|
70 |
* @param [in] aImMessage - Identification and content of the message.
|
|
71 |
* MImConversationInfo contains messageid, contenttype - text/content, content,.......
|
|
72 |
* @param [in] aRecipients - Recipients userid.
|
|
73 |
* @param [in] aReqId
|
|
74 |
* Request id identifying the issued request.
|
|
75 |
*
|
|
76 |
* /b Note: Possible error conditions
|
|
77 |
* /n 1. Invalid User-ID/Recipient user does not exist [KImApiErrInvalidUserId].
|
|
78 |
* /n 2. Recipient user blocked the sender [KImApiErrSenderBlocked].
|
|
79 |
* /n 3. Unsupported message context [KImErrUnsupportedContext].
|
|
80 |
* /n 4. Message queue full [KImErrTooManyIM].
|
|
81 |
*/
|
|
82 |
virtual void DoSendMessageL( const MImConversationInfo& aImMessage,TXIMPRequestId aReqId )= 0;
|
|
83 |
|
|
84 |
/**
|
|
85 |
* Request the protocol to forward a message with binary content.
|
|
86 |
* Forward message to user(s)
|
|
87 |
*
|
|
88 |
* @param [in] aImMessage - Identification and content of the message.
|
|
89 |
* MImConversationInfo contains messageid, contenttype - text/content, content,.......
|
|
90 |
* @param [in] aRecipients - Recipients userid.
|
|
91 |
* @param [in] aReqId
|
|
92 |
* Request id identifying the issued request.
|
|
93 |
*
|
|
94 |
* /b Note: Possible error conditions
|
|
95 |
* /n 1. Invalid user-id/recipient user does not exist [KImApiErrInvalidUserId].
|
|
96 |
* /n 2. Recipient user blocked the sender [KImApiErrSenderBlocked].
|
|
97 |
* /n 3. Unsupported message context [KImErrUnsupportedContext].
|
|
98 |
* /n 4. Message queue full [KImErrTooManyIM].
|
|
99 |
*/
|
|
100 |
virtual void DoForwardMessageL( const MImConversationInfo& aImMessage,TXIMPRequestId aReqId) = 0;
|
|
101 |
|
|
102 |
|
|
103 |
/**
|
|
104 |
* Request the protocol to send message to group.
|
|
105 |
*
|
|
106 |
* @param [in] aImMessage - Identification and content of the message.
|
|
107 |
* MImConversationInfo contains messageid, contenttype - text/content, content,.......
|
|
108 |
* @param [in] aUserIds - Recipients userid.
|
|
109 |
* @param [in] aReqId
|
|
110 |
* Request id identifying the issued request.
|
|
111 |
*
|
|
112 |
* /b Note: Possible error conditions
|
|
113 |
* /n 1. Invalid user-id/recipient user does not exist [KImApiErrInvalidUserId].
|
|
114 |
* /n 2. Recipient user blocked the sender [KImApiErrSenderBlocked].
|
|
115 |
* /n 3. Unsupported message context [KImErrUnsupportedContext].
|
|
116 |
* /n 4. Message queue full [KImErrTooManyIM].
|
|
117 |
*/
|
|
118 |
virtual void DoSendMessageToGroupL( const MImConversationInfo& aImMessage,
|
|
119 |
const TDesC* aGroupId,TXIMPRequestId aReqId ) = 0;
|
|
120 |
|
|
121 |
/**
|
|
122 |
* Request the protocol to block user(s).
|
|
123 |
*
|
|
124 |
* @param [in] aUserIds - User id's need to be blocked
|
|
125 |
* @param [in] aReqId
|
|
126 |
* Request ID identifying the issued request.
|
|
127 |
*
|
|
128 |
* /b Note: Possible error conditions
|
|
129 |
* /n 1. UserId doesn't exist [KImErrServiceGeneralError].
|
|
130 |
* /n 2. The maximum number of users reached for the user in the list [KImErrTooManyUsers].
|
|
131 |
*/
|
|
132 |
virtual TXIMPRequestId DoBlockUsersL(const MDesCArray* aUserIds ,TXIMPRequestId aReqId) = 0;
|
|
133 |
/**
|
|
134 |
* Request the protocol to UnBlock User(s).
|
|
135 |
*
|
|
136 |
* @param [in] aUserIds - User id's need to be unblocked
|
|
137 |
* @param [in] aReqId
|
|
138 |
* Request id identifying the issued request.
|
|
139 |
*
|
|
140 |
* /b Note: Possible error conditions
|
|
141 |
* /n 1. UserId doesn't exist [KImErrServiceGeneralError].
|
|
142 |
* /n 2. The maximum number of users reached for the user in the list [KImErrTooManyUsers].
|
|
143 |
*/
|
|
144 |
virtual TXIMPRequestId DoUnBlockUsersL(const MDesCArray* aUserIds,TXIMPRequestId aReqId ) = 0;
|
|
145 |
|
|
146 |
/**
|
|
147 |
* Request the protocol to get blocked users list from server
|
|
148 |
*
|
|
149 |
* @param [in] aImMessageId Identification for IM.
|
|
150 |
* @param [in] aReqId
|
|
151 |
* Request id identifying the issued request.
|
|
152 |
*
|
|
153 |
* /b Note: Possible error conditions
|
|
154 |
* /n 1. No block list in use [KImErrServiceGeneralError].
|
|
155 |
*/
|
|
156 |
virtual void DoGetBlockedListRequestL( const MXIMPIdentity& aImMessageId,
|
|
157 |
TXIMPRequestId aReqId ) = 0;
|
|
158 |
|
|
159 |
|
|
160 |
/**
|
|
161 |
* Request the protocol to retrieve the message-info structures of the undelivered instant messages.
|
|
162 |
* May use the retrieved Message-Info structures to inform the user about the new messages, or it May
|
|
163 |
* retrieve/reject/forward the instant messages automatically.
|
|
164 |
*
|
|
165 |
* @param [in] aImMessageId Identification for IM.
|
|
166 |
* @param [in] aGroupId Identifies the group to retrieve history.
|
|
167 |
* @param [in] aMessageCount The maximum number of message-info structures to be returned.
|
|
168 |
* @param [in] aDeliveryReportWanted If the user wats to order delivery report.
|
|
169 |
* @param [in] aReqId
|
|
170 |
* Request id identifying the issued request.
|
|
171 |
|
|
172 |
* /b Note: Possible error conditions
|
|
173 |
* /n 1. Invalid group id [KImErrUnknownIMGroup].
|
|
174 |
*/
|
|
175 |
virtual void DoGetMessageListL( const MXIMPIdentity& aImMessageId,
|
|
176 |
const TDesC* aGroupId,
|
|
177 |
const TInt aMessageCount,
|
|
178 |
TBool aDeliveryReportWanted,
|
|
179 |
TXIMPRequestId aReqId) = 0;
|
|
180 |
|
|
181 |
/**
|
|
182 |
* Request the protocol to reject the accumulated messages in the server.
|
|
183 |
*
|
|
184 |
* @param [in] aImMessageId Identification for IM.
|
|
185 |
* @param [in] aMessageID Identifies the messages to be removed
|
|
186 |
* @param [in] aReqId
|
|
187 |
* Request id identifying the issued request.
|
|
188 |
*
|
|
189 |
* /b Note: Possible error conditions
|
|
190 |
* /n 1. Invalid message-id [KImErrFieldValueNotSupported].
|
|
191 |
*/
|
|
192 |
virtual void DoRejectMessageL( const MXIMPIdentity& aImMessageId,
|
|
193 |
const TDesC& aMessageID,
|
|
194 |
TXIMPRequestId aReqId ) = 0;
|
|
195 |
|
|
196 |
|
|
197 |
};
|
|
198 |
|
|
199 |
|
|
200 |
|
|
201 |
#endif // MPROTOCOLIMCONVERSATION_H
|