Back to index

lightning-sunbird  0.9+nobinonly
Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends
nsToolkitProfileService Class Reference
Inheritance diagram for nsToolkitProfileService:
Inheritance graph
[legend]
Collaboration diagram for nsToolkitProfileService:
Collaboration graph
[legend]

List of all members.

Classes

class  ProfileEnumerator

Public Member Functions

nsIToolkitProfile getProfileByName (in AUTF8String aName)
 Get a profile by name.
nsIProfileLock lockProfilePath (in nsILocalFile aDirectory, in nsILocalFile aTempDirectory)
 Lock an arbitrary path as a profile.
nsIToolkitProfile createProfile (in nsILocalFile aRootDir, in nsILocalFile aTempDir, in AUTF8String aName)
 Create a new profile.
void flush ()
 Flush the profiles list file.
void createInstance (in nsISupports aOuter, in nsIIDRef iid,[retval, iid_is(iid)] out nsQIResult result)
 Creates an instance of a component.
void lockFactory (in PRBool lock)
 LockFactory provides the client a way to keep the component in memory until it is finished with it.

Public Attributes

attribute boolean startWithLastProfile
attribute boolean startOffline
readonly attribute
nsISimpleEnumerator 
profiles
attribute nsIToolkitProfile selectedProfile
readonly attribute unsigned long profileCount
 Returns the number of profiles.

Private Member Functions

 nsToolkitProfileService ()
 ~nsToolkitProfileService ()
 NS_HIDDEN_ (nsresult) Init()

Private Attributes

nsCOMPtr< nsToolkitProfilemFirst
nsCOMPtr< nsToolkitProfilemChosen
nsCOMPtr< nsILocalFilemAppData
nsCOMPtr< nsILocalFilemTempData
nsCOMPtr< nsILocalFilemListFile
PRBool mDirty
PRBool mStartWithLast
PRBool mStartOffline

Static Private Attributes

static nsToolkitProfileServicegService = nsnull

Friends

class nsToolkitProfile
nsresult NS_NewToolkitProfileService (nsIToolkitProfileService **)

Detailed Description

Definition at line 121 of file nsToolkitProfileService.cpp.


Constructor & Destructor Documentation

Definition at line 137 of file nsToolkitProfileService.cpp.

Here is the caller graph for this function:

Definition at line 144 of file nsToolkitProfileService.cpp.

    {
        gService = nsnull;
    }

Member Function Documentation

void nsIFactory::createInstance ( in nsISupports  aOuter,
in nsIIDRef  iid,
[retval, iid_is(iid)] out nsQIResult  result 
) [inherited]

Creates an instance of a component.

Parameters:
aOuterPointer to a component that wishes to be aggregated in the resulting instance. This will be nsnull if no aggregation is requested.
iidThe IID of the interface being requested in the component which is being currently created.
result[out] Pointer to the newly created instance, if successful.
Returns:
NS_OK - Component successfully created and the interface being requested was successfully returned in result. NS_NOINTERFACE - Interface not accessible. NS_ERROR_NO_AGGREGATION - if an 'outer' object is supplied, but the component is not aggregatable. NS_ERROR* - Method failure.
nsIToolkitProfile nsIToolkitProfileService::createProfile ( in nsILocalFile  aRootDir,
in nsILocalFile  aTempDir,
in AUTF8String  aName 
) [inherited]

Create a new profile.

Parameters:
aRootDirThe profile directory. May be null, in which case a suitable default will be chosen based on the profile name.
aTempDirThe profile temporary directory. May be null, in which case a suitable default will be chosen based either on the profile name if aRootDir is null or aRootDir itself.
aNameThe profile name.

Flush the profiles list file.

Get a profile by name.

This is mainly for use by the -P commandline flag.

Parameters:
aNameThe profile name to find.
void nsIFactory::lockFactory ( in PRBool  lock) [inherited]

LockFactory provides the client a way to keep the component in memory until it is finished with it.

The client can call LockFactory(PR_TRUE) to lock the factory and LockFactory(PR_FALSE) to release the factory.

Parameters:
lock- Must be PR_TRUE or PR_FALSE
Returns:
NS_OK - If the lock operation was successful. NS_ERROR* - Method failure.
nsIProfileLock nsIToolkitProfileService::lockProfilePath ( in nsILocalFile  aDirectory,
in nsILocalFile  aTempDirectory 
) [inherited]

Lock an arbitrary path as a profile.

If the path does not exist, it will be created and the defaults copied from the application directory.


Friends And Related Function Documentation

Definition at line 847 of file nsToolkitProfileService.cpp.

{
    nsToolkitProfileService* aThis = new nsToolkitProfileService();
    nsresult rv = aThis->Init();
    if (NS_FAILED(rv)) {
        NS_ERROR("nsToolkitProfileService::Init failed!");
        delete aThis;
        return rv;
    }

    NS_ADDREF(*aResult = aThis);
    return NS_OK;
}
friend class nsToolkitProfile [friend]

Definition at line 134 of file nsToolkitProfileService.cpp.


Member Data Documentation

Definition at line 160 of file nsToolkitProfileService.cpp.

Definition at line 153 of file nsToolkitProfileService.cpp.

Definition at line 152 of file nsToolkitProfileService.cpp.

Definition at line 156 of file nsToolkitProfileService.cpp.

Definition at line 151 of file nsToolkitProfileService.cpp.

Definition at line 155 of file nsToolkitProfileService.cpp.

Definition at line 158 of file nsToolkitProfileService.cpp.

Definition at line 157 of file nsToolkitProfileService.cpp.

Definition at line 154 of file nsToolkitProfileService.cpp.

readonly attribute unsigned long nsIToolkitProfileService::profileCount [inherited]

Returns the number of profiles.

Returns:
0, 1, or 2. More than 2 profiles will always return 2.

Definition at line 91 of file nsIToolkitProfileService.idl.

Definition at line 51 of file nsIToolkitProfileService.idl.

Definition at line 53 of file nsIToolkitProfileService.idl.

Definition at line 49 of file nsIToolkitProfileService.idl.

Definition at line 48 of file nsIToolkitProfileService.idl.


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