Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions | Variables
tmTransactionService.cpp File Reference
#include "nsCOMPtr.h"
#include "nsIServiceManager.h"
#include "nsReadableUtils.h"
#include "plstr.h"
#include "ipcITransactionObserver.h"
#include "tmTransaction.h"
#include "tmTransactionService.h"
#include "tmUtils.h"

Go to the source code of this file.

Classes

struct  tm_waiting_msg
struct  tm_queue_mapping

Functions

 NS_IMPL_ISUPPORTS2 (tmTransactionService, ipcITransactionService, ipcIMessageObserver) NS_IMETHODIMP tmTransactionService

Variables

static const nsID kTransModuleID = TRANSACTION_MODULE_ID

Function Documentation

Definition at line 105 of file tmTransactionService.cpp.

                                                        {

  nsresult rv;
  
  rv = IPC_DefineTarget(kTransModuleID, this, PR_TRUE);
  if (NS_FAILED(rv))
    return rv;

  // get the lock service
  lockService = do_GetService("@mozilla.org/ipc/lock-service;1", &rv);
  if (NS_FAILED(rv))
    return rv;

  // create some internal storage
  mObservers = PL_NewHashTable(20, 
                               PL_HashString, 
                               PL_CompareStrings, 
                               PL_CompareValues, 0, 0);
  if (!mObservers)
    return NS_ERROR_OUT_OF_MEMORY;

  // init some internal storage
  mQueueMaps.Init();
  mWaitingMessages.Init();

  // store the namespace
  mNamespace.Assign(aNamespace);
  return NS_OK;
}

Here is the call graph for this function:


Variable Documentation

Definition at line 47 of file tmTransactionService.cpp.