diff --git a/projects/mozilla/control/npolibvlc.cpp b/projects/mozilla/control/npolibvlc.cpp index c2a40f43c5519f2ac54d69605d4ab1695b283328..a647852e912d254288968e345b03538441b90dec 100644 --- a/projects/mozilla/control/npolibvlc.cpp +++ b/projects/mozilla/control/npolibvlc.cpp @@ -538,10 +538,33 @@ LibvlcInputNPObject::setProperty(int index, const NPVariant &value) const NPUTF8 * const LibvlcInputNPObject::methodNames[] = { /* no methods */ + "none", }; - COUNTNAMES(LibvlcInputNPObject,methodCount,methodNames); +enum LibvlcInputNPObjectMethodIds +{ + ID_none, +}; + +RuntimeNPObject::InvokeResult +LibvlcInputNPObject::invoke(int index, const NPVariant *args, + uint32_t argCount, NPVariant &result) +{ + /* is plugin still running */ + if( isPluginRunning() ) + { + switch( index ) + { + case ID_none: + return INVOKERESULT_NO_SUCH_METHOD; + default: + ; + } + } + return INVOKERESULT_GENERIC_ERROR; +} + /* ** implementation of libvlc playlist items object */ @@ -754,6 +777,9 @@ LibvlcPlaylistNPObject::invoke(int index, const NPVariant *args, char *url = NULL; // grab URL + if( NPVARIANT_IS_NULL(args[0]) ) + return INVOKERESULT_NO_SUCH_METHOD; + if( NPVARIANT_IS_STRING(args[0]) ) { char *s = stringValue(NPVARIANT_TO_STRING(args[0])); diff --git a/projects/mozilla/control/npolibvlc.h b/projects/mozilla/control/npolibvlc.h index 3a68b52461e5627cdf135dc67311145b4375fcd0..1ba7c919e7a08a18757d69cfdcd6a1d6076ec4ba 100644 --- a/projects/mozilla/control/npolibvlc.h +++ b/projects/mozilla/control/npolibvlc.h @@ -97,6 +97,8 @@ protected: static const int methodCount; static const NPUTF8 * const methodNames[]; + + InvokeResult invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result); }; class LibvlcPlaylistItemsNPObject: public RuntimeNPObject