71 for (
int i = 0 ; i < (int)
plugins_.size(); ++i ) {
72 if (
plugins_[i].rpcName == _pluginName ) {
85 for (
int i = 0 ; i < (int)
plugins_.size(); ++i ) {
86 if (
plugins_[i].rpcName == _pluginName ) {
97 _exists =
plugins_[plugin].rpcFunctions.contains(_functionName);
100 void Core::slotCall( QString _pluginName , QString _functionName ,
bool& _success ) {
104 for (
int i = 0 ; i < (int)
plugins_.size(); ++i ) {
105 if (
plugins_[i].rpcName == _pluginName ) {
111 if ( plugin == -1 ) {
113 emit
log(
LOGERR, tr(
"Unable to call function from Plugin : ") + _pluginName + tr(
" ( Plugin not Found! )"));
117 if ( !
plugins_[plugin].rpcFunctions.contains(_functionName) ) {
119 emit
log(
LOGERR, tr(
"Unable to call function from Plugin : ") + _pluginName);
120 emit
log(
LOGERR, tr(
"Function ") + _functionName + tr(
" not found!"));
128 QString exception = result.toString();
129 emit
log(
LOGERR , tr(
"RPC failed with : ") + exception );
143 QString exception = result.toString();
144 emit
log(
LOGERR , tr(
"RPC failed with : ") + exception );
156 slotCall(
"var tmpValue=" + _expression +
";", ok);
159 _result = QVariant();
164 QScriptValue val =
scriptEngine_.globalObject().property(
"tmpValue");
169 _result = val.toVariant();
std::vector< PluginInfo > plugins_
List of all loaded plugins_.
void slotFunctionExists(QString _pluginName, QString _functionName, bool &_exists)
Check if a function exists.
void slotPluginExists(QString _pluginName, bool &_exists)
Check if a plugin exists.
void slotGetValue(QString _expression, QVariant &_result)
void slotCall(QString _pluginName, QString _functionName, bool &_success)
QScriptEngine scriptEngine_
Core scripting engine.
void log(Logtype _type, QString _message)
Logg with OUT,WARN or ERR as type.