Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
nsAbMDBCardProperty Class Reference

#include <nsAbMDBCardProperty.h>

Inheritance diagram for nsAbMDBCardProperty:
Inheritance graph
[legend]
Collaboration diagram for nsAbMDBCardProperty:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIABMDBCARD 
nsAbMDBCardProperty (void)
virtual ~nsAbMDBCardProperty ()
NS_IMETHOD EditCardToDatabase (const char *uri)
NS_IMETHOD Equals (nsIAbCard *card, PRBool *result)
void setAbDatabase (in nsIAddrDatabase database)
void copyCard (in nsIAbMDBCard srcCardDB)
wstring getStringAttribute (in string name)
void setStringAttribute (in string name, in wstring value)
wstring getCardValue (in string name)
void setCardValue (in string attrname, in wstring value)
void copy (in nsIAbCard srcCard)
void editCardToDatabase (in string uri)
boolean equals (in nsIAbCard card)
string convertToBase64EncodedXML ()
wstring convertToXMLPrintData ()
string convertToEscapedVCard ()

Public Attributes

attribute unsigned long key
attribute unsigned long dbTableID
attribute unsigned long dbRowID
attribute wstring firstName
attribute wstring lastName
attribute wstring phoneticFirstName
attribute wstring phoneticLastName
attribute wstring displayName
attribute wstring nickName
attribute wstring primaryEmail
attribute wstring secondEmail
attribute wstring defaultEmail
attribute wstring cardType
attribute wstring workPhone
attribute wstring homePhone
attribute wstring faxNumber
attribute wstring pagerNumber
attribute wstring cellularNumber
attribute wstring workPhoneType
attribute wstring homePhoneType
attribute wstring faxNumberType
attribute wstring pagerNumberType
attribute wstring cellularNumberType
attribute wstring homeAddress
attribute wstring homeAddress2
attribute wstring homeCity
attribute wstring homeState
attribute wstring homeZipCode
attribute wstring homeCountry
attribute wstring workAddress
attribute wstring workAddress2
attribute wstring workCity
attribute wstring workState
attribute wstring workZipCode
attribute wstring workCountry
attribute wstring jobTitle
attribute wstring department
attribute wstring company
attribute wstring aimScreenName
attribute wstring anniversaryYear
attribute wstring anniversaryMonth
attribute wstring anniversaryDay
attribute wstring spouseName
attribute wstring familyName
attribute wstring defaultAddress
attribute wstring category
attribute wstring webPage1
 webPage1 is work web page
attribute wstring webPage2
 webPage2 is home web page
attribute wstring birthYear
attribute wstring birthMonth
attribute wstring birthDay
attribute wstring custom1
attribute wstring custom2
attribute wstring custom3
attribute wstring custom4
attribute wstring notes
attribute unsigned long lastModifiedDate
attribute unsigned long popularityIndex
attribute unsigned long preferMailFormat
attribute boolean isMailList
attribute string mailListURI
 If isMailList is true then mailListURI will contain the URI of the associated mail list.
attribute boolean allowRemoteContent
 allowRemoteContent to be displayed in HTML mail received from this contact.
readonly attribute boolean isANormalCard
 Card type helper attributes.
readonly attribute boolean isASpecialGroup
readonly attribute boolean isAnEmailAddress

Protected Member Functions

nsresult GetCardDatabase (const char *uri)
nsresult GetAttributeName (PRUnichar **aName, nsString &value)
nsresult SetAttributeName (const PRUnichar *aName, nsString &attribute)

Protected Attributes

PRUint32 m_key
PRUint32 m_dbTableID
PRUint32 m_dbRowID
nsCOMPtr< nsIAddrDatabasemCardDatabase
nsString m_PhoneticFirstName
nsString m_PhoneticLastName
nsString m_FirstName
nsString m_LastName
nsString m_DisplayName
nsString m_NickName
nsString m_PrimaryEmail
nsString m_SecondEmail
nsString m_DefaultEmail
nsString m_CardType
nsString m_WorkPhone
nsString m_HomePhone
nsString m_FaxNumber
nsString m_PagerNumber
nsString m_CellularNumber
nsString m_WorkPhoneType
nsString m_HomePhoneType
nsString m_FaxNumberType
nsString m_PagerNumberType
nsString m_CellularNumberType
nsString m_HomeAddress
nsString m_HomeAddress2
nsString m_HomeCity
nsString m_HomeState
nsString m_HomeZipCode
nsString m_HomeCountry
nsString m_WorkAddress
nsString m_WorkAddress2
nsString m_WorkCity
nsString m_WorkState
nsString m_WorkZipCode
nsString m_WorkCountry
nsString m_JobTitle
nsString m_Department
nsString m_Company
nsString m_AimScreenName
nsString m_AnniversaryYear
nsString m_AnniversaryMonth
nsString m_AnniversaryDay
nsString m_SpouseName
nsString m_FamilyName
nsString m_DefaultAddress
nsString m_Category
nsString m_WebPage1
nsString m_WebPage2
nsString m_BirthYear
nsString m_BirthMonth
nsString m_BirthDay
nsString m_Custom1
nsString m_Custom2
nsString m_Custom3
nsString m_Custom4
nsString m_Note
PRUint32 m_LastModDate
PRUint32 m_PreferMailFormat
PRUint32 m_PopularityIndex
PRBool m_AllowRemoteContent
PRBool m_IsMailList
nsCString m_MailListURI

Detailed Description

Definition at line 47 of file nsAbMDBCardProperty.h.


Constructor & Destructor Documentation

Definition at line 52 of file nsAbMDBCardProperty.cpp.

{
       m_key = 0;
       m_dbTableID = 0;
       m_dbRowID = 0;
}

Definition at line 59 of file nsAbMDBCardProperty.cpp.


Member Function Documentation

wstring nsIAbCard::convertToXMLPrintData ( ) [inherited]
void nsIAbCard::copy ( in nsIAbCard  srcCard) [inherited]
void nsIAbMDBCard::copyCard ( in nsIAbMDBCard  srcCardDB) [inherited]

Definition at line 268 of file nsAbMDBCardProperty.cpp.

Here is the call graph for this function:

Reimplemented in nsAbIPCCard.

Definition at line 317 of file nsAbMDBCardProperty.cpp.

{
  nsresult rv;

  if (this == card) {
    *result = PR_TRUE;
    return NS_OK;
  }

  // the reason we need this card at all is that multiple nsIAbCards
  // can exist for a given mdbcard
  nsCOMPtr <nsIAbMDBCard> mdbcard = do_QueryInterface(card, &rv);
  if (NS_FAILED(rv) || !mdbcard) {
    // XXX using ldap can get us here, we need to fix how the listeners work
    *result = PR_FALSE;
    return NS_OK;
  }

  // XXX todo
  // optimize this code, key might be enough
  PRUint32 dbRowID;
  rv = mdbcard->GetDbRowID(&dbRowID);
  NS_ENSURE_SUCCESS(rv,rv);

  PRUint32 dbTableID;
  rv = mdbcard->GetDbTableID(&dbTableID);
  NS_ENSURE_SUCCESS(rv,rv);

  PRUint32 key;
  rv = mdbcard->GetKey(&key);
  NS_ENSURE_SUCCESS(rv,rv);

  if (dbRowID == m_dbRowID && dbTableID == m_dbTableID && key == m_key)
    *result = PR_TRUE;
  else
    *result = PR_FALSE;
  return NS_OK;
}

Here is the call graph for this function:

boolean nsIAbCard::equals ( in nsIAbCard  card) [inherited]
nsresult nsAbCardProperty::GetAttributeName ( PRUnichar **  aName,
nsString value 
) [protected, inherited]

Definition at line 171 of file nsAbCardProperty.cpp.

Here is the call graph for this function:

Definition at line 285 of file nsAbMDBCardProperty.cpp.

{
       nsresult rv = NS_OK;

       nsCOMPtr<nsIAddrBookSession> abSession = 
                do_GetService(NS_ADDRBOOKSESSION_CONTRACTID, &rv); 
       if (NS_SUCCEEDED(rv))
       {
              nsCOMPtr<nsILocalFile> dbPath;
              rv = abSession->GetUserProfileDirectory(getter_AddRefs(dbPath));
              NS_ENSURE_SUCCESS(rv, rv);


              rv = dbPath->AppendNative(nsDependentCString(&(uri[kMDBDirectoryRootLen])));
              NS_ENSURE_SUCCESS(rv, rv);
              
              PRBool fileExists;
              rv = dbPath->Exists(&fileExists);
              if (NS_SUCCEEDED(rv) && fileExists)
              {
                     nsCOMPtr<nsIAddrDatabase> addrDBFactory = 
                              do_GetService(NS_ADDRDATABASE_CONTRACTID, &rv);

                     if (NS_SUCCEEDED(rv) && addrDBFactory)
                            rv = addrDBFactory->Open(dbPath, PR_TRUE, PR_TRUE, getter_AddRefs(mCardDatabase));
              }
              else
                     rv = NS_ERROR_FAILURE;
       }
       return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

wstring nsIAbCard::getCardValue ( in string  name) [inherited]
wstring nsIAbMDBCard::getStringAttribute ( in string  name) [inherited]
nsresult nsAbCardProperty::SetAttributeName ( const PRUnichar aName,
nsString attribute 
) [protected, inherited]

Definition at line 178 of file nsAbCardProperty.cpp.

{
  if (aName)
    attribute = aName;
  return NS_OK;
}
void nsIAbCard::setCardValue ( in string  attrname,
in wstring  value 
) [inherited]
void nsIAbMDBCard::setStringAttribute ( in string  name,
in wstring  value 
) [inherited]

Member Data Documentation

attribute wstring nsIAbCard::aimScreenName [inherited]

Definition at line 100 of file nsIAbCard.idl.

allowRemoteContent to be displayed in HTML mail received from this contact.

Definition at line 137 of file nsIAbCard.idl.

attribute wstring nsIAbCard::anniversaryDay [inherited]

Definition at line 103 of file nsIAbCard.idl.

Definition at line 102 of file nsIAbCard.idl.

Definition at line 101 of file nsIAbCard.idl.

attribute wstring nsIAbCard::birthDay [inherited]

Definition at line 118 of file nsIAbCard.idl.

attribute wstring nsIAbCard::birthMonth [inherited]

Definition at line 117 of file nsIAbCard.idl.

attribute wstring nsIAbCard::birthYear [inherited]

Definition at line 116 of file nsIAbCard.idl.

attribute wstring nsIAbCard::cardType [inherited]

Definition at line 74 of file nsIAbCard.idl.

attribute wstring nsIAbCard::category [inherited]

Definition at line 107 of file nsIAbCard.idl.

attribute wstring nsIAbCard::cellularNumber [inherited]

Definition at line 79 of file nsIAbCard.idl.

Definition at line 84 of file nsIAbCard.idl.

attribute wstring nsIAbCard::company [inherited]

Definition at line 99 of file nsIAbCard.idl.

attribute wstring nsIAbCard::custom1 [inherited]

Definition at line 119 of file nsIAbCard.idl.

attribute wstring nsIAbCard::custom2 [inherited]

Definition at line 120 of file nsIAbCard.idl.

attribute wstring nsIAbCard::custom3 [inherited]

Definition at line 121 of file nsIAbCard.idl.

attribute wstring nsIAbCard::custom4 [inherited]

Definition at line 122 of file nsIAbCard.idl.

attribute unsigned long nsIAbMDBCard::dbRowID [inherited]

Definition at line 51 of file nsIAbMDBCard.idl.

attribute unsigned long nsIAbMDBCard::dbTableID [inherited]

Definition at line 50 of file nsIAbMDBCard.idl.

attribute wstring nsIAbCard::defaultAddress [inherited]

Definition at line 106 of file nsIAbCard.idl.

attribute wstring nsIAbCard::defaultEmail [inherited]

Definition at line 73 of file nsIAbCard.idl.

attribute wstring nsIAbCard::department [inherited]

Definition at line 98 of file nsIAbCard.idl.

attribute wstring nsIAbCard::displayName [inherited]

Definition at line 69 of file nsIAbCard.idl.

attribute wstring nsIAbCard::familyName [inherited]

Definition at line 105 of file nsIAbCard.idl.

attribute wstring nsIAbCard::faxNumber [inherited]

Definition at line 77 of file nsIAbCard.idl.

attribute wstring nsIAbCard::faxNumberType [inherited]

Definition at line 82 of file nsIAbCard.idl.

attribute wstring nsIAbCard::firstName [inherited]

Definition at line 65 of file nsIAbCard.idl.

attribute wstring nsIAbCard::homeAddress [inherited]

Definition at line 85 of file nsIAbCard.idl.

attribute wstring nsIAbCard::homeAddress2 [inherited]

Definition at line 86 of file nsIAbCard.idl.

attribute wstring nsIAbCard::homeCity [inherited]

Definition at line 87 of file nsIAbCard.idl.

attribute wstring nsIAbCard::homeCountry [inherited]

Definition at line 90 of file nsIAbCard.idl.

attribute wstring nsIAbCard::homePhone [inherited]

Definition at line 76 of file nsIAbCard.idl.

attribute wstring nsIAbCard::homePhoneType [inherited]

Definition at line 81 of file nsIAbCard.idl.

attribute wstring nsIAbCard::homeState [inherited]

Definition at line 88 of file nsIAbCard.idl.

attribute wstring nsIAbCard::homeZipCode [inherited]

Definition at line 89 of file nsIAbCard.idl.

Definition at line 144 of file nsIAbCard.idl.

Card type helper attributes.

Definition at line 142 of file nsIAbCard.idl.

Definition at line 143 of file nsIAbCard.idl.

Definition at line 127 of file nsIAbCard.idl.

attribute wstring nsIAbCard::jobTitle [inherited]

Definition at line 97 of file nsIAbCard.idl.

attribute unsigned long nsIAbMDBCard::key [inherited]

Definition at line 47 of file nsIAbMDBCard.idl.

Definition at line 124 of file nsIAbCard.idl.

attribute wstring nsIAbCard::lastName [inherited]

Definition at line 66 of file nsIAbCard.idl.

Definition at line 108 of file nsAbCardProperty.h.

Definition at line 129 of file nsAbCardProperty.h.

Definition at line 111 of file nsAbCardProperty.h.

Definition at line 110 of file nsAbCardProperty.h.

Definition at line 109 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_BirthDay [protected, inherited]

Definition at line 120 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_BirthMonth [protected, inherited]

Definition at line 119 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_BirthYear [protected, inherited]

Definition at line 118 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_CardType [protected, inherited]

Definition at line 82 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_Category [protected, inherited]

Definition at line 115 of file nsAbCardProperty.h.

Definition at line 87 of file nsAbCardProperty.h.

Definition at line 92 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_Company [protected, inherited]

Definition at line 107 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_Custom1 [protected, inherited]

Definition at line 121 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_Custom2 [protected, inherited]

Definition at line 122 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_Custom3 [protected, inherited]

Definition at line 123 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_Custom4 [protected, inherited]

Definition at line 124 of file nsAbCardProperty.h.

Definition at line 64 of file nsAbMDBCardProperty.h.

Definition at line 63 of file nsAbMDBCardProperty.h.

Definition at line 114 of file nsAbCardProperty.h.

Definition at line 81 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_Department [protected, inherited]

Definition at line 106 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_DisplayName [protected, inherited]

Definition at line 77 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_FamilyName [protected, inherited]

Definition at line 113 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_FaxNumber [protected, inherited]

Definition at line 85 of file nsAbCardProperty.h.

Definition at line 90 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_FirstName [protected, inherited]

Definition at line 75 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_HomeAddress [protected, inherited]

Definition at line 93 of file nsAbCardProperty.h.

Definition at line 94 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_HomeCity [protected, inherited]

Definition at line 95 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_HomeCountry [protected, inherited]

Definition at line 98 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_HomePhone [protected, inherited]

Definition at line 84 of file nsAbCardProperty.h.

Definition at line 89 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_HomeState [protected, inherited]

Definition at line 96 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_HomeZipCode [protected, inherited]

Definition at line 97 of file nsAbCardProperty.h.

PRBool nsAbCardProperty::m_IsMailList [protected, inherited]

Definition at line 131 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_JobTitle [protected, inherited]

Definition at line 105 of file nsAbCardProperty.h.

Definition at line 62 of file nsAbMDBCardProperty.h.

PRUint32 nsAbCardProperty::m_LastModDate [protected, inherited]

Definition at line 126 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_LastName [protected, inherited]

Definition at line 76 of file nsAbCardProperty.h.

Definition at line 132 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_NickName [protected, inherited]

Definition at line 78 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_Note [protected, inherited]

Definition at line 125 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_PagerNumber [protected, inherited]

Definition at line 86 of file nsAbCardProperty.h.

Definition at line 91 of file nsAbCardProperty.h.

Definition at line 73 of file nsAbCardProperty.h.

Definition at line 74 of file nsAbCardProperty.h.

Definition at line 128 of file nsAbCardProperty.h.

Definition at line 127 of file nsAbCardProperty.h.

Definition at line 79 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_SecondEmail [protected, inherited]

Definition at line 80 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_SpouseName [protected, inherited]

Definition at line 112 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_WebPage1 [protected, inherited]

Definition at line 116 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_WebPage2 [protected, inherited]

Definition at line 117 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_WorkAddress [protected, inherited]

Definition at line 99 of file nsAbCardProperty.h.

Definition at line 100 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_WorkCity [protected, inherited]

Definition at line 101 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_WorkCountry [protected, inherited]

Definition at line 104 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_WorkPhone [protected, inherited]

Definition at line 83 of file nsAbCardProperty.h.

Definition at line 88 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_WorkState [protected, inherited]

Definition at line 102 of file nsAbCardProperty.h.

nsString nsAbCardProperty::m_WorkZipCode [protected, inherited]

Definition at line 103 of file nsAbCardProperty.h.

If isMailList is true then mailListURI will contain the URI of the associated mail list.

Definition at line 133 of file nsIAbCard.idl.

Definition at line 66 of file nsAbMDBCardProperty.h.

attribute wstring nsIAbCard::nickName [inherited]

Definition at line 70 of file nsIAbCard.idl.

attribute wstring nsIAbCard::notes [inherited]

Definition at line 123 of file nsIAbCard.idl.

attribute wstring nsIAbCard::pagerNumber [inherited]

Definition at line 78 of file nsIAbCard.idl.

Definition at line 83 of file nsIAbCard.idl.

Definition at line 67 of file nsIAbCard.idl.

Definition at line 68 of file nsIAbCard.idl.

Definition at line 125 of file nsIAbCard.idl.

Definition at line 126 of file nsIAbCard.idl.

attribute wstring nsIAbCard::primaryEmail [inherited]

Definition at line 71 of file nsIAbCard.idl.

attribute wstring nsIAbCard::secondEmail [inherited]

Definition at line 72 of file nsIAbCard.idl.

attribute wstring nsIAbCard::spouseName [inherited]

Definition at line 104 of file nsIAbCard.idl.

attribute wstring nsIAbCard::webPage1 [inherited]

webPage1 is work web page

Definition at line 111 of file nsIAbCard.idl.

attribute wstring nsIAbCard::webPage2 [inherited]

webPage2 is home web page

Definition at line 115 of file nsIAbCard.idl.

attribute wstring nsIAbCard::workAddress [inherited]

Definition at line 91 of file nsIAbCard.idl.

attribute wstring nsIAbCard::workAddress2 [inherited]

Definition at line 92 of file nsIAbCard.idl.

attribute wstring nsIAbCard::workCity [inherited]

Definition at line 93 of file nsIAbCard.idl.

attribute wstring nsIAbCard::workCountry [inherited]

Definition at line 96 of file nsIAbCard.idl.

attribute wstring nsIAbCard::workPhone [inherited]

Definition at line 75 of file nsIAbCard.idl.

attribute wstring nsIAbCard::workPhoneType [inherited]

Definition at line 80 of file nsIAbCard.idl.

attribute wstring nsIAbCard::workState [inherited]

Definition at line 94 of file nsIAbCard.idl.

attribute wstring nsIAbCard::workZipCode [inherited]

Definition at line 95 of file nsIAbCard.idl.


The documentation for this class was generated from the following files: