/usr/share/idl/thunderbird/imIAccount.idl is in thunderbird-dev 1:52.8.0-1~deb8u1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
#include "prplIConversation.idl"
#include "imIUserStatusInfo.idl"
interface imITag;
interface imIBuddy;
interface prplIAccountBuddy;
interface imIAccount;
interface prplIAccount;
interface prplIProtocol;
interface purpleIProxyInfo;
interface nsIScriptError;
interface nsISSLStatus;
/*
* Used to join chat rooms.
*/
[scriptable, uuid(7e91accd-f04c-4787-9954-c7db4fb235fb)]
interface prplIChatRoomFieldValues: nsISupports {
AUTF8String getValue(in AUTF8String aIdentifier);
void setValue(in AUTF8String aIdentifier, in AUTF8String aValue);
};
[scriptable, uuid(19dff981-b125-4a70-bc1a-efc783d07137)]
interface prplIChatRoomField: nsISupports {
readonly attribute AUTF8String label;
readonly attribute AUTF8String identifier;
readonly attribute boolean required;
const short TYPE_TEXT = 0;
const short TYPE_PASSWORD = 1;
const short TYPE_INT = 2;
readonly attribute short type;
readonly attribute long min;
readonly attribute long max;
};
/*
* Information about a chat room and the fields required to join it.
*/
[scriptable, uuid(017d5951-fdd0-4f26-b697-fcc138cd2861)]
interface prplIRoomInfo: nsISupports {
readonly attribute AUTF8String name;
readonly attribute AUTF8String topic;
const long NO_PARTICIPANT_COUNT = -1;
readonly attribute long participantCount;
readonly attribute prplIChatRoomFieldValues chatRoomFieldValues;
};
/*
* Callback passed to an account's requestRoomInfo function.
*/
[scriptable, function, uuid(43102a36-883a-421d-a6ac-126aafee5a28)]
interface prplIRoomInfoCallback: nsISupports {
/* aRooms is an array of chatroom names. This will be called
* multiple times as batches of chat rooms are received. The number of rooms
* in each batch is left for the prplIAccount implementation to decide.
* aCompleted will be true when aRooms is the last batch.
*/
void onRoomInfoAvailable([array, size_is(aCount)] in wstring aRooms,
in boolean aCompleted,
in unsigned long aCount);
};
/*
* This interface should be implemented by the protocol plugin.
*/
[scriptable, uuid(3ce02a3c-f38b-4a1e-9050-a19bea1cb6c1)]
interface prplIAccount: nsISupports {
readonly attribute imIAccount imAccount;
// observe should only be called by the imIAccount
// implementation to report user status changes that affect this account.
void observe(in nsISupports aObj, in string aEvent,
[optional] in wstring aData);
// This should only be called by the imIAccountsService
// implementation, never directly. It will call
// imIContactsService.accountBuddyRemoved on each buddy of the
// account and close all prplIConversation instances of the account.
void remove();
/* Uninitialize the prplIAccount instance. This is typically done
automatically at shutdown (by the core service) or as part of
the 'remove' method. */
void unInit();
void connect();
void disconnect();
prplIConversation createConversation(in AUTF8String aName);
// Used when the user wants to add a buddy to the buddy list
void addBuddy(in imITag aTag, in AUTF8String aName);
// Used while loading the buddy list at startup.
prplIAccountBuddy loadBuddy(in imIBuddy aBuddy, in imITag aTag);
/* Request more info on a buddy (typically a chat buddy).
* The result (if any) will be provided by user-info-received
* notifications dispatched through the observer service:
* - aSubject will be an nsISimpleEnumerator of prplITooltipInfo.
* - aData will be aBuddyName.
* If multiple user-info-received are sent, subsequent notifications
* will update any previous data.
*/
void requestBuddyInfo(in AUTF8String aBuddyName);
readonly attribute boolean canJoinChat;
nsISimpleEnumerator getChatRoomFields();
prplIChatRoomFieldValues getChatRoomDefaultFieldValues([optional] in AUTF8String aDefaultChatName);
/* Request information on available chat rooms, whose names are returned
* via the callback.
*/
void requestRoomInfo(in prplIRoomInfoCallback aCallback);
prplIRoomInfo getRoomInfo(in AUTF8String aRoomName);
readonly attribute boolean isRoomInfoStale;
/*
* Create a new chat conversation if it doesn't already exist.
*/
void joinChat(in prplIChatRoomFieldValues aComponents);
// A name that can be used to check for duplicates and is the basis
// for the directory name for log storage.
readonly attribute AUTF8String normalizedName;
// Request that the account normalizes a name. Use this only when an object
// providing a normalizedName doesn't exist yet or isn't accessible.
AUTF8String normalize(in AUTF8String aName);
attribute purpleIProxyInfo proxyInfo;
// protocol specific options: those functions set the protocol
// specific options for the PurpleAccount
void setBool(in string aName, in boolean aVal);
void setInt(in string aName, in long aVal);
void setString(in string aName, in AUTF8String aVal);
/* When a connection error occurred, this value indicates the type of error */
readonly attribute short connectionErrorReason;
/* When a certificate error occurs, the host/port that caused a
* SSL/certificate error when connecting to it. This is only valid when
* connectionErrorReason is one of ERROR_CERT_*. */
readonly attribute AUTF8String connectionTarget;
/* When a certificate error occurs, the nsISSLStatus error of the socket. This
* should only be set when connectionTarget is set. */
readonly attribute nsISSLStatus sslStatus;
/* Possible connection error reasons:
ERROR_NETWORK_ERROR and ERROR_ENCRYPTION_ERROR are not fatal and
should enable the automatic reconnection feature. */
const short NO_ERROR = -1;
const short ERROR_NETWORK_ERROR = 0;
const short ERROR_INVALID_USERNAME = 1;
const short ERROR_AUTHENTICATION_FAILED = 2;
const short ERROR_AUTHENTICATION_IMPOSSIBLE = 3;
const short ERROR_NO_SSL_SUPPORT = 4;
const short ERROR_ENCRYPTION_ERROR = 5;
const short ERROR_NAME_IN_USE = 6;
const short ERROR_INVALID_SETTINGS = 7;
const short ERROR_CERT_NOT_PROVIDED = 8;
const short ERROR_CERT_UNTRUSTED = 9;
const short ERROR_CERT_EXPIRED = 10;
const short ERROR_CERT_NOT_ACTIVATED = 11;
const short ERROR_CERT_HOSTNAME_MISMATCH = 12;
const short ERROR_CERT_FINGERPRINT_MISMATCH = 13;
const short ERROR_CERT_SELF_SIGNED = 14;
const short ERROR_CERT_OTHER_ERROR = 15;
const short ERROR_OTHER_ERROR = 16;
/* From PurpleConnectionFlags */
// PURPLE_CONNECTION_HTML
// Connection sends/receives in 'HTML'.
readonly attribute boolean HTMLEnabled;
// libpurple expects messages to be HTML escaped even when HTML
// isn't enabled. Our js-prpls most likely don't want that behavior.
readonly attribute boolean HTMLEscapePlainText;
// PURPLE_CONNECTION_NO_BGCOLOR
// Connection does not send/receive background colors.
readonly attribute boolean noBackgroundColors;
// PURPLE_CONNECTION_AUTO_RESP
// Send auto responses when away.
readonly attribute boolean autoResponses;
// PURPLE_CONNECTION_FORMATTING_WBFO
// The text buffer must be formatted as a whole.
readonly attribute boolean singleFormatting;
// PURPLE_CONNECTION_NO_FONTSIZE
// Connection does not send/receive font sizes.
readonly attribute boolean noFontSizes;
// PURPLE_CONNECTION_NO_URLDESC
// Connection does not support descriptions with links.
readonly attribute boolean noUrlDesc;
// PURPLE_CONNECTION_NO_IMAGES
// Connection does not support sending of images.
readonly attribute boolean noImages;
};
[scriptable, uuid(488959b4-992e-4626-ae96-beaf6adc4a77)]
interface imIDebugMessage: nsISupports {
const short LEVEL_DEBUG = 1;
const short LEVEL_LOG = 2;
const short LEVEL_WARNING = 3;
const short LEVEL_ERROR = 4;
readonly attribute short logLevel; // One of the above constants.
readonly attribute nsIScriptError message;
};
/* This interface should be implemented by the im core. It inherits
from prplIAccount and in most cases will forward the calls for the
inherited members to a prplIAccount account instance implemented by
the protocol plugin. */
[scriptable, uuid(20a85b44-e220-4f23-85bf-f8523d1a2b08)]
interface imIAccount: prplIAccount {
/* Check if autologin is enabled for this account, connect it now. */
void checkAutoLogin();
/* Cancel the timer that automatically reconnects the account if it was
disconnected because of a non fatal error. */
void cancelReconnection();
readonly attribute AUTF8String name;
readonly attribute AUTF8String id;
readonly attribute unsigned long numericId;
readonly attribute prplIProtocol protocol;
readonly attribute prplIAccount prplAccount;
// Save account specific preferences to disk.
void save();
attribute boolean autoLogin;
/* This is the value when the preference firstConnectionState is not set.
It indicates that the account has already been successfully connected at
least once with the current parameters. */
const short FIRST_CONNECTION_OK = 0;
/* Set when the account has never had a successful connection
with the current parameters */
const short FIRST_CONNECTION_UNKNOWN = 1;
/* Set when the account is trying to connect for the first time
with the current parameters (removed after a successsful connection) */
const short FIRST_CONNECTION_PENDING = 2;
/* Set at startup when the previous state was pending */
const short FIRST_CONNECTION_CRASHED = 4;
attribute short firstConnectionState;
/* Passwords are stored in the toolkit Password Manager.
* Warning: Don't attempt to access passwords during startup before
* Services.login.initializationPromise has resolved.
*/
attribute AUTF8String password;
attribute AUTF8String alias;
/* While an account is connecting, this attribute contains a message
indicating the current step of the connection */
readonly attribute AUTF8String connectionStateMsg;
/* Number of the reconnection attempt
* 0 means that no automatic reconnection currently pending
* n means the nth reconnection attempt is pending
*/
readonly attribute unsigned short reconnectAttempt;
/* Time stamp of the next reconnection attempt */
readonly attribute long long timeOfNextReconnect;
/* Time stamp of the last connection (value not reliable if not connected) */
readonly attribute long long timeOfLastConnect;
/* Additional possible connection error reasons:
* (Use a big enough number that it can't conflict with error
* codes used in prplIAccount).
*/
const short ERROR_UNKNOWN_PRPL = 42;
const short ERROR_CRASHED = 43;
const short ERROR_MISSING_PASSWORD = 44;
/* A message describing the connection error */
readonly attribute AUTF8String connectionErrorMessage;
/* Info about the connection state and flags */
const short STATE_DISCONNECTED = 0;
const short STATE_CONNECTED = 1;
const short STATE_CONNECTING = 2;
const short STATE_DISCONNECTING = 3;
readonly attribute short connectionState;
/* The following 4 properties use the above connectionState value. */
readonly attribute boolean disconnected;
readonly attribute boolean connected;
readonly attribute boolean connecting;
readonly attribute boolean disconnecting;
void logDebugMessage(in nsIScriptError aMessage, in short aLevel);
/* Get an array of the 50 most recent debug messages. */
void getDebugMessages([optional] out unsigned long aCount,
[retval, array, size_is(aCount)] out imIDebugMessage aMessages);
/* The imIUserStatusInfo instance this account should observe for
status changes. When this is null (the default value), the
account will observe the global status. */
attribute imIUserStatusInfo observedStatusInfo;
// Same as above, but never null (it fallbacks to the global status info).
attribute imIUserStatusInfo statusInfo;
// imIAccount also implements an observe method but this
// observe should only be called by the prplIAccount
// implementations to report connection status changes.
};
|