Back to index

lightning-sunbird  0.9+nobinonly
Defines | Enumerations | Functions | Variables
nsAbOutlookCard.cpp File Reference
#include "nsAbOutlookCard.h"
#include "nsAbWinHelper.h"
#include "nsIPrefService.h"
#include "nsIPrefBranch.h"
#include "nsIAddrBookSession.h"
#include "nsAbBaseCID.h"
#include "prlog.h"

Go to the source code of this file.

Defines

#define PRINTF(args)   PR_LOG(gAbOutlookCardLog, PR_LOG_DEBUG, args)
#define PREF_MAIL_ADDR_BOOK_LASTNAMEFIRST   "mail.addr_book.lastnamefirst"

Enumerations

enum  {
  index_DisplayName = 0, index_EmailAddress, index_FirstName, index_LastName,
  index_NickName, index_WorkPhoneNumber, index_HomePhoneNumber, index_WorkFaxNumber,
  index_PagerNumber, index_MobileNumber, index_HomeCity, index_HomeState,
  index_HomeZip, index_HomeCountry, index_WorkCity, index_WorkState,
  index_WorkZip, index_WorkCountry, index_JobTitle, index_Department,
  index_Company, index_WorkWebPage, index_HomeWebPage, index_Comments,
  index_LastProp
}

Functions

static void splitString (nsString &aSource, nsString &aTarget)
static void wordToUnicode (WORD aWord, nsString &aUnicode)
static void UnicodeToWord (const PRUnichar *aUnicode, WORD &aWord)

Variables

const char * kOutlookDirectoryScheme
const char * kOutlookCardScheme
static const ULONG OutlookCardMAPIProps []

Define Documentation

#define PREF_MAIL_ADDR_BOOK_LASTNAMEFIRST   "mail.addr_book.lastnamefirst"

Definition at line 248 of file nsAbOutlookCard.cpp.

#define PRINTF (   args)    PR_LOG(gAbOutlookCardLog, PR_LOG_DEBUG, args)

Definition at line 52 of file nsAbOutlookCard.cpp.


Enumeration Type Documentation

anonymous enum
Enumerator:
index_DisplayName 
index_EmailAddress 
index_FirstName 
index_LastName 
index_NickName 
index_WorkPhoneNumber 
index_HomePhoneNumber 
index_WorkFaxNumber 
index_PagerNumber 
index_MobileNumber 
index_HomeCity 
index_HomeState 
index_HomeZip 
index_HomeCountry 
index_WorkCity 
index_WorkState 
index_WorkZip 
index_WorkCountry 
index_JobTitle 
index_Department 
index_Company 
index_WorkWebPage 
index_HomeWebPage 
index_Comments 
index_LastProp 

Definition at line 93 of file nsAbOutlookCard.cpp.


Function Documentation

static void splitString ( nsString aSource,
nsString aTarget 
) [static]

Definition at line 70 of file nsAbOutlookCard.cpp.

{
    aTarget.Truncate() ;
    PRInt32 offset = aSource.FindChar('\n') ;
    
    if (offset >= 0) { 
        const PRUnichar *source = aSource.get() + offset + 1 ;
        
        while (*source) {
            if (*source == '\n' || *source == '\r') { aTarget.Append(PRUnichar(' ')) ; }
            else { aTarget.Append(*source) ; }
            ++ source ;
        }
        aSource.Truncate(offset) ; 
    }
}

Here is the caller graph for this function:

static void UnicodeToWord ( const PRUnichar aUnicode,
WORD aWord 
) [static]

Definition at line 235 of file nsAbOutlookCard.cpp.

{
    aWord = 0 ;
    if (aUnicode == nsnull || *aUnicode == 0) { return ; }
    PRInt32 errorCode = 0 ;
    nsAutoString unichar (aUnicode) ;

    aWord = NS_STATIC_CAST(WORD, unichar.ToInteger(&errorCode)) ;
    if (errorCode != 0) {
        PRINTF(("Error conversion string %S: %08x.\n", unichar.get(), errorCode)) ;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void wordToUnicode ( WORD  aWord,
nsString aUnicode 
) [static]

Definition at line 87 of file nsAbOutlookCard.cpp.

{
    aUnicode.Truncate() ;
    aUnicode.AppendInt((PRInt32) aWord) ;
}

Here is the caller graph for this function:


Variable Documentation

Definition at line 1009 of file nsAbWinHelper.cpp.

Definition at line 1003 of file nsAbWinHelper.cpp.

Initial value:
 
{
    PR_DISPLAY_NAME_W,
    PR_EMAIL_ADDRESS_W,
    PR_GIVEN_NAME_W,
    PR_SURNAME_W,
    PR_NICKNAME_W,
    PR_BUSINESS_TELEPHONE_NUMBER_W,
    PR_HOME_TELEPHONE_NUMBER_W,
    PR_BUSINESS_FAX_NUMBER_W,
    PR_PAGER_TELEPHONE_NUMBER_W,
    PR_MOBILE_TELEPHONE_NUMBER_W,
    PR_HOME_ADDRESS_CITY_W,
    PR_HOME_ADDRESS_STATE_OR_PROVINCE_W,
    PR_HOME_ADDRESS_POSTAL_CODE_W,
    PR_HOME_ADDRESS_COUNTRY_W,
    PR_BUSINESS_ADDRESS_CITY_W,
    PR_BUSINESS_ADDRESS_STATE_OR_PROVINCE_W,
    PR_BUSINESS_ADDRESS_POSTAL_CODE_W,
    PR_BUSINESS_ADDRESS_COUNTRY_W,
    PR_TITLE_W,
    PR_DEPARTMENT_NAME_W,
    PR_COMPANY_NAME_W,
    PR_BUSINESS_HOME_PAGE_W,
    PR_PERSONAL_HOME_PAGE_W,
    PR_COMMENT_W
}

Definition at line 122 of file nsAbOutlookCard.cpp.