Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GNASH_PLUGIN_EXTERNAL_H
00020 #define GNASH_PLUGIN_EXTERNAL_H
00021
00022 #ifdef HAVE_CONFIG_H
00023 #include "gnashconfig.h"
00024 #endif
00025
00026 #include <string>
00027 #include <sstream>
00028 #include <vector>
00029 #include <map>
00030
00031 #include "npapi.h"
00032 #include "npruntime.h"
00033
00034 #include "GnashNPVariant.h"
00035
00036 namespace gnash {
00037
00038 struct ExternalInterface
00039 {
00040 typedef struct {
00041 std::string name;
00042 std::string type;
00043 std::vector<GnashNPVariant> args;
00044 } invoke_t;
00045
00046
00047 static std::string makeInvoke (const std::string &method, std::vector<std::string> args);
00048
00049 static std::string makeNull ();
00050 static std::string makeTrue ();
00051 static std::string makeFalse ();
00052 static std::string makeString (const std::string &str);
00053 static std::string makeProperty (const std::string &str, const std::string &data);
00054 static std::string makeProperty (const std::string &str, double num);
00055 static std::string makeProperty (const std::string &str, int num);
00056 static std::string makeNumber (double num);
00057 static std::string makeNumber (int num);
00058 static std::string makeNumber (unsigned int num);
00059 static std::string makeArray (std::vector<std::string> &args);
00060 static std::string makeObject (std::map<std::string, std::string> &args);
00061
00062 static GnashNPVariant parseXML(const std::string &xml);
00063 static invoke_t *parseInvoke(const std::string &xml);
00064
00065 static std::map<std::string, GnashNPVariant> parseProperties(const std::string &xml);
00066 static std::vector<GnashNPVariant> parseArguments(const std::string &xml);
00067 static std::string convertNPVariant (const NPVariant *npv);
00068 };
00069
00070 }
00071
00072 #endif // GNASH_PLUGIN_EXTERNAL_H
00073
00074
00075
00076
00077