Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
NullPlugin.cpp File Reference
#include "npapi.h"
#include <Carbon/Carbon.h>
#include <CoreFoundation/CoreFoundation.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>

Go to the source code of this file.

Classes

class  CPlugin

Defines

#define PLUGINFINDER_COMMAND_BEGINNING   "javascript:window.open(\""
#define PLUGINFINDER_COMMAND_END   "\",\"plugin\",\"toolbar=no,status=no,resizable=no,scrollbars=no,height=252,width=626\");"
#define PLUGINFINDER_COMMAND_END2   "\",\"plugin\",\"toolbar=no,status=no,resizable=yes,scrollbars=yes,height=252,width=626\");"

Functions

NPError NPP_Initialize (void)
void NPP_Shutdown (void)
NPError NPP_New (NPMIMEType type, NPP instance, uint16 mode, int16 argc, char *argn[], char *argv[], NPSavedData *)
NPError NP_LOADDS NPP_Destroy (NPP instance, NPSavedData **)
NPError NPP_SetWindow (NPP instance, NPWindow *window)
NPError NP_LOADDS NPP_NewStream (NPP instance, NPMIMEType, NPStream *, NPBool, uint16 *)
int32 NP_LOADDS NPP_WriteReady (NPP, NPStream *)
int32 NP_LOADDS NPP_Write (NPP, NPStream *, int32, int32 len, void *)
NPError NP_LOADDS NPP_DestroyStream (NPP instance, NPStream *, NPError)
void NP_LOADDS NPP_StreamAsFile (NPP, NPStream *, const char *)
void NP_LOADDS NPP_Print (NPP instance, NPPrint *printInfo)
int16 NPP_HandleEvent (NPP instance, void *event)
void NPP_URLNotify (NPP, const char *, NPReason, void *)

Variables

short gResFile
const short rBrokenPluginIcon = 326
const short rHandCursor = 128
const short rDefaultPluginURL = 128
const short rAltTextString = 129
const short rJavaScriptInstallCommand = 130
const short rRefreshTextString = 131
const short rJavaScriptPageURL = 132
const short rTypeListStrings = 129
static const char szPluginFinderCommandBeginning [] = PLUGINFINDER_COMMAND_BEGINNING
static const char szPluginFinderCommandEnd [] = PLUGINFINDER_COMMAND_END
int32 STREAMBUFSIZE = 0X0FFFFFFF

Define Documentation

#define PLUGINFINDER_COMMAND_BEGINNING   "javascript:window.open(\""

Definition at line 48 of file NullPlugin.cpp.

#define PLUGINFINDER_COMMAND_END   "\",\"plugin\",\"toolbar=no,status=no,resizable=no,scrollbars=no,height=252,width=626\");"

Definition at line 49 of file NullPlugin.cpp.

#define PLUGINFINDER_COMMAND_END2   "\",\"plugin\",\"toolbar=no,status=no,resizable=yes,scrollbars=yes,height=252,width=626\");"

Definition at line 50 of file NullPlugin.cpp.


Function Documentation

NPError NP_LOADDS NPP_Destroy ( NPP  instance,
NPSavedData **   
)

Definition at line 201 of file NullPlugin.cpp.

{
       if (instance == NULL)
              return NPERR_INVALID_INSTANCE_ERROR;

       CPlugin* This = (CPlugin*) instance->pdata;
       
       if (This != NULL)
       {      
              This->Destructor();
              NPN_MemFree(This);
              instance->pdata = NULL;
       }

       return NPERR_NO_ERROR;
}

Here is the call graph for this function:

NPError NP_LOADDS NPP_DestroyStream ( NPP  instance,
NPStream ,
NPError   
)

Definition at line 286 of file NullPlugin.cpp.

{
       if (instance == NULL)
              return NPERR_INVALID_INSTANCE_ERROR;

       return NPERR_NO_ERROR;
}
int16 NPP_HandleEvent ( NPP  instance,
void event 
)

Definition at line 333 of file NullPlugin.cpp.

{
       if (instance != NULL)
       {      
              CPlugin* This = (CPlugin*) instance->pdata;
              if (This != NULL && event != NULL)
                     return This->HandleEvent((EventRecord*) event);
       }
       
       return FALSE;
}

Here is the call graph for this function:

Definition at line 160 of file NullPlugin.cpp.

{
       return CPlugin::Initialize();
}

Here is the call graph for this function:

NPError NPP_New ( NPMIMEType  type,
NPP  instance,
uint16  mode,
int16  argc,
char *  argn[],
char *  argv[],
NPSavedData  
)

Definition at line 178 of file NullPlugin.cpp.

{
       if (instance == NULL)
              return NPERR_INVALID_INSTANCE_ERROR;
              
       CPlugin* This = (CPlugin*) (char*)NPN_MemAlloc(sizeof(CPlugin));
       instance->pdata = This;
       if (This != NULL)
       {
              This->Constructor(instance, type, mode, argc, argn, argv);
              return NPERR_NO_ERROR;
       }
       else
              return NPERR_OUT_OF_MEMORY_ERROR;
}

Here is the call graph for this function:

NPError NP_LOADDS NPP_NewStream ( NPP  instance,
NPMIMEType  ,
NPStream ,
NPBool  ,
uint16  
)

Definition at line 242 of file NullPlugin.cpp.

{
       if (instance == NULL)
              return NPERR_INVALID_INSTANCE_ERROR;

       return NPERR_NO_ERROR;
}
void NP_LOADDS NPP_Print ( NPP  instance,
NPPrint printInfo 
)

Definition at line 309 of file NullPlugin.cpp.

{
       if (printInfo == NULL)
              return;

       if (instance != NULL)
       {
              if (printInfo->mode == NP_FULL)
                     printInfo->print.fullPrint.pluginPrinted = FALSE; // Do the default
              else   // If not fullscreen, we must be embedded
              {
                     CPlugin* This = (CPlugin*) instance->pdata;
                     if (This != NULL)
                            This->Print(printInfo);
              }
       }

}

Here is the call graph for this function:

NPError NPP_SetWindow ( NPP  instance,
NPWindow window 
)

Definition at line 224 of file NullPlugin.cpp.

{
       if (instance == NULL)
              return NPERR_INVALID_INSTANCE_ERROR;

       CPlugin* This = (CPlugin*) instance->pdata;
       if (This != NULL)
              This->SetWindow(window);
       
       return NPERR_NO_ERROR;
}

Here is the call graph for this function:

Definition at line 169 of file NullPlugin.cpp.

Here is the call graph for this function:

void NP_LOADDS NPP_StreamAsFile ( NPP  ,
NPStream ,
const char *   
)

Definition at line 299 of file NullPlugin.cpp.

{
}
void NPP_URLNotify ( NPP  ,
const char *  ,
NPReason  ,
void  
)

Definition at line 349 of file NullPlugin.cpp.

{
}
int32 NP_LOADDS NPP_Write ( NPP  ,
NPStream ,
int32  ,
int32  len,
void  
)

Definition at line 275 of file NullPlugin.cpp.

{
       return len;                 // The number of bytes accepted
}

Definition at line 264 of file NullPlugin.cpp.

{
       return STREAMBUFSIZE;   // Number of bytes ready to accept in NPP_Write()
}

Variable Documentation

short gResFile

Definition at line 139 of file npmac.cpp.

const short rAltTextString = 129

Definition at line 145 of file NullPlugin.cpp.

const short rBrokenPluginIcon = 326

Definition at line 138 of file NullPlugin.cpp.

const short rDefaultPluginURL = 128

Definition at line 144 of file NullPlugin.cpp.

const short rHandCursor = 128

Definition at line 141 of file NullPlugin.cpp.

Definition at line 146 of file NullPlugin.cpp.

Definition at line 148 of file NullPlugin.cpp.

Definition at line 147 of file NullPlugin.cpp.

const short rTypeListStrings = 129

Definition at line 151 of file NullPlugin.cpp.

int32 STREAMBUFSIZE = 0X0FFFFFFF

Definition at line 256 of file NullPlugin.cpp.

Definition at line 153 of file NullPlugin.cpp.

Definition at line 154 of file NullPlugin.cpp.