Back to index

lightning-sunbird  0.9+nobinonly
Classes | Typedefs | Functions | Variables
mimevcrd.h File Reference
#include "mimetext.h"
#include "nsCOMPtr.h"
#include "nsIStringBundle.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MimeInlineTextVCardClass
struct  MimeInlineTextVCard

Typedefs

typedef struct MimeInlineTextVCardClass
typedef struct MimeInlineTextVCard

Functions

char * VCardGetStringByID (PRInt32 aMsgId)

Variables

MimeInlineTextVCardClass mimeInlineTextVCardClass

Class Documentation

struct MimeInlineTextVCardClass

Definition at line 52 of file mimevcrd.h.

Class Members
MimeInlineTextClass text
char * vCardString
struct MimeInlineTextVCard

Definition at line 59 of file mimevcrd.h.

Class Members
MimeInlineText text

Typedef Documentation

typedef struct MimeInlineTextVCard

Definition at line 50 of file mimevcrd.h.

typedef struct MimeInlineTextVCardClass

Definition at line 49 of file mimevcrd.h.


Function Documentation

char* VCardGetStringByID ( PRInt32  aMsgId)

Definition at line 1902 of file mimevcrd.cpp.

{
  char          *tempString = nsnull;
  nsresult res = NS_OK;

#ifdef XP_MAC
nsCOMPtr<nsIStringBundle>   stringBundle = nsnull;
#endif

  if (!stringBundle)
  {
    char*       propertyURL = NULL;

    propertyURL = VCARD_URL;

    nsCOMPtr<nsIStringBundleService> sBundleService = 
             do_GetService(NS_STRINGBUNDLE_CONTRACTID, &res); 
    if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) 
    {
      res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(stringBundle));
    }
  }

  if (stringBundle)
  {
    PRUnichar *ptrv = nsnull;
    res = stringBundle->GetStringFromID(aMsgId, &ptrv);

    if (NS_FAILED(res)) 
      return nsCRT::strdup("???");
    else
    {
      nsAutoString v;
      v.Append(ptrv);
      PR_FREEIF(ptrv);
      tempString = ToNewUTF8String(v);
    }
  }

  if (!tempString)
    return nsCRT::strdup("???");
  else
    return tempString;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 75 of file mimemult.cpp.