"Fossies" - the Fresh Open Source Software Archive

Member "mozplugger-2.1.6/plugin_entry.c" (17 Apr 2014, 2693 Bytes) of package /linux/www/old/mozplugger-2.1.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /**
    2  * This file is part of mozplugger a fork of plugger, for list of developers
    3  * see the README file.
    4  *
    5  * This program is free software; you can redistribute it and/or modify
    6  * it under the terms of the GNU General Public License as published by
    7  * the Free Software Foundation; either version 2 of the License, or
    8  * (at your option) any later version.
    9  *
   10  * This program is distributed in the hope that it will be useful,
   11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13  * GNU General Public License for more details.
   14  *
   15  * You should have received a copy of the GNU General Public License
   16  * along with this program; if not, write to the Free Software
   17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
   18  */
   19 
   20 #ifdef HAVE_CONFIG_H
   21 #include "config.h"
   22 #endif
   23 
   24 #include <stdio.h>
   25 
   26 #include "npapi.h"
   27 #include "np_funcs.h"
   28 #include "plugin_entry.h"
   29 #include "plugin_name.h"
   30 
   31 /**
   32  * Plugin magic, separated to allow it to be easy to modify the objfile,
   33  * to put in different plugin magics. This maps to a plugin name.
   34  * Javascript running on the browser uses the
   35  * plugin name to test for presence of the plugin so we need to be able to
   36  * simulate different plugins by having different plugin objects.
   37  */
   38 static char magic[MAX_PLUGIN_MAGIC_LEN] = PLACE_HOLDER_STR;
   39 
   40 /**
   41  * Entry point called from browser
   42  *
   43  * @param[in] nsTable, the netscape callback function table
   44  * @param[in] pluginFuncs, the plugin callback function table
   45  *
   46  * @return status
   47  */
   48 NPError NP_Initialize(struct NPNetscapeFuncs_s * nsTable,
   49                                             struct NPPluginFuncs_s * pluginFuncs)
   50 {
   51     return NP2_Initialize(magic, nsTable, pluginFuncs);
   52 }
   53 
   54 /**
   55  * Entry point called from browser
   56  *
   57  * @param[in] future Not used
   58  * @param[in] variable The enumerated name of the variable
   59  * @param[out] value Place to put the answer
   60  *
   61  * @return status
   62  */
   63 NPError NP_GetValue(void * future, NPPVariable variable, void *value)
   64 {
   65     return NP2_GetValue(magic, variable, value);
   66 }
   67 
   68 /**
   69  * Entry point called from browser
   70  *
   71  * @return a string that contains a list of mimetypes and descriptions that
   72  * this plugin handles. Each mimetype, description entry is separated by a ';'.
   73  */
   74 const char * NP_GetMIMEDescription(void)
   75 {
   76     return NP2_GetMIMEDescription(magic);
   77 }
   78 
   79 /**
   80  * Entry point called from browser
   81  *
   82  * @return a string that is the pluin version string
   83  */
   84 const char * NP_GetPluginVersion(void)
   85 {
   86     return NP2_GetPluginVersion(magic);
   87 }
   88 
   89 /**
   90  * Entry point called from browser
   91  *
   92  * @return status
   93  */
   94 NPError NP_Shutdown(void)
   95 {
   96     return NP2_Shutdown(magic);
   97 }