#include "vlcplugin.h"
#include "npolibvlc.h"
+#define COUNTNAMES(a,b,c) const int a::b = sizeof(a::c)/sizeof(NPUTF8 *)
+
/*
** implementation of libvlc root object
*/
LibvlcRootNPObject::~LibvlcRootNPObject()
{
/*
- ** when plugin is destroyed, firefox takes upon itself to destroy all 'live' script objects
- ** and ignores refcounting. Therefore we cannot safely assume that refcounting will control
- ** lifespan of objects. Hence they are only lazily created on request, so that firefox can
- ** take ownership, and are not released when plugin is being destroyed.
+ ** When the plugin is destroyed, firefox takes it upon itself to
+ ** destroy all 'live' script objects and ignores refcounting.
+ ** Therefore we cannot safely assume that refcounting will control
+ ** lifespan of objects. Hence they are only lazily created on
+ ** request, so that firefox can take ownership, and are not released
+ ** when the plugin is destroyed.
*/
if( isValid() )
{
"video",
"VersionInfo",
};
-
-const int LibvlcRootNPObject::propertyCount = sizeof(LibvlcRootNPObject::propertyNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcRootNPObject,propertyCount,propertyNames);
enum LibvlcRootNPObjectPropertyIds
{
ID_root_VersionInfo,
};
-RuntimeNPObject::InvokeResult LibvlcRootNPObject::getProperty(int index, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcRootNPObject::getProperty(int index, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
switch( index )
{
case ID_root_audio:
- // create child object in lazyman fashion to avoid ownership problem with firefox
+ // create child object in lazyman fashion to avoid
+ // ownership problem with firefox
if( ! audioObj )
- audioObj = NPN_CreateObject(_instance, RuntimeNPClass<LibvlcAudioNPObject>::getClass());
+ audioObj = NPN_CreateObject(_instance,
+ RuntimeNPClass<LibvlcAudioNPObject>::getClass());
OBJECT_TO_NPVARIANT(NPN_RetainObject(audioObj), result);
return INVOKERESULT_NO_ERROR;
case ID_root_input:
- // create child object in lazyman fashion to avoid ownership problem with firefox
+ // create child object in lazyman fashion to avoid
+ // ownership problem with firefox
if( ! inputObj )
- inputObj = NPN_CreateObject(_instance, RuntimeNPClass<LibvlcInputNPObject>::getClass());
+ inputObj = NPN_CreateObject(_instance,
+ RuntimeNPClass<LibvlcInputNPObject>::getClass());
OBJECT_TO_NPVARIANT(NPN_RetainObject(inputObj), result);
return INVOKERESULT_NO_ERROR;
case ID_root_log:
- // create child object in lazyman fashion to avoid ownership problem with firefox
+ // create child object in lazyman fashion to avoid
+ // ownership problem with firefox
if( ! logObj )
- logObj = NPN_CreateObject(_instance, RuntimeNPClass<LibvlcLogNPObject>::getClass());
+ logObj = NPN_CreateObject(_instance,
+ RuntimeNPClass<LibvlcLogNPObject>::getClass());
OBJECT_TO_NPVARIANT(NPN_RetainObject(logObj), result);
return INVOKERESULT_NO_ERROR;
case ID_root_playlist:
- // create child object in lazyman fashion to avoid ownership problem with firefox
+ // create child object in lazyman fashion to avoid
+ // ownership problem with firefox
if( ! playlistObj )
- playlistObj = NPN_CreateObject(_instance, RuntimeNPClass<LibvlcPlaylistNPObject>::getClass());
+ playlistObj = NPN_CreateObject(_instance,
+ RuntimeNPClass<LibvlcPlaylistNPObject>::getClass());
OBJECT_TO_NPVARIANT(NPN_RetainObject(playlistObj), result);
return INVOKERESULT_NO_ERROR;
case ID_root_video:
- // create child object in lazyman fashion to avoid ownership problem with firefox
+ // create child object in lazyman fashion to avoid
+ // ownership problem with firefox
if( ! videoObj )
- videoObj = NPN_CreateObject(_instance,RuntimeNPClass<LibvlcVideoNPObject>::getClass());
+ videoObj = NPN_CreateObject(_instance,
+ RuntimeNPClass<LibvlcVideoNPObject>::getClass());
OBJECT_TO_NPVARIANT(NPN_RetainObject(videoObj), result);
return INVOKERESULT_NO_ERROR;
case ID_root_VersionInfo:
{
"versionInfo",
};
-
-const int LibvlcRootNPObject::methodCount = sizeof(LibvlcRootNPObject::methodNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcRootNPObject,methodCount,methodNames);
enum LibvlcRootNPObjectMethodIds
{
ID_root_versionInfo,
};
-RuntimeNPObject::InvokeResult LibvlcRootNPObject::invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result)
+RuntimeNPObject::InvokeResult LibvlcRootNPObject::invoke(int index,
+ const NPVariant *args, uint32_t argCount, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
"track",
"channel",
};
-
-const int LibvlcAudioNPObject::propertyCount = sizeof(LibvlcAudioNPObject::propertyNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcAudioNPObject,propertyCount,propertyNames);
enum LibvlcAudioNPObjectPropertyIds
{
ID_audio_channel,
};
-RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcAudioNPObject::getProperty(int index, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
}
case ID_audio_track:
{
- libvlc_media_player_t *p_md = libvlc_playlist_get_media_player(p_plugin->getVLC(), &ex);
+ libvlc_media_player_t *p_md =
+ libvlc_playlist_get_media_player(p_plugin->getVLC(), &ex);
if( libvlc_exception_raised(&ex) )
{
NPN_SetException(this, libvlc_exception_get_message(&ex));
return INVOKERESULT_GENERIC_ERROR;
}
-RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const NPVariant &value)
+RuntimeNPObject::InvokeResult
+LibvlcAudioNPObject::setProperty(int index, const NPVariant &value)
{
/* is plugin still running */
if( _instance->pdata )
case ID_audio_track:
if( isNumberValue(value) )
{
- libvlc_media_player_t *p_md = libvlc_playlist_get_media_player(p_plugin->getVLC(), &ex);
+ libvlc_media_player_t *p_md =
+ libvlc_playlist_get_media_player(p_plugin->getVLC(), &ex);
if( libvlc_exception_raised(&ex) )
{
NPN_SetException(this, libvlc_exception_get_message(&ex));
{
"toggleMute",
};
-
-const int LibvlcAudioNPObject::methodCount = sizeof(LibvlcAudioNPObject::methodNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcAudioNPObject,methodCount,methodNames);
enum LibvlcAudioNPObjectMethodIds
{
ID_audio_togglemute,
};
-RuntimeNPObject::InvokeResult LibvlcAudioNPObject::invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcAudioNPObject::invoke(int index, const NPVariant *args,
+ uint32_t argCount, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
"fps",
"hasVout",
};
-
-const int LibvlcInputNPObject::propertyCount = sizeof(LibvlcInputNPObject::propertyNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcInputNPObject,propertyCount,propertyNames);
enum LibvlcInputNPObjectPropertyIds
{
ID_input_hasvout,
};
-RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcInputNPObject::getProperty(int index, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
libvlc_exception_t ex;
libvlc_exception_init(&ex);
- libvlc_media_player_t *p_md = libvlc_playlist_get_media_player(p_plugin->getVLC(), &ex);
+ libvlc_media_player_t *p_md =
+ libvlc_playlist_get_media_player(p_plugin->getVLC(), &ex);
if( libvlc_exception_raised(&ex) )
{
if( index != ID_input_state )
return INVOKERESULT_GENERIC_ERROR;
}
-RuntimeNPObject::InvokeResult LibvlcInputNPObject::setProperty(int index, const NPVariant &value)
+RuntimeNPObject::InvokeResult
+LibvlcInputNPObject::setProperty(int index, const NPVariant &value)
{
/* is plugin still running */
if( _instance->pdata )
libvlc_exception_t ex;
libvlc_exception_init(&ex);
- libvlc_media_player_t *p_md = libvlc_playlist_get_media_player(p_plugin->getVLC(), &ex);
+ libvlc_media_player_t *p_md =
+ libvlc_playlist_get_media_player(p_plugin->getVLC(), &ex);
if( libvlc_exception_raised(&ex) )
{
NPN_SetException(this, libvlc_exception_get_message(&ex));
/* no methods */
};
-const int LibvlcInputNPObject::methodCount = sizeof(LibvlcInputNPObject::methodNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcInputNPObject,methodCount,methodNames);
/*
** implementation of libvlc message object
"header",
"message",
};
-
-const int LibvlcMessageNPObject::propertyCount = sizeof(LibvlcMessageNPObject::propertyNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcMessageNPObject,propertyCount,propertyNames);
enum LibvlcMessageNPObjectPropertyIds
{
ID_message_message,
};
-RuntimeNPObject::InvokeResult LibvlcMessageNPObject::getProperty(int index, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcMessageNPObject::getProperty(int index, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
{
/* no methods */
};
-
-const int LibvlcMessageNPObject::methodCount = sizeof(LibvlcMessageNPObject::methodNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcMessageNPObject,methodCount,methodNames);
/*
** implementation of libvlc message iterator object
*/
-LibvlcMessageIteratorNPObject::LibvlcMessageIteratorNPObject(NPP instance, const NPClass *aClass) :
+LibvlcMessageIteratorNPObject::LibvlcMessageIteratorNPObject(NPP instance,
+ const NPClass *aClass) :
RuntimeNPObject(instance, aClass),
_p_iter(NULL)
{
{
"hasNext",
};
-
-const int LibvlcMessageIteratorNPObject::propertyCount = sizeof(LibvlcMessageIteratorNPObject::propertyNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcMessageIteratorNPObject,propertyCount,propertyNames);
enum LibvlcMessageIteratorNPObjectPropertyIds
{
ID_messageiterator_hasNext,
};
-RuntimeNPObject::InvokeResult LibvlcMessageIteratorNPObject::getProperty(int index, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcMessageIteratorNPObject::getProperty(int index, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
libvlc_exception_t ex;
libvlc_exception_init(&ex);
- BOOLEAN_TO_NPVARIANT(libvlc_log_iterator_has_next(_p_iter, &ex), result);
+ BOOLEAN_TO_NPVARIANT(
+ libvlc_log_iterator_has_next(_p_iter, &ex), result );
if( libvlc_exception_raised(&ex) )
{
NPN_SetException(this, libvlc_exception_get_message(&ex));
{
"next",
};
-
-const int LibvlcMessageIteratorNPObject::methodCount = sizeof(LibvlcMessageIteratorNPObject::methodNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcMessageIteratorNPObject,methodCount,methodNames);
enum LibvlcMessageIteratorNPObjectMethodIds
{
ID_messageiterator_next,
};
-RuntimeNPObject::InvokeResult LibvlcMessageIteratorNPObject::invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcMessageIteratorNPObject::invoke(int index, const NPVariant *args,
+ uint32_t argCount, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
else
{
LibvlcMessageNPObject* message =
- static_cast<LibvlcMessageNPObject*>(NPN_CreateObject(_instance, RuntimeNPClass<LibvlcMessageNPObject>::getClass()));
+ static_cast<LibvlcMessageNPObject*>(
+ NPN_CreateObject(_instance, RuntimeNPClass<
+ LibvlcMessageNPObject>::getClass()));
if( message )
{
message->setMessage(buffer);
{
"count",
};
-
-const int LibvlcMessagesNPObject::propertyCount = sizeof(LibvlcMessagesNPObject::propertyNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcMessagesNPObject,propertyCount,propertyNames);
enum LibvlcMessagesNPObjectPropertyIds
{
ID_messages_count,
};
-RuntimeNPObject::InvokeResult LibvlcMessagesNPObject::getProperty(int index, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcMessagesNPObject::getProperty(int index, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
"clear",
"iterator",
};
-
-const int LibvlcMessagesNPObject::methodCount = sizeof(LibvlcMessagesNPObject::methodNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcMessagesNPObject,methodCount,methodNames);
enum LibvlcMessagesNPObjectMethodIds
{
ID_messages_iterator,
};
-RuntimeNPObject::InvokeResult LibvlcMessagesNPObject::invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcMessagesNPObject::invoke(int index, const NPVariant *args,
+ uint32_t argCount, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
if( argCount == 0 )
{
LibvlcMessageIteratorNPObject* iter =
- static_cast<LibvlcMessageIteratorNPObject*>(NPN_CreateObject(_instance, RuntimeNPClass<LibvlcMessageIteratorNPObject>::getClass()));
+ static_cast<LibvlcMessageIteratorNPObject*>(
+ NPN_CreateObject(_instance, RuntimeNPClass<
+ LibvlcMessageIteratorNPObject>::getClass()));
if( iter )
{
OBJECT_TO_NPVARIANT(iter, result);
"messages",
"verbosity",
};
-
-const int LibvlcLogNPObject::propertyCount = sizeof(LibvlcLogNPObject::propertyNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcLogNPObject,propertyCount,propertyNames);
enum LibvlcLogNPObjectPropertyIds
{
ID_log_verbosity,
};
-RuntimeNPObject::InvokeResult LibvlcLogNPObject::getProperty(int index, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcLogNPObject::getProperty(int index, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
{
case ID_log_messages:
{
- // create child object in lazyman fashion to avoid ownership problem with firefox
+ // create child object in lazyman fashion to avoid
+ // ownership problem with firefox
if( ! messagesObj )
- messagesObj = NPN_CreateObject(_instance, RuntimeNPClass<LibvlcMessagesNPObject>::getClass());
+ messagesObj = NPN_CreateObject(_instance,
+ RuntimeNPClass<LibvlcMessagesNPObject>::getClass());
OBJECT_TO_NPVARIANT(NPN_RetainObject(messagesObj), result);
return INVOKERESULT_NO_ERROR;
}
{
if( p_plugin->getLog() )
{
- INT32_TO_NPVARIANT(libvlc_get_log_verbosity(p_plugin->getVLC(),
- &ex), result);
+ INT32_TO_NPVARIANT( libvlc_get_log_verbosity(
+ p_plugin->getVLC(), &ex), result);
if( libvlc_exception_raised(&ex) )
{
NPN_SetException(this, libvlc_exception_get_message(&ex));
return INVOKERESULT_GENERIC_ERROR;
}
-RuntimeNPObject::InvokeResult LibvlcLogNPObject::setProperty(int index, const NPVariant &value)
+RuntimeNPObject::InvokeResult
+LibvlcLogNPObject::setProperty(int index, const NPVariant &value)
{
/* is plugin still running */
if( _instance->pdata )
{
/* no methods */
};
-
-const int LibvlcLogNPObject::methodCount = sizeof(LibvlcLogNPObject::methodNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcLogNPObject,methodCount,methodNames);
/*
** implementation of libvlc playlist items object
{
"count",
};
-
-const int LibvlcPlaylistItemsNPObject::propertyCount = sizeof(LibvlcPlaylistItemsNPObject::propertyNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcPlaylistItemsNPObject,propertyCount,propertyNames);
enum LibvlcPlaylistItemsNPObjectPropertyIds
{
ID_playlistitems_count,
};
-RuntimeNPObject::InvokeResult LibvlcPlaylistItemsNPObject::getProperty(int index, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcPlaylistItemsNPObject::getProperty(int index, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
"clear",
"remove",
};
-
-const int LibvlcPlaylistItemsNPObject::methodCount = sizeof(LibvlcPlaylistItemsNPObject::methodNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcPlaylistItemsNPObject,methodCount,methodNames);
enum LibvlcPlaylistItemsNPObjectMethodIds
{
ID_playlistitems_remove,
};
-RuntimeNPObject::InvokeResult LibvlcPlaylistItemsNPObject::invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcPlaylistItemsNPObject::invoke(int index, const NPVariant *args,
+ uint32_t argCount, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
case ID_playlistitems_remove:
if( (argCount == 1) && isNumberValue(args[0]) )
{
- libvlc_playlist_delete_item(p_plugin->getVLC(), numberValue(args[0]), &ex);
+ libvlc_playlist_delete_item(p_plugin->getVLC(),
+ numberValue(args[0]), &ex);
if( libvlc_exception_raised(&ex) )
{
NPN_SetException(this, libvlc_exception_get_message(&ex));
"isPlaying",
"items",
};
-
-const int LibvlcPlaylistNPObject::propertyCount = sizeof(LibvlcPlaylistNPObject::propertyNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcPlaylistNPObject,propertyCount,propertyNames);
enum LibvlcPlaylistNPObjectPropertyIds
{
ID_playlist_items,
};
-RuntimeNPObject::InvokeResult LibvlcPlaylistNPObject::getProperty(int index, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcPlaylistNPObject::getProperty(int index, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
}
case ID_playlist_items:
{
- // create child object in lazyman fashion to avoid ownership problem with firefox
+ // create child object in lazyman fashion to avoid
+ // ownership problem with firefox
if( ! playlistItemsObj )
- playlistItemsObj = NPN_CreateObject(_instance, RuntimeNPClass<LibvlcPlaylistItemsNPObject>::getClass());
+ playlistItemsObj =
+ NPN_CreateObject(_instance, RuntimeNPClass<
+ LibvlcPlaylistItemsNPObject>::getClass());
OBJECT_TO_NPVARIANT(NPN_RetainObject(playlistItemsObj), result);
return INVOKERESULT_NO_ERROR;
}
"clear", /* deprecated */
"removeItem", /* deprecated */
};
-
-const int LibvlcPlaylistNPObject::methodCount = sizeof(LibvlcPlaylistNPObject::methodNames)/sizeof(NPUTF8 *);
+COUNTNAMES(LibvlcPlaylistNPObject,methodCount,methodNames);
enum LibvlcPlaylistNPObjectMethodIds
{
ID_playlist_removeitem
};
-RuntimeNPObject::InvokeResult LibvlcPlaylistNPObject::invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcPlaylistNPObject::invoke(int index, const NPVariant *args,
+ uint32_t argCount, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
}
else if( NPVARIANT_IS_STRING(args[2]) )
{
- parseOptions(NPVARIANT_TO_STRING(args[2]), &i_options, &ppsz_options);
+ parseOptions(NPVARIANT_TO_STRING(args[2]),
+ &i_options, &ppsz_options);
}
else if( NPVARIANT_IS_OBJECT(args[2]) )
{
- parseOptions(NPVARIANT_TO_OBJECT(args[2]), &i_options, &ppsz_options);
+ parseOptions(NPVARIANT_TO_OBJECT(args[2]),
+ &i_options, &ppsz_options);
}
else
{
}
}
- int item = libvlc_playlist_add_extended_untrusted(p_plugin->getVLC(),
- url,
- name,
- i_options,
- const_cast<const char **>(ppsz_options),
- &ex);
+ int item = libvlc_playlist_add_extended_untrusted(
+ p_plugin->getVLC(), url, name, i_options,
+ const_cast<const char **>(ppsz_options), &ex);
free(url);
free(name);
for( int i=0; i< i_options; ++i )
case ID_playlist_playItem:
if( (argCount == 1) && isNumberValue(args[0]) )
{
- libvlc_playlist_play(p_plugin->getVLC(), numberValue(args[0]), 0, NULL, &ex);
+ libvlc_playlist_play(p_plugin->getVLC(),
+ numberValue(args[0]), 0, NULL, &ex);
if( libvlc_exception_raised(&ex) )
{
NPN_SetException(this, libvlc_exception_get_message(&ex));
case ID_playlist_removeitem: /* deprecated */
if( (argCount == 1) && isNumberValue(args[0]) )
{
- libvlc_playlist_delete_item(p_plugin->getVLC(), numberValue(args[0]), &ex);
+ libvlc_playlist_delete_item(p_plugin->getVLC(),
+ numberValue(args[0]), &ex);
if( libvlc_exception_raised(&ex) )
{
NPN_SetException(this, libvlc_exception_get_message(&ex));
return INVOKERESULT_GENERIC_ERROR;
}
-void LibvlcPlaylistNPObject::parseOptions(const NPString &nps, int *i_options, char*** ppsz_options)
+void LibvlcPlaylistNPObject::parseOptions(const NPString &nps,
+ int *i_options, char*** ppsz_options)
{
if( nps.utf8length )
{
}
}
-void LibvlcPlaylistNPObject::parseOptions(NPObject *obj, int *i_options, char*** ppsz_options)
+void LibvlcPlaylistNPObject::parseOptions(NPObject *obj, int *i_options,
+ char*** ppsz_options)
{
/* WARNING: Safari does not implement NPN_HasProperty/NPN_HasMethod */
ID_video_crop,
ID_video_teletext
};
+COUNTNAMES(LibvlcVideoNPObject,propertyCount,propertyNames);
-const int LibvlcVideoNPObject::propertyCount = sizeof(LibvlcVideoNPObject::propertyNames)/sizeof(NPUTF8 *);
-
-RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcVideoNPObject::getProperty(int index, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )
return INVOKERESULT_GENERIC_ERROR;
}
-RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
+RuntimeNPObject::InvokeResult
+LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
{
/* is plugin still running */
if( _instance->pdata )
"toggleFullscreen",
"toggleTeletext"
};
+COUNTNAMES(LibvlcVideoNPObject,methodCount,methodNames);
enum LibvlcVideoNPObjectMethodIds
{
ID_video_toggleteletext
};
-const int LibvlcVideoNPObject::methodCount = sizeof(LibvlcVideoNPObject::methodNames)/sizeof(NPUTF8 *);
-
-RuntimeNPObject::InvokeResult LibvlcVideoNPObject::invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result)
+RuntimeNPObject::InvokeResult
+LibvlcVideoNPObject::invoke(int index, const NPVariant *args,
+ uint32_t argCount, NPVariant &result)
{
/* is plugin still running */
if( _instance->pdata )