Back to index

lightning-sunbird  0.9+nobinonly
ipcITransactionService.idl
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is Mozilla Transaction Manager.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Netscape Communications Corp.
00018  * Portions created by the Initial Developer are Copyright (C) 2003
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *   John Gaunt <jgaunt@netscape.com>
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 // from tmTransactionManager.h
00039 //
00040 // XXX documentation needs work
00042 //  Overview of TransactionManager IPC Module
00043 //
00044 // Classes:
00045 //    tmIPCModule - From the tmTransactionManager's point of view, this
00046 //        is a proxy for the IPC daemon itself. The reverse is true
00047 //        from the daemon's point of view. This is an interface for the
00048 //        Transaction system to work with the IPC daemon as its transport
00049 //        layer.
00050 //    tmTransactionManager (TM) - Manages the different queues. Maintains
00051 //        the queues necessary for different clients. Receives messages
00052 //        from the tmIPCModule and passes message to the IPC daemon through
00053 //        the tmIPCModule.
00054 //    tmQueue - this class manages the transactions for the different areas
00055 //        of the profiles being shared. Broken down by functional area there
00056 //        will be  a queue for prefs, cookies etc, but not for profileA and 
00057 //        profileB, and not for pref_delete, pref_create, pref_change etc...
00058 //    tmTransaction - the actual transaction being shared with the different
00059 //        tmClients. It contains the type of transaction, which will equate with
00060 //        a type of queue in existance, the owner of the transaction (an IPC daemon ID)
00061 //        and the actual text message to be shared. 
00062 //
00064 
00066 //
00067 // from tmqueue.cpp
00068 // Docs - note that the status of the TM_ATTACH_REPLY is only for checking
00069 //            for TM_ERROR_FAILURE. Other numbers have no importance
00070 // success of the status means the NS_ERROR_GET_CODE(status) will 
00071 //     yield the index of the listener.
00072 //
00073 // move to documentation page - from tmqueue.h
00074 //
00075 // a queue is specific to profile
00076 //
00077 // UUID going out from the module is a handler in the client 
00078 //          (will go to the XPCOM service impling that UUID)
00079 //   -- does it make sense to have different UUIDs for cookies/prefs/etc
00080 //
00081 
00082 #include "nsISupports.idl"
00083 
00084 interface ipcITransactionObserver;
00085 
00086 [scriptable, uuid(15561efb-8c58-4a47-813a-fa91cf730895)]
00087 interface ipcITransactionService : nsISupports
00088 {
00104   void init(in ACString aNamespace);
00105 
00141   void attach(in ACString aDomainName, 
00142               in ipcITransactionObserver aObserver, 
00143               in PRBool aLockingCall);
00144 
00166   void detach(in ACString aDomainName);
00167 
00194   void flush(in ACString aDomainName, in PRBool aLockingCall);
00195 
00220   void postTransaction(in ACString aDomainName, 
00221                        [array, const, size_is(aDataLen)]
00222                        in octet aData,
00223                        in unsigned long aDataLen);
00224 };
00225 
00226 %{C++
00227 // singleton implementing ipcITransactionService
00228 #define IPC_TRANSACTIONSERVICE_CLASSNAME \
00229     "tmTransactionService"
00230 #define IPC_TRANSACTIONSERVICE_CONTRACTID \
00231     "@mozilla.org/ipc/transaction-service;1"
00232 #define IPC_TRANSACTIONSERVICE_CID \
00233 { /* 1403adf4-94d1-4c67-a8ae-d9f86972d378 */         \
00234   0x1403adf4,                                        \
00235   0x94d1,                                            \
00236   0x4c67,                                            \
00237   {0xa8, 0xae, 0xd9, 0xf8, 0x69, 0x72, 0xd3, 0x78}   \
00238 }
00239 %}