[vlc-commits] nporuntime: move protected definitions to public as they are accessed by out of class selectors

Felix Paul Kühne git at videolan.org
Thu Feb 13 20:02:24 CET 2014


npapi-vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Feb 12 13:15:21 2014 +0100| [be7ae9d9f73b45decd63c8e90d992800b5a882f8] | committer: Felix Paul Kühne

nporuntime: move protected definitions to public as they are accessed by out of class selectors

Fix compilation with clang++, part 2

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=be7ae9d9f73b45decd63c8e90d992800b5a882f8
---

 npapi/control/nporuntime.h |   50 ++++++++++++++++++++++----------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/npapi/control/nporuntime.h b/npapi/control/nporuntime.h
index b279ade..6bb89ca 100644
--- a/npapi/control/nporuntime.h
+++ b/npapi/control/nporuntime.h
@@ -74,6 +74,31 @@ public:
     static char* stringValue(const NPString &v);
     static char* stringValue(const NPVariant &v);
 
+    bool isValid()
+    {
+        return _instance != NULL;
+    };
+
+    enum InvokeResult
+    {
+        INVOKERESULT_NO_ERROR       = 0,    /* returns no error */
+        INVOKERESULT_GENERIC_ERROR  = 1,    /* returns error */
+        INVOKERESULT_NO_SUCH_METHOD = 2,    /* throws method does not exist */
+        INVOKERESULT_INVALID_ARGS   = 3,    /* throws invalid arguments */
+        INVOKERESULT_INVALID_VALUE  = 4,    /* throws invalid value in assignment */
+        INVOKERESULT_OUT_OF_MEMORY  = 5,    /* throws out of memory */
+    };
+
+    virtual InvokeResult getProperty(int index, NPVariant &result);
+    virtual InvokeResult setProperty(int index, const NPVariant &value);
+    virtual InvokeResult removeProperty(int index);
+    virtual InvokeResult invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result);
+    virtual InvokeResult invokeDefault(const NPVariant *args, uint32_t argCount, NPVariant &result);
+
+    bool returnInvokeResult(InvokeResult result);
+
+    static InvokeResult invokeResultString(const char *,NPVariant &);
+
 protected:
     void *operator new(size_t n)
     {
@@ -89,11 +114,6 @@ protected:
         NPN_MemFree(p);
     };
 
-    bool isValid()
-    {
-        return _instance != NULL;
-    };
-
     RuntimeNPObject(NPP instance, const NPClass *aClass) :
         _instance(instance)
     {
@@ -102,16 +122,6 @@ protected:
     };
     virtual ~RuntimeNPObject() {};
 
-    enum InvokeResult
-    {
-        INVOKERESULT_NO_ERROR       = 0,    /* returns no error */
-        INVOKERESULT_GENERIC_ERROR  = 1,    /* returns error */
-        INVOKERESULT_NO_SUCH_METHOD = 2,    /* throws method does not exist */
-        INVOKERESULT_INVALID_ARGS   = 3,    /* throws invalid arguments */
-        INVOKERESULT_INVALID_VALUE  = 4,    /* throws invalid value in assignment */
-        INVOKERESULT_OUT_OF_MEMORY  = 5,    /* throws out of memory */
-    };
-
     friend void RuntimeNPClassDeallocate(NPObject *npobj);
     friend void RuntimeNPClassInvalidate(NPObject *npobj);
     template <class RuntimeNPObject> static bool RuntimeNPClassGetProperty(NPObject *npobj, NPIdentifier name, NPVariant *result);
@@ -125,16 +135,6 @@ protected:
                                             uint32_t argCount,
                                             NPVariant *result);
 
-    virtual InvokeResult getProperty(int index, NPVariant &result);
-    virtual InvokeResult setProperty(int index, const NPVariant &value);
-    virtual InvokeResult removeProperty(int index);
-    virtual InvokeResult invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result);
-    virtual InvokeResult invokeDefault(const NPVariant *args, uint32_t argCount, NPVariant &result);
-
-    bool returnInvokeResult(InvokeResult result);
-
-    static InvokeResult invokeResultString(const char *,NPVariant &);
-
     bool isPluginRunning()
     {
         return (_instance->pdata != NULL);



More information about the vlc-commits mailing list