Back to index

lightning-sunbird  0.9+nobinonly
Static Public Member Functions | Private Member Functions
nsParserMsgUtils Class Reference

#include <nsParserMsgUtils.h>

List of all members.

Static Public Member Functions

static nsresult GetLocalizedStringByName (const char *aPropFileName, const char *aKey, nsString &aVal)
static nsresult GetLocalizedStringByID (const char *aPropFileName, PRUint32 aID, nsString &aVal)

Private Member Functions

 nsParserMsgUtils ()
 ~nsParserMsgUtils ()

Detailed Description

Definition at line 45 of file nsParserMsgUtils.h.


Constructor & Destructor Documentation


Member Function Documentation

nsresult nsParserMsgUtils::GetLocalizedStringByID ( const char *  aPropFileName,
PRUint32  aID,
nsString aVal 
) [static]

Definition at line 86 of file nsParserMsgUtils.cpp.

{
  oVal.Truncate();

  nsCOMPtr<nsIStringBundle> bundle;
  nsresult rv = GetBundle(aPropFileName,getter_AddRefs(bundle));
  if (NS_SUCCEEDED(rv) && bundle) {
    nsXPIDLString valUni;
    rv = bundle->GetStringFromID(aID, getter_Copies(valUni));
    if (NS_SUCCEEDED(rv) && valUni) {
      oVal.Assign(valUni);
    }  
  }

  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsParserMsgUtils::GetLocalizedStringByName ( const char *  aPropFileName,
const char *  aKey,
nsString aVal 
) [static]

Definition at line 65 of file nsParserMsgUtils.cpp.

{
  oVal.Truncate();

  NS_ENSURE_ARG_POINTER(aKey);

  nsCOMPtr<nsIStringBundle> bundle;
  nsresult rv = GetBundle(aPropFileName,getter_AddRefs(bundle));
  if (NS_SUCCEEDED(rv) && bundle) {
    nsXPIDLString valUni;
    nsAutoString key; key.AssignWithConversion(aKey);
    rv = bundle->GetStringFromName(key.get(), getter_Copies(valUni));
    if (NS_SUCCEEDED(rv) && valUni) {
      oVal.Assign(valUni);
    }  
  }

  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:


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