Stop using NSPR types for integers in chat/ idl files.
authorFlorian Quèze <>
Mon, 30 Jan 2012 17:01:55 +0100
changeset 18532 08230f5588302df76dd59025bef31122e8ebd78a
parent 18531 198c9ae2f845e6befd27322346d1d179507a1811
child 18533 895dd034c3dd159f46a09c8b61ce5b88a74d17a7
push idunknown
push userunknown
push dateunknown
Stop using NSPR types for integers in chat/ idl files.
--- a/chat/components/public/imIAccount.idl
+++ b/chat/components/public/imIAccount.idl
@@ -191,17 +191,17 @@ interface prplIAccount: nsISupports {
   //    Connection does not support descriptions with links.
   readonly attribute boolean noUrlDesc;
   //    Connection does not support sending of images.
   readonly attribute boolean noImages;
   // This is currently used only by Twitter.
-  readonly attribute PRInt32 maxMessageLength;
+  readonly attribute long maxMessageLength;
 /* 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 {
@@ -212,17 +212,17 @@ interface imIAccount: prplIAccount {
   void remove();
   /* 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 PRUint32 numericId;
+  readonly attribute unsigned long numericId;
   readonly attribute prplIProtocol protocol;
   readonly attribute prplIAccount prplAccount;
   // Save account specific preferences to disk.
   void save();
   attribute boolean autoLogin;
@@ -249,23 +249,23 @@ interface imIAccount: prplIAccount {
   /* 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 PRUint16 reconnectAttempt;
+  readonly attribute unsigned short reconnectAttempt;
   /* Time stamp of the next reconnection attempt */
-  readonly attribute PRInt64 timeOfNextReconnect;
+  readonly attribute long long timeOfNextReconnect;
   /* Time stamp of the last connection (value not reliable if not connected) */
-  readonly attribute PRInt64 timeOfLastConnect;
+  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/chat/components/public/imIAccountsService.idl
+++ b/chat/components/public/imIAccountsService.idl
@@ -63,17 +63,17 @@ interface imIAccountsService: nsISupport
        - if the autologin was disabled at startup
        - after a loss of internet connectivity that disconnected all accounts.
   void processAutoLogin();
   imIAccount getAccountById(in AUTF8String aAccountId);
   /* will throw NS_ERROR_FAILURE if not found */
-  imIAccount getAccountByNumericId(in PRUint32 aAccountId);
+  imIAccount getAccountByNumericId(in unsigned long aAccountId);
   nsISimpleEnumerator getAccounts();
   /* will fire the event account-added */
   imIAccount createAccount(in AUTF8String aName, in AUTF8String aPrpl);
   /* will fire the event account-removed */
   void deleteAccount(in AUTF8String aAccountId);
--- a/chat/components/public/imICommandsService.idl
+++ b/chat/components/public/imICommandsService.idl
@@ -47,28 +47,28 @@ interface imICommand: nsISupports {
   // Example: "help &lt;name&gt;: show the help message for the &lt;name&gt;
   //           command, or the list of possible commands when used without
   //           parameter."
   readonly attribute AUTF8String helpString;
   const short CONTEXT_IM   = 1;
   const short CONTEXT_CHAT = 2;
-  readonly attribute PRInt32 usageContext;
+  readonly attribute long usageContext;
   const short PRIORITY_LOW     = -1000;
   const short PRIORITY_DEFAULT = 0;
   const short PRIORITY_PRPL    = 1000;
   const short PRIORITY_HIGH    = 4000;
   // Any integer value is usable as a priority.
   //    0 is the default priority.
   //  < 0 is lower priority.
   //  > 0 is higher priority.
   // Commands registered by protocol plugins will usually use PRIORITY_PRPL.
-  readonly attribute PRInt32 priority;
+  readonly attribute long priority;
   // Will return true if the command handled the message (it should not be sent).
   // The leading slash, the command name and the following space are not included
   // in the aMessage parameter.
   boolean run(in AUTF8String aMessage,
               [optional] in prplIConversation aConversation);
--- a/chat/components/public/imIContactsService.idl
+++ b/chat/components/public/imIContactsService.idl
@@ -69,22 +69,22 @@ interface imIContactsService: nsISupport
   // to keep the accounts table in sync with accounts stored in the
   // preferences.
   // Called when an account is created or loaded to store the new
   // account or ensure it doesn't conflict with an existing account
   // (to detect database corruption).
   // Will throw if a stored account has the id aId but a different
   // username or prplId.
-  void storeAccount(in PRUint32 aId, in AUTF8String aUserName,
+  void storeAccount(in unsigned long aId, in AUTF8String aUserName,
                     in AUTF8String aPrplId);
   // Check if an account id already exists in the database.
-  boolean accountIdExists(in PRUint32 aId);
+  boolean accountIdExists(in unsigned long aId);
   // Called when deleting an account to remove it from blist.sqlite.
-  void forgetAccount(in PRUint32 aId);
+  void forgetAccount(in unsigned long aId);
 [scriptable, uuid(f585b0df-f6ad-40d5-9de4-c58b14af13e4)]
 interface imIContact: imIStatusInfo {
   // The id will be positive if the contact is real (stored in the
   // SQLite database) and negative if the instance is a dummy contact
   // holding only a single buddy without aliases or additional tags.
   readonly attribute long id;
--- a/chat/components/public/imIConversationsService.idl
+++ b/chat/components/public/imIConversationsService.idl
@@ -48,23 +48,23 @@ interface imIConversation: prplIConversa
   // Write a system message into the conversation.
   // Note: this will not be logged.
   void systemMessage(in AUTF8String aMessage, [optional] in boolean aIsError);
   attribute prplIConversation target;
   // Number of unread messages (all messages, including system
   // messages are counted).
-  readonly attribute PRUint32 unreadMessageCount;
+  readonly attribute unsigned long unreadMessageCount;
   // Number of unread incoming messages targeted at the user (= IMs or
   // message containing the user's nick in MUCs).
-  readonly attribute PRUint32 unreadTargetedMessageCount;
+  readonly attribute unsigned long unreadTargetedMessageCount;
   // Number of unread incoming messages (both targeted and untargeted
   // messages are counted).
-  readonly attribute PRUint32 unreadIncomingMessageCount;
+  readonly attribute unsigned long unreadIncomingMessageCount;
   // Reset all unread message counts.
   void markAsRead();
   // Call this to give the core an opportunity to close an inactive
   // conversation.  If the conversation is a left MUC or an IM
   // conversation without unread message, the implementation will call
   // close().
   // The returned value indicates if the conversation was closed.
--- a/chat/components/public/prplIMessage.idl
+++ b/chat/components/public/prplIMessage.idl
@@ -51,17 +51,17 @@ interface prplIMessageAction: nsIRunnabl
   readonly attribute ACString label;
 [scriptable, uuid(d9f0ca7f-ee59-4657-a3dd-f458c204ca45)]
 interface prplIMessage: nsISupports {
   /* The uniqueness of the message id is only guaranteed across
      messages of a conversation, not across all messages created
      during the execution of the application. */
-  readonly attribute PRUint32 id;
+  readonly attribute unsigned long id;
   readonly attribute AUTF8String who;
   readonly attribute AUTF8String alias;
   readonly attribute AUTF8String originalMessage;
            attribute AUTF8String message;
   readonly attribute AUTF8String iconURL;
   readonly attribute PRTime time;
   readonly attribute prplIConversation conversation;
--- a/chat/components/public/prplIProtocol.idl
+++ b/chat/components/public/prplIProtocol.idl
@@ -124,10 +124,10 @@ interface prplIProtocol: nsISupports {
 [scriptable, uuid(20c4971a-f7c2-4781-8e85-69fee7b83a3d)]
 interface prplIUsernameSplit: nsISupports {
   readonly attribute AUTF8String label;
   readonly attribute AUTF8String defaultValue;
   readonly attribute char separator;
   /* reverse is PR_TRUE if the separator should be found starting at
      the end of the string, PR_FALSE otherwise. */
-  readonly attribute PRBool reverse;
+  readonly attribute boolean reverse;