DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (65868d0f2d1e)

VCS Links

Line Code
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
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 "nsIAbCard.idl"
#include "nsIAbDirectory.idl"

interface nsIFile;
[ptr] native nsIMdbRow(nsIMdbRow);
%{C++
class nsIMdbRow;
%}
interface nsISimpleEnumerator;

%{C++
// this is the prefix we for attributes that are specific
// to the mozilla addressbook, and weren't in 4.x and aren't specified in
// RFC 2789.  used when exporting and import LDIF
// see nsTextAddress.cpp, nsAddressBook.cpp
#define MOZ_AB_LDIF_PREFIX "mozilla"

// note, GeneratedName is not a real column
// if you change any of this, make sure to change
// Get / Set CardValue in nsAbCardProperty.cpp
#define kPhoneticNameColumn       "_PhoneticName"
#define kAddressCharSetColumn     "AddrCharSet"
#define kMailListName             "ListName"
#define kMailListNickName         "ListNickName"
#define kMailListDescription      "ListDescription"
#define kMailListTotalAddresses   "ListTotalAddresses"
// not shown in the UI
#define kLowerPriEmailColumn      "LowercasePrimaryEmail"
#define kLower2ndEmailColumn      "LowercaseSecondEmail"

// Palm Integration
#define  CARD_ATTRIB_PALMID "PalmRecId"
#define  CARD_ATTRIB_DISPLAY "DisplayName"

%}

[scriptable, uuid(20d4c6c3-0460-403e-aa9c-813654641566)]
interface nsAddrDBCommitType : nsISupports
{
  const long kLargeCommit = 1;
  const long kSessionCommit = 2;
  const long kCompressCommit = 3;
};

[scriptable, uuid(c54973e4-d251-4b93-a0d0-81a616225061)]
interface nsIAddrDatabase : nsISupports {

  /**
   * Path to the address book database that this instance represents.
   */
  attribute nsIFile dbPath;
  nsIAddrDatabase open(in nsIFile dbFile, in boolean create, in boolean upgrading);

  void close(in boolean forceCommit);

  /**
   * Open the MDB database synchronously creating it if required. If
   * successful, this routine will set up the m_mdbStore and m_mdbEnv of the
   * database object so other database calls can work.
   *
   * @param     dbName                      The location of the database file
   *                                        to open.
   * @param     create                      If set to true, will create the
   *                                        database file if it does not
   *                                        already exist.
   * @exception NS_ERROR_FILE_NOT_FOUND     The file was not found at the
   *                                        specified location (and create was
   *                                        false).
   * @exception NS_ERROR_FILE_ACCESS_DENIED The file could not be opened as
   *                                        access was denied.
   */
  void openMDB(in nsIFile dbName, in boolean create);
  void closeMDB(in boolean commit);

  void forceClosed();

  /**
   * Enumerate the cards in the directory. The enumerator will return the
   * cards associated with mailing lists too.
   *
   * @param directory the directory of which to enumerate the cards.
   * @return an enumerator.
   */
  nsISimpleEnumerator enumerateCards(in nsIAbDirectory directory);

  /**
   * Enumerate the cards associated with the mailing lists in the directory.
   *
   * @param directory the directory of which to enumerate the cards.
   * @return an enumerator.
   */
  nsISimpleEnumerator enumerateListAddresses(in nsIAbDirectory directory,
                                             in unsigned long listRowID);
};