Problem to compiling cvs & plugin

  • Hi to all and sorry for my bad english, i try to compile cvs for dm7000 and make a function to run one plugin ( by name ) with blue key.


    I add this in rcdm7000.xml

    Code
    <action name="pluginExtern" key="blue" flags="m" />



    I add this in enigma_main.h

    Code
    void runPluginExtern();



    I add this in enigma_main.cpp


    Then i made


    Code
    rm .enigma
    make .enigma


    And i get this error:


    eZapPlugins plugins(5);


    enigma_main.cpp: In member function `void eZapMain::runPluginExtern()':
    enigma_main.cpp: error: invalid conversion from `int' to `eZapPlugins::Types'
    enigma_main.cpp: error: initializing argument 1 of `eZapPlugins::eZapPlugins(eZapPlugins::Types, eWidget*, eWidget*)'


    Can you help me ?


    Thanks.

  • Well, exactly what the error said: you referenced an enum as int, which is not allowed.


    How did you choose the "5" for "plugins(5)"?

  • have a look at enigma_plugins.h


    Code
    enum Types { AnyPlugin = -1, GamePlugin = 1, StandardPlugin = 2, ScriptPlugin = 3, AutostartPlugin = 4, FileExtensionScriptPlugin = 5 };



    If you want to start a FileExtensionScriptPlugin you should do it like this:
    eZapPluigns plugins(eZapPlugins::FileExtensionScriptPlugin);

    Gruss
    Dre


    Boxen (im Einsatz): DM920, DM900, DMOne
    Developer Project Merlin - we are OpenSource

  • Zitat

    Originally posted by dre
    have a look at enigma_plugins.h


    Code
    enum Types { AnyPlugin = -1, GamePlugin = 1, StandardPlugin = 2, ScriptPlugin = 3, AutostartPlugin = 4, FileExtensionScriptPlugin = 5 };



    If you want to start a FileExtensionScriptPlugin you should do it like this:
    eZapPluigns plugins(eZapPlugins::FileExtensionScriptPlugin);


    Now it works !!!!
    Many thanks :winking_face: :winking_face:

  • Hi, i have a new problem


    I tried to add an old plugin to my cvs and i have got this error


    Zitat

    ePlugin p(0, Path.c_str());


    MyPlugin.cpp error: no matching function for call to `ePlugin::ePlugin(int, const char*)'
    ./enigma_plugins.h:13: note: candidates are: ePlugin::ePlugin(const ePlugin&)
    ./enigma_plugins.h:24: note: ePlugin::ePlugin(eListBox<ePlugin>*, const char*, eSimpleConfigFile&, const char*)


    and this


    Zitat

    ePluginThread *pt = new ePluginThread(&p, PluginPath, &parentdlg);


    MyPlugin.cpp error: no matching function for call to `ePluginThread::ePluginThread(ePlugin*, eString[3], MyPlugin*)'
    ./enigma_plugins.h:82: note: candidates are: ePluginThread::ePluginThread(const ePluginThread&)
    ./enigma_plugins.h:102: note: ePluginThread::ePluginThread(ePlugin*, const char**, eZapPlugins*)


    Sorry but i' m not able to change the old plugins with the new ones.
    Can you help me again ?
    Thanks.