Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions | Variables
nsSanePluginFactory.cpp File Reference
#include "nsString.h"
#include "nsCOMPtr.h"
#include "nsIServiceManager.h"
#include "nsSanePlugin_CID.h"
#include "nsSanePlugin.h"
#include "nsSanePluginFactory.h"
#include "plstr.h"

Go to the source code of this file.

Defines

#define PLUGIN_NAME   "SANE Plugin"
#define PLUGIN_DESCRIPTION   "SANE Plugin is a generic scanner interface"
#define PLUGIN_MIME_DESCRIPTION   "application/X-sane-plugin::Scanner/Camera"
#define PLUGIN_MIME_TYPE   "application/X-sane-plugin"

Functions

static NS_DEFINE_IID (kISupportsIID, NS_ISUPPORTS_IID)
static NS_DEFINE_IID (kIFactoryIID, NS_IFACTORY_IID)
static NS_DEFINE_IID (kIPluginIID, NS_IPLUGIN_IID)
static NS_DEFINE_CID (kComponentManagerCID, NS_COMPONENTMANAGER_CID)
static NS_DEFINE_CID (knsSanePluginControlCID, NS_SANE_PLUGIN_CONTROL_CID)
static NS_DEFINE_CID (knsSanePluginInst, NS_SANE_PLUGIN_CID)
 PR_IMPLEMENT (nsresult) NSGetFactory(nsISupports *aServMgr
 The XPCOM runtime will call this to get a new factory object for the CID/contractID it passes in.
const nsCID const char const
char nsIFactory **aFactory 
if (!aFactory) return NS_ERROR_NULL_POINTER
 if (factory==nsnull) return NS_ERROR_OUT_OF_MEMORY
 NS_ADDREF (factory)
 if (NS_FAILED(rv)) return rv
contractID AssignWithConversion (NS_INLINE_PLUGIN_CONTRACTID_PREFIX)
contractID AppendWithConversion (PLUGIN_MIME_TYPE)
contractID ToCString (buf, 1999)
 free (buf)
nsCOMPtr< nsIServiceManagerservMgr (do_QueryInterface(aServMgr,&rv))

Variables

const nsCIDaClass
const nsCID const char * aClassName
const nsCID const char const char * aContractID
nsSanePluginFactoryImplfactory
aFactory = factory
return NS_OK
char * buf = ( char * )calloc( 2000, sizeof( char ) )
const char *aPath nsresult rv
nsCOMPtr< nsIServiceManagerservMgr (do_QueryInterface(aServMgr,&rv))
nsCOMPtr< nsIComponentManagercompMgr
nsString contractID

Define Documentation

#define PLUGIN_DESCRIPTION   "SANE Plugin is a generic scanner interface"

Definition at line 52 of file nsSanePluginFactory.cpp.

#define PLUGIN_MIME_DESCRIPTION   "application/X-sane-plugin::Scanner/Camera"

Definition at line 53 of file nsSanePluginFactory.cpp.

#define PLUGIN_MIME_TYPE   "application/X-sane-plugin"

Definition at line 54 of file nsSanePluginFactory.cpp.

#define PLUGIN_NAME   "SANE Plugin"

Definition at line 51 of file nsSanePluginFactory.cpp.


Function Documentation

free ( buf  )
const nsCID const char const char nsIFactory** aFactory if ( aFactory)

Definition at line 653 of file mapi32.cpp.

       {
              return(MAPI_E_FAILURE);
       }
if ( factory  = =nsnull)
if ( NS_FAILED(rv )
static NS_DEFINE_CID ( kComponentManagerCID  ,
NS_COMPONENTMANAGER_CID   
) [static]
static NS_DEFINE_CID ( knsSanePluginControlCID  ,
NS_SANE_PLUGIN_CONTROL_CID   
) [static]
static NS_DEFINE_CID ( knsSanePluginInst  ,
NS_SANE_PLUGIN_CID   
) [static]
static NS_DEFINE_IID ( kISupportsIID  ,
NS_ISUPPORTS_IID   
) [static]
static NS_DEFINE_IID ( kIFactoryIID  ,
NS_IFACTORY_IID   
) [static]
static NS_DEFINE_IID ( kIPluginIID  ,
NS_IPLUGIN_IID   
) [static]

The XPCOM runtime will call this to get a new factory object for the CID/contractID it passes in.

XPCOM is responsible for caching the resulting factory.

return the proper factory to the caller

contractID ToCString ( buf  ,
1999   
)

Variable Documentation

Definition at line 245 of file nsSanePluginFactory.cpp.

Definition at line 245 of file nsSanePluginFactory.cpp.

Definition at line 245 of file nsSanePluginFactory.cpp.

Definition at line 260 of file nsSanePluginFactory.cpp.

buf = ( char * )calloc( 2000, sizeof( char ) )

Definition at line 265 of file nsSanePluginFactory.cpp.

Initial value:
 
             do_GetService( kComponentManagerCID, &rv )

Definition at line 276 of file nsSanePluginFactory.cpp.

Definition at line 288 of file nsSanePluginFactory.cpp.

Initial value:

Definition at line 253 of file nsSanePluginFactory.cpp.

Definition at line 261 of file nsSanePluginFactory.cpp.

rv
Initial value:
 compMgr->RegisterComponent(knsSanePluginControlCID,
                                    "SANE Plugin Control",
                                    "@mozilla.org/plugins/sane-control;1",
                                    aPath, PR_TRUE, PR_TRUE )

Definition at line 270 of file nsSanePluginFactory.cpp.