Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
nsAddrDatabase.cpp File Reference
#include "nsAddrDatabase.h"
#include "nsIEnumerator.h"
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsRDFCID.h"
#include "nsUnicharUtils.h"
#include "nsMsgUtils.h"
#include "nsAbBaseCID.h"
#include "nsIAbCard.h"
#include "nsIAbMDBCard.h"
#include "nsIAbDirectory.h"
#include "nsIAbMDBDirectory.h"
#include "nsIAddrBookSession.h"
#include "nsIServiceManager.h"
#include "nsMorkCID.h"
#include "nsIMdbFactoryFactory.h"
#include "nsXPIDLString.h"
#include "nsIRDFService.h"
#include "nsIProxyObjectManager.h"
#include "nsProxiedService.h"
#include "prprf.h"
#include "nsIPromptService.h"
#include "nsIStringBundle.h"
#include "nsIFile.h"
#include "nsIFileSpec.h"
#include "nsAddressBook.h"
#include "nsEmbedCID.h"

Go to the source code of this file.

Classes

class  nsAddrDBEnumerator
class  nsListAddressEnumerator

Defines

#define ID_PAB_TABLE   1
#define ID_DELETEDCARDS_TABLE   2
#define DATAROW_ROWID   1
#define COLUMN_STR_MAX   16
#define PURGE_CUTOFF_COUNT   50

Functions

static NS_DEFINE_CID (kCMorkFactory, NS_MORK_CID)
 NS_IMETHODIMP_ (nsrefcnt) nsAddrDatabase

Variables

const PRInt32 kAddressBookDBVersion = 1
static const char kPabTableKind [] = "ns:addrbk:db:table:kind:pab"
static const char kDeletedCardsTableKind [] = "ns:addrbk:db:table:kind:deleted"
static const char kCardRowScope [] = "ns:addrbk:db:row:scope:card:all"
static const char kListRowScope [] = "ns:addrbk:db:row:scope:list:all"
static const char kDataRowScope [] = "ns:addrbk:db:row:scope:data:all"
static const char kRecordKeyColumn [] = "RecordKey"
static const char kLastRecordKeyColumn [] = "LastRecordKey"
static const char kMailListTotalLists [] = "ListTotalLists"
static const char kLowerListNameColumn [] = "LowercaseListName"
static const char kMailListAddressFormat [] = "Address%d"

Define Documentation

Definition at line 89 of file nsAddrDatabase.cpp.

Definition at line 87 of file nsAddrDatabase.cpp.

Definition at line 76 of file nsAddrDatabase.cpp.

Definition at line 75 of file nsAddrDatabase.cpp.

Definition at line 91 of file nsAddrDatabase.cpp.


Function Documentation

static NS_DEFINE_CID ( kCMorkFactory  ,
NS_MORK_CID   
) [static]

Definition at line 191 of file nsAddrDatabase.cpp.

{                                                      
  // XXX FIX THIS
  NS_PRECONDITION(0 != mRefCnt, "dup release");        
  nsrefcnt count = PR_AtomicDecrement((PRInt32 *)&mRefCnt);
  NS_LOG_RELEASE(this, count,"nsAddrDatabase"); 
  if (count == 0)    // OK, the cache is no longer holding onto this, so we really want to delete it, 
  {                // after removing it from the cache.
    mRefCnt = 1; /* stabilize */
    RemoveFromCache(this);
    // clean up after ourself!
    if (m_mdbPabTable)
      m_mdbPabTable->Release();
    if (m_mdbDeletedCardsTable)
      m_mdbDeletedCardsTable->Release();
    NS_IF_RELEASE(m_mdbStore);
    NS_IF_RELEASE(m_mdbEnv);
    NS_DELETEXPCOM(this);                              
    return 0;                                          
  }
  return count;                                      
}

Here is the call graph for this function:


Variable Documentation

Definition at line 78 of file nsAddrDatabase.cpp.

const char kCardRowScope[] = "ns:addrbk:db:row:scope:card:all" [static]

Definition at line 83 of file nsAddrDatabase.cpp.

const char kDataRowScope[] = "ns:addrbk:db:row:scope:data:all" [static]

Definition at line 85 of file nsAddrDatabase.cpp.

const char kDeletedCardsTableKind[] = "ns:addrbk:db:table:kind:deleted" [static]

Definition at line 81 of file nsAddrDatabase.cpp.

const char kLastRecordKeyColumn[] = "LastRecordKey" [static]

Definition at line 94 of file nsAddrDatabase.cpp.

const char kListRowScope[] = "ns:addrbk:db:row:scope:list:all" [static]

Definition at line 84 of file nsAddrDatabase.cpp.

const char kLowerListNameColumn[] = "LowercaseListName" [static]

Definition at line 97 of file nsAddrDatabase.cpp.

const char kMailListAddressFormat[] = "Address%d" [static]

Definition at line 101 of file nsAddrDatabase.cpp.

const char kMailListTotalLists[] = "ListTotalLists" [static]

Definition at line 96 of file nsAddrDatabase.cpp.

const char kPabTableKind[] = "ns:addrbk:db:table:kind:pab" [static]

Definition at line 80 of file nsAddrDatabase.cpp.

const char kRecordKeyColumn[] = "RecordKey" [static]

Definition at line 93 of file nsAddrDatabase.cpp.