2 gwerror.h - Kopete Groupwise Protocol
4 Copyright (c) 2004-2007 Novell, Inc http://www.novell.com/linux
5 Copyright (c) 2004 SUSE Linux AG http://www.suse.com
7 Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
9 *************************************************************************
11 * This library is free software; you can redistribute it and/or *
12 * modify it under the terms of the GNU Lesser General Public *
13 * License as published by the Free Software Foundation; either *
14 * version 2 of the License, or (at your option) any later version. *
16 *************************************************************************
22 #include <qdatetime.h>
27 #include "libgroupwise_export.h"
28 typedef quint16 NMERR_T
;
29 #define GROUPWISE_DEBUG_GLOBAL 14190
30 #define GROUPWISE_DEBUG_LIBGW 14191
31 #define GROUPWISE_DEBUG_RAW 14192
33 #define BLANK_GUID "[00000000-00000000-00000000-0000-0000]"
34 #define CONF_GUID_END 27
37 #define LIBGW_USE_KDEBUG 1
41 enum Status
{ Unknown
= 0,
50 enum Error
{ None
= 0,
58 ConferenceNotInstantiated
,
62 enum Event
{ InvalidRecipient
= 101,
63 UndeliverableStatus
= 102,
66 ConferenceClosed
= 105,
67 ConferenceJoined
= 106,
74 ServerDisconnect
= 115,
75 ConferenceRename
= 116,
76 ConferenceInvite
= 117,
77 ConferenceInviteNotify
= 118,
78 ConferenceReject
= 119,
79 ReceiveAutoReply
= 121,
80 Start
= InvalidRecipient
,
81 /* Event codes >= 122 are new in GW7 protocol */
82 ReceivedBroadcast
= 122,
83 ReceivedSystemBroadcast
= 123,
84 ConferenceAttribUpdate
= 128,
85 ConferenceTopicChanged
= 129,
86 ChatroomNameChanged
= 130,
87 ConferenceRightsChanged
= 131,
88 ConferenceRemoved
= 132, /* you were kicked */
89 ChatOwnerChanged
= 133,
90 Stop
= ChatOwnerChanged
94 enum ConferenceFlags
{ Logging
= 0x00000001,
99 QString LIBGROUPWISE_EXPORT
errorCodeToString( int errorCode
);
101 // helpful structs used to pass data between the client library and the application using it
102 class LIBGROUPWISE_EXPORT ConferenceGuid
: public QString
106 ConferenceGuid( const QString
& string
);
110 bool LIBGROUPWISE_EXPORT
operator==( const ConferenceGuid
& g1
, const ConferenceGuid
& g2
);
111 bool LIBGROUPWISE_EXPORT
operator==( const QString
& s
, const ConferenceGuid
& g
);
112 bool LIBGROUPWISE_EXPORT
operator==( const ConferenceGuid
& g
, const QString
& s
);
114 struct ConferenceEvent
124 struct LIBGROUPWISE_EXPORT FolderItem
143 struct ContactDetails
154 QMap
< QString
, QVariant
> properties
;
157 struct OutgoingMessage
164 struct UserSearchQueryTerm
173 GroupWise::Status status
;
179 // temporary typedef pending implementation
181 // #define NMERR_BASE 0x2000L
183 // #define NMERR_BAD_PARM (NMERR_BASE + 0x0001)
184 // #define NMERR_TCP_WRITE (NMERR_BASE + 0x0002)
185 // #define NMERR_TCP_READ (NMERR_BASE + 0x0003)
186 // #define NMERR_PROTOCOL (NMERR_BASE + 0x0004)
187 // #define NMERR_SERVER_REDIRECT (NMERR_BASE + 0x0005)
188 // #define NMERR_CONFERENCE_NOT_FOUND (NMERR_BASE + 0x0006)
189 // #define NMERR_CONFERENCE_NOT_INSTANTIATED (NMERR_BASE + 0x0007)
190 // #define NMERR_FOLDER_EXISTS (NMERR_BASE + 0x0008)
192 /* Errors that are returned from the server */
193 #define NMERR_SERVER_BASE 0xD100L
194 #define NMERR_ACCESS_DENIED (NMERR_SERVER_BASE + 0x0006)
195 #define NMERR_NOT_SUPPORTED (NMERR_SERVER_BASE + 0x000A)
196 #define NMERR_PASSWORD_EXPIRED (NMERR_SERVER_BASE + 0x000B)
197 #define NMERR_PASSWORD_INVALID (NMERR_SERVER_BASE + 0x000C)
198 #define NMERR_USER_NOT_FOUND (NMERR_SERVER_BASE + 0x000D)
199 #define NMERR_ATTRIBUTE_NOT_FOUND (NMERR_SERVER_BASE + 0x000E)
200 #define NMERR_USER_DISABLED (NMERR_SERVER_BASE + 0x0010)
201 #define NMERR_DIRECTORY_FAILURE (NMERR_SERVER_BASE + 0x0011)
202 #define NMERR_HOST_NOT_FOUND (NMERR_SERVER_BASE + 0x0019)
203 #define NMERR_ADMIN_LOCKED (NMERR_SERVER_BASE + 0x001C)
204 #define NMERR_DUPLICATE_PARTICIPANT (NMERR_SERVER_BASE + 0x001F)
205 #define NMERR_SERVER_BUSY (NMERR_SERVER_BASE + 0x0023)
206 #define NMERR_OBJECT_NOT_FOUND (NMERR_SERVER_BASE + 0x0024)
207 #define NMERR_DIRECTORY_UPDATE (NMERR_SERVER_BASE + 0x0025)
208 #define NMERR_DUPLICATE_FOLDER (NMERR_SERVER_BASE + 0x0026)
209 #define NMERR_DUPLICATE_CONTACT (NMERR_SERVER_BASE + 0x0027)
210 #define NMERR_USER_NOT_ALLOWED (NMERR_SERVER_BASE + 0x0028)
211 #define NMERR_TOO_MANY_CONTACTS (NMERR_SERVER_BASE + 0x0029)
212 #define NMERR_CONFERENCE_NOT_FOUND_2 (NMERR_SERVER_BASE + 0x002B)
213 #define NMERR_TOO_MANY_FOLDERS (NMERR_SERVER_BASE + 0x002C)
214 #define NMERR_SERVER_PROTOCOL (NMERR_SERVER_BASE + 0x0030)
215 #define NMERR_CONVERSATION_INVITE (NMERR_SERVER_BASE + 0x0035)
216 #define NMERR_USER_BLOCKED (NMERR_SERVER_BASE + 0x0039)
217 #define NMERR_MASTER_ARCHIVE_MISSING (NMERR_SERVER_BASE + 0x003A)
218 #define NMERR_PASSWORD_EXPIRED_2 (NMERR_SERVER_BASE + 0x0042)
219 #define NMERR_CREDENTIALS_MISSING (NMERR_SERVER_BASE + 0x0046)
220 #define NMERR_AUTHENTICATION_FAILED (NMERR_SERVER_BASE + 0x0049)
221 #define NMERR_EVAL_CONNECTION_LIMIT (NMERR_SERVER_BASE + 0x004A)
223 /* Error codes that are new in GW7 */
224 #define MSGPRES_ERR_UNSUPPORTED_CLIENT_VERSION (NMERR_SERVER_BASE + 0x004B) // This version of the client is not supported.
225 #define MSGPRES_ERR_DUPLICATE_CHAT (NMERR_SERVER_BASE + 0x0051) // A duplicate chat was found.
226 #define MSGPRES_ERR_CHAT_NOT_FOUND (NMERR_SERVER_BASE + 0x0052) // The chat was not found.
227 #define MSGPRES_ERR_INVALID_NAME (NMERR_SERVER_BASE + 0x0053) // The chat name is not valid.
228 #define MSGPRES_ERR_CHAT_ACTIVE (NMERR_SERVER_BASE + 0x0054) // Cannot delete an active chat.
229 #define MSGPRES_ERR_INSUF_CONV_RIGHTS (NMERR_SERVER_BASE + 0x0055) // Insufficient conversation rights to perform an action.
230 #define MSGPRES_ERR_CHAT_BUSY (NMERR_SERVER_BASE + 0x0056) // Chat is busy; try again.
231 #define MSGPRES_ERR_REQUEST_TOO_SOON (NMERR_SERVER_BASE + 0x0057) // Tried a request too soon after another one; try again.
232 #define MSGPRES_INFO_NO_LIST_CHANGE (NMERR_SERVER_BASE + 0x0058) // The chat list has not changed since the last search.
233 #define MSGPRES_ERR_CHAT_NOT_ACTIVE (NMERR_SERVER_BASE + 0x0059) // The chat subsystem is not active!
234 #define MSGPRES_ERR_INVALID_CHAT_UPDATE (NMERR_SERVER_BASE + 0x005A) // The chat update request is invalid.
235 #define MSGPRES_ERR_DIRECTORY_MISMATCH (NMERR_SERVER_BASE + 0x005B) // Write failed due to directory mismatch.
236 #define MSGPRES_ERR_RECIPIENT_TOO_OLD (NMERR_SERVER_BASE + 0x005C) // The recipient's client version is too old.
237 #define MSGPRES_ERR_CHAT_NO_LONGER_VALID (NMERR_SERVER_BASE + 0x005D) // The chat has been removed from the server.
239 /* protocol version capabilities */
240 #define CMSGPRES_GW_6_5 2
241 #define CMSGPRES_SUPPORTS_NO_DETAILS_ON_LOGIN 3
242 #define CMSGPRES_SUPPORTS_BROADCAST 4
243 #define CMSGPRES_SUPPORTS_CHAT 5