Synchronize Bluetooth phone with Thunderbird

Develpers' detailed documentation for the mozilla-sync plugin for OpenSync. A part of blueZync.

nsProfileDirServiceProvider Class Reference

#include <nsProfileDirServiceProvider.h>

Inheritance diagram for nsProfileDirServiceProvider:

Collaboration diagram for nsProfileDirServiceProvider:

List of all members.

Detailed Description

An xpcom component which holds the name of the user profile directory.

When getting a thunderbird address book, the rdf services will qyery an nsIDirectoryServiceProvider. So, here we implement one, just to give the user profile (and preference) directory This is basically a *very* scaled down version of the original mozilla source for nsProfileDirServiceProvider.

Public Member Functions

virtual nsresult Register ()
virtual nsresult SetDirectories (nsIFile *aGreDir, nsIFile *aProfileDir, nsIFile *aLocalProfileDir=nsnull)
virtual nsresult Shutdown ()

Protected Member Functions

nsresult Initialize ()
 nsProfileDirServiceProvider (PRBool aNotifyObservers=PR_TRUE)
virtual ~nsProfileDirServiceProvider ()

Protected Attributes

nsCOMPtr< nsIFile > mGreDir
nsCOMPtr< nsIFile > mProfileDir


friend nsresult 
NS_NewProfileDirServiceProvider (PRBool, nsProfileDirServiceProvider **)

Constructor & Destructor Documentation

nsIDirectoryServiceProvider nsProfileDirServiceProvider::nsProfileDirServiceProvider ( PRBool  aNotifyObservers = PR_TRUE  )  [protected]

nsProfileDirServiceProvider::~nsProfileDirServiceProvider (  )  [protected, virtual]

Member Function Documentation

nsresult nsProfileDirServiceProvider::Initialize (  )  [protected]

nsresult nsProfileDirServiceProvider::Register (  )  [virtual]


Convenience method to register the provider with directory service. The service holds strong references to registered providers so consumers don't need to hold a reference to this object after calling Register().

References LOG.

Referenced by mozilla_startup().

nsresult nsProfileDirServiceProvider::SetDirectories ( nsIFile *  aGreDir,
nsIFile *  aProfileDir,
nsIFile *  aLocalProfileDir = nsnull 
) [virtual]


aGreDir Directory containing GRE. Must have "components" subdirectory. Must exist before calling this method.
aProfileDir The directory containing the profile files. Must exist before calling this method.
aLocalProfileDir Directory for local profile data, e.g. Cache. Ignored

References mGreDir, and mProfileDir.

nsresult nsProfileDirServiceProvider::Shutdown (  )  [virtual]


Does nothing.

Friends And Related Function Documentation

NS_DECL_NSIDIRECTORYSERVICEPROVIDER friend nsresult NS_NewProfileDirServiceProvider ( PRBool  ,
nsProfileDirServiceProvider **   
) [friend]

Global method to create an instance of nsProfileDirServiceProvider

aNotifyObservers Ignored.
aProvider The nsProfileDirServiceProvider is returned here

Member Data Documentation

nsCOMPtr<nsIFile> nsProfileDirServiceProvider::mGreDir [protected]

Referenced by SetDirectories().

nsCOMPtr<nsIFile> nsProfileDirServiceProvider::mProfileDir [protected]

Referenced by SetDirectories().

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