Back to index

lightning-sunbird  0.9+nobinonly
Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Static Private Attributes
Mozilla::Embedding::ProfileManager Class Reference

#include <DotNETProfileManager.h>

Collaboration diagram for Mozilla::Embedding::ProfileManager:
Collaboration graph
[legend]

List of all members.

Static Public Member Functions

static __property Int32 get_ProfileCount ()
static StringGetProfileList ()[]
static bool ProfileExists (String *aProfileName)
static __property Stringget_CurrentProfile ()
static __property void set_CurrentProfile (String *aCurrentProfile)
static void ShutDownCurrentProfile (UInt32 shutDownType)
static void CreateNewProfile (String *aProfileName, String *aNativeProfileDir, String *aLangcode, bool useExistingDir)
static void RenameProfile (String *aOldName, String *aNewName)
static void DeleteProfile (String *aName, bool aCanDeleteFiles)
static void CloneProfile (String *aProfileName)

Static Public Attributes

static UInt32 SHUTDOWN_PERSIST = 1
static UInt32 SHUTDOWN_CLEANSE = 2

Static Private Member Functions

static void EnsureProfileService ()

Static Private Attributes

static nsIProfilesProfileService = 0

Detailed Description

Definition at line 50 of file DotNETProfileManager.h.


Member Function Documentation

void ProfileManager::CloneProfile ( String aProfileName) [static]

Definition at line 196 of file DotNETProfileManager.cpp.

{
  EnsureProfileService();

  const wchar_t __pin * profileName = PtrToStringChars(aProfileName);

  nsresult rv = sProfileService->CloneProfile(profileName);
  ThrowIfFailed(rv);
}

Here is the call graph for this function:

void ProfileManager::CreateNewProfile ( String aProfileName,
String aNativeProfileDir,
String aLangcode,
bool  useExistingDir 
) [static]

Definition at line 154 of file DotNETProfileManager.cpp.

{
  EnsureProfileService();

  const wchar_t __pin * profileName = PtrToStringChars(aProfileName);
  const wchar_t __pin * nativeProfileDir = PtrToStringChars(aNativeProfileDir);
  const wchar_t __pin * langCode = PtrToStringChars(aLangcode);

  nsresult rv = sProfileService->CreateNewProfile(profileName,
                                                  nativeProfileDir, langCode,
                                                  useExistingDir);
  ThrowIfFailed(rv);
}

Here is the call graph for this function:

void ProfileManager::DeleteProfile ( String aName,
bool  aCanDeleteFiles 
) [static]

Definition at line 185 of file DotNETProfileManager.cpp.

{
  EnsureProfileService();

  const wchar_t __pin * name = PtrToStringChars(aName);
  nsresult rv = sProfileService->DeleteProfile(name, aCanDeleteFiles);
  ThrowIfFailed(rv);
}

Here is the call graph for this function:

Definition at line 53 of file DotNETProfileManager.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 119 of file DotNETProfileManager.cpp.

{
  EnsureProfileService();

  nsXPIDLString currentProfile;
  nsresult rv =
    sProfileService->GetCurrentProfile(getter_Copies(currentProfile));
  ThrowIfFailed(rv);

  return CopyString(currentProfile);
}

Here is the call graph for this function:

Definition at line 70 of file DotNETProfileManager.cpp.

{ 
  EnsureProfileService();

  PRInt32 count;
  nsresult rv = sProfileService->GetProfileCount(&count);
  ThrowIfFailed(rv);

  return count;
}

Here is the call graph for this function:

Definition at line 83 of file DotNETProfileManager.cpp.

{
  EnsureProfileService();

  PRUint32 profileCount;
  PRUnichar **profiles;

  nsresult rv = sProfileService->GetProfileList(&profileCount, &profiles);
  ThrowIfFailed(rv);

  String *list[] = new String *[profileCount];

  for (PRUint32 i = 0; i < profileCount; ++i) {
    list[i] = CopyString(nsDependentString(profiles[i]));
  }

  return list;
}

Here is the call graph for this function:

bool ProfileManager::ProfileExists ( String aProfileName) [static]

Definition at line 104 of file DotNETProfileManager.cpp.

{
  EnsureProfileService();

  PRBool exists;
  const wchar_t __pin * profileName = PtrToStringChars(aProfileName);

  nsresult rv = sProfileService->ProfileExists(profileName, &exists);
  ThrowIfFailed(rv);

  return exists;
}

Here is the call graph for this function:

void ProfileManager::RenameProfile ( String aOldName,
String aNewName 
) [static]

Definition at line 172 of file DotNETProfileManager.cpp.

{
  EnsureProfileService();

  const wchar_t __pin * oldName = PtrToStringChars(aOldName);
  const wchar_t __pin * newName = PtrToStringChars(aNewName);

  nsresult rv = sProfileService->RenameProfile(oldName, newName);
  ThrowIfFailed(rv);
}

Here is the call graph for this function:

void ProfileManager::set_CurrentProfile ( String aCurrentProfile) [static]

Definition at line 133 of file DotNETProfileManager.cpp.

{
  EnsureProfileService();

  const wchar_t __pin * currentProfile = PtrToStringChars(aCurrentProfile);
  nsresult rv = sProfileService->SetCurrentProfile(currentProfile);
  ThrowIfFailed(rv);
}

Here is the call graph for this function:

Definition at line 144 of file DotNETProfileManager.cpp.

{
  EnsureProfileService();

  nsresult rv = sProfileService->ShutDownCurrentProfile(shutDownType);
  ThrowIfFailed(rv);
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 55 of file DotNETProfileManager.h.

Definition at line 54 of file DotNETProfileManager.h.

Definition at line 71 of file DotNETProfileManager.h.


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