Back to index

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

#include <nsInternetConfig.h>

List of all members.

Public Member Functions

 nsInternetConfig ()
 ~nsInternetConfig ()

Static Public Member Functions

static ICInstance GetInstance ()
static PRBool HasSeedChanged ()

Static Private Attributes

static ICInstance sInstance = NULL
static long sSeed = 0
static PRInt32 sRefCount = 0

Detailed Description

Definition at line 45 of file nsInternetConfig.h.


Constructor & Destructor Documentation

Definition at line 108 of file nsInternetConfig.cpp.

{
       sRefCount++;
}

Definition at line 113 of file nsInternetConfig.cpp.

{
       sRefCount--;
       if ( sRefCount == 0 && sInstance)
       {
              ::ICStop( sInstance );
              sInstance = NULL;
       }
}

Member Function Documentation

ICInstance nsInternetConfig::GetInstance ( void  ) [static]

Definition at line 66 of file nsInternetConfig.cpp.

{
       if ( !sInstance )
       {
              OSStatus err;
              if ((long)ICStart == kUnresolvedCFragSymbolAddress )
                     return sInstance;                          
                                                                                 
                                                                                  
              OSType creator = GetAppCreatorCode();
              err = ::ICStart( &sInstance, creator  );
              if ( err != noErr )
              {
                     ::ICStop( sInstance );
              }
              else
              {
#if !TARGET_CARBON
                     ::ICFindConfigFile( sInstance, 0 , nil );
#endif
                     ::ICGetSeed( sInstance, &sSeed );
              }
       }
       return sInstance;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 92 of file nsInternetConfig.cpp.

{
       ICInstance instance = nsInternetConfig::GetInstance();
       if ( instance )
       {
              long newSeed = 0;
              ::ICGetSeed( sInstance, &newSeed );
              if ( newSeed != sSeed )
              {
                     sSeed = newSeed;
                     return PR_TRUE;
              }
       }
       return PR_FALSE;
}

Here is the call graph for this function:


Member Data Documentation

ICInstance nsInternetConfig::sInstance = NULL [static, private]

Definition at line 54 of file nsInternetConfig.h.

PRInt32 nsInternetConfig::sRefCount = 0 [static, private]

Definition at line 56 of file nsInternetConfig.h.

long nsInternetConfig::sSeed = 0 [static, private]

Definition at line 55 of file nsInternetConfig.h.


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