Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Member Functions | Private Attributes
nsPhRemoteService Class Reference

#include <nsPhRemoteService.h>

Inheritance diagram for nsPhRemoteService:
Inheritance graph
[legend]
Collaboration diagram for nsPhRemoteService:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIREMOTESERVICE
NS_DECL_NSIOBSERVER 
nsPhRemoteService ()
void startup (in string appName, in string profileName)
 Start the remote service.
void registerWindow (in nsIDOMWindow aWindow)
 Register a XUL window with the xremote service.
void shutdown ()
 Stop the remote service from accepting additional requests.
void observe (in nsISupports aSubject, in string aTopic, in wstring aData)
 Observe will be called when there is a notification for the topic |aTopic|.

Private Member Functions

 ~nsPhRemoteService ()
void HandleCommandsFor (nsIWidget *aWidget, nsIWeakReference *aWindow)

Private Attributes

PRBool mIsInitialized
nsCString mAppName

Detailed Description

Definition at line 48 of file nsPhRemoteService.h.


Constructor & Destructor Documentation

NS_DECL_ISUPPORTS NS_DECL_NSIREMOTESERVICE NS_DECL_NSIOBSERVER nsPhRemoteService::nsPhRemoteService ( ) [inline]

Definition at line 57 of file nsPhRemoteService.h.

Definition at line 60 of file nsPhRemoteService.h.

{ }

Member Function Documentation

void nsPhRemoteService::HandleCommandsFor ( nsIWidget aWidget,
nsIWeakReference aWindow 
) [private]
  • ATENTIE */ printf( "aProgram=%s aProfile=%s aWidget=%p\n", aProgram?aProgram:"NULL", aProfile?aProfile:"NULL", aWidget );

Definition at line 162 of file nsPhRemoteService.cpp.

{
       static PRBool ConnectorCreated = PR_FALSE;


       if( !ConnectorCreated ) {
              char RemoteServerName[128];
              sprintf( RemoteServerName, "%s_RemoteServer", (char *) mAppName.get() );
              /* create a connector for the remote control */
              PtConnectorCreate( RemoteServerName, client_connect, NULL );
              ConnectorCreated = PR_TRUE;
              }
  return;
}

Here is the call graph for this function:

void nsIObserver::observe ( in nsISupports  aSubject,
in string  aTopic,
in wstring  aData 
) [inherited]

Observe will be called when there is a notification for the topic |aTopic|.

This assumes that the object implementing this interface has been registered with an observer service such as the nsIObserverService.

If you expect multiple topics/subjects, the impl is responsible for filtering.

You should not modify, add, remove, or enumerate notifications in the implemention of observe.

Parameters:
aSubject: Notification specific interface pointer.
aTopic: The notification topic or subject.
aData: Notification specific wide string. subject event.

Register a XUL window with the xremote service.

The window will be configured to accept incoming remote requests. If this method is called before startup(), the registration will happen once startup() is called.

Stop the remote service from accepting additional requests.

void nsIRemoteService::startup ( in string  appName,
in string  profileName 
) [inherited]

Start the remote service.

This should not be done until app startup appears to have been successful.

Parameters:
appName(Required) Sets a window property identifying the application.
profileName(May be null) Sets a window property identifying the profile name.

Member Data Documentation

Definition at line 65 of file nsPhRemoteService.h.

Definition at line 64 of file nsPhRemoteService.h.


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