Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
nsImapStringBundle.cpp File Reference
#include "prprf.h"
#include "prmem.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsIStringBundle.h"
#include "nsImapStringBundle.h"
#include "nsIServiceManager.h"
#include "nsIURI.h"

Go to the source code of this file.

Defines

#define IMAP_MSGS_URL   "chrome://messenger/locale/imapMsgs.properties"

Functions

nsresult IMAPGetStringByID (PRInt32 stringID, PRUnichar **aString)
nsresult IMAPGetStringBundle (nsIStringBundle **aBundle)

Define Documentation

#define IMAP_MSGS_URL   "chrome://messenger/locale/imapMsgs.properties"

Definition at line 46 of file nsImapStringBundle.cpp.


Function Documentation

Definition at line 61 of file nsImapStringBundle.cpp.

{
  nsresult rv=NS_OK;
  nsCOMPtr<nsIStringBundleService> stringService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
  NS_ENSURE_SUCCESS(rv, rv);
  if (!stringService) return NS_ERROR_NULL_POINTER;
  nsCOMPtr<nsIStringBundle> stringBundle;
  rv = stringService->CreateBundle(IMAP_MSGS_URL, getter_AddRefs(stringBundle));
  *aBundle = stringBundle;
  NS_IF_ADDREF(*aBundle);
  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult IMAPGetStringByID ( PRInt32  stringID,
PRUnichar **  aString 
)

Definition at line 50 of file nsImapStringBundle.cpp.

{
  nsresult res=NS_OK;
  nsCOMPtr <nsIStringBundle> sBundle;
  res = IMAPGetStringBundle(getter_AddRefs(sBundle));
  if (NS_SUCCEEDED(res) && sBundle)
    res = sBundle->GetStringFromID(stringID, aString);
  return res;
}

Here is the call graph for this function:

Here is the caller graph for this function: