Author: lslezak Date: Fri Jul 11 14:08:33 2008 New Revision: 48993 URL: http://svn.opensuse.org/viewcvs/yast?rev=48993&view=rev Log: - removed SCR::DBusCaller function (reverted back to the trunk code) Modified: branches/tmp/lslezak/workshop/core/libscr/src/SCR.cc branches/tmp/lslezak/workshop/core/libscr/src/SCRAgent.cc branches/tmp/lslezak/workshop/core/libscr/src/include/scr/SCRAgent.h branches/tmp/lslezak/workshop/core/libscr/src/include/scr/Y2AgentComponent.h Modified: branches/tmp/lslezak/workshop/core/libscr/src/SCR.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/core/libscr/src/SCR.cc?rev=48993&r1=48992&r2=48993&view=diff ============================================================================== --- branches/tmp/lslezak/workshop/core/libscr/src/SCR.cc (original) +++ branches/tmp/lslezak/workshop/core/libscr/src/SCR.cc Fri Jul 11 14:08:33 2008 @@ -63,7 +63,7 @@ return YCPVoid (); } y2debug( "Running SCR::Write (2 args) on SCR agent %p", SCRAgent::instance () ); - return SCRAgent::instance ()->Write(path, value); + return SCRAgent::instance ()->Write (path, value); } static YCPValue @@ -74,7 +74,7 @@ return YCPVoid (); } y2debug( "Running SCR::Write (3 args) on SCR agent %p", SCRAgent::instance () ); - return SCRAgent::instance ()->Write(path, value, arg); + return SCRAgent::instance ()->Write (path, value, arg); } static YCPValue @@ -85,7 +85,7 @@ return YCPVoid (); } y2debug( "Running SCR::Dir on SCR agent %p", SCRAgent::instance () ); - return SCRAgent::instance ()->Dir(path); + return SCRAgent::instance ()->Dir (path); } static YCPValue @@ -96,7 +96,7 @@ return YCPVoid (); } y2debug( "Running SCR::Execute on SCR agent %p", SCRAgent::instance () ); - return SCRAgent::instance ()->Execute(path); + return SCRAgent::instance ()->Execute (path); } static YCPValue @@ -123,7 +123,7 @@ y2debug( "path: %s", path->toString ().c_str () ); y2debug( "args: %s", arg.isNull () ? "null" : arg->toString ().c_str () ); - return SCRAgent::instance ()->Execute(path, arg); + return SCRAgent::instance ()->Execute (path, arg); } static YCPValue @@ -137,7 +137,7 @@ y2debug( "path: %s", path->toString ().c_str () ); y2debug( "args: %s,%s", arg.isNull () ? "null" : arg->toString ().c_str (), opt.isNull () ? "null" : opt->toString ().c_str () ); - return SCRAgent::instance ()->Execute(path, arg, opt); + return SCRAgent::instance ()->Execute (path, arg, opt); } static YCPValue @@ -212,20 +212,6 @@ return SCRAgent::instance ()->RegisterNewAgents (); } -static YCPValue -SCRDBuscaller(const YCPString &caller) -{ - if (! SCRAgent::instance()) - { - ycperror ( "No SCR instance found" ); - return YCPVoid (); - } - y2debug( "Running SCR::DBusCaller on SCR agent %p", SCRAgent::instance () ); - - y2internal("DBus caller: %s", caller->toString().c_str()); - return SCRAgent::instance()->DBusCaller(caller); -} - SCR::SCR () { // already done, we must avoid double registration @@ -252,7 +238,6 @@ { "UnregisterAllAgents","boolean ()", (void *)SCRUnregisterAllAgents }, { "UnmountAgent", "boolean (path)", (void *)SCRUnmountAgent }, { "RegisterNewAgents", "boolean ()", (void *)SCRRegisterNewAgents }, - { "DBusCaller", "void(string)", (void *)SCRDBuscaller }, { 0 } }; Modified: branches/tmp/lslezak/workshop/core/libscr/src/SCRAgent.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/core/libscr/src/SCRAgent.cc?rev=48993&r1=48992&r2=48993&view=diff ============================================================================== --- branches/tmp/lslezak/workshop/core/libscr/src/SCRAgent.cc (original) +++ branches/tmp/lslezak/workshop/core/libscr/src/SCRAgent.cc Fri Jul 11 14:08:33 2008 @@ -24,15 +24,13 @@ #include "ycp/Parser.h" #include "ycp/YCode.h" -#include "ycp/YCPPath.h" -#include "ycp/YCPValue.h" SCRAgent* SCRAgent::current_scr = 0; YCPMap SCRAgent::unspecified_error; SCRAgent::SCRAgent () - : mainscragent (0), dbus_caller() + : mainscragent (0) { if( current_scr == 0 ) current_scr = this; if (unspecified_error.size () == 0) @@ -109,10 +107,3 @@ return ret; } -YCPValue SCRAgent::DBusCaller(const YCPString &caller) -{ - dbus_caller = caller->asString()->value(); - y2internal("Setting caller : %s", dbus_caller.c_str()); - return YCPNull(); -} - Modified: branches/tmp/lslezak/workshop/core/libscr/src/include/scr/SCRAgent.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/core/libscr/src/include/scr/SCRAgent.h?rev=48993&r1=48992&r2=48993&view=diff ============================================================================== --- branches/tmp/lslezak/workshop/core/libscr/src/include/scr/SCRAgent.h (original) +++ branches/tmp/lslezak/workshop/core/libscr/src/include/scr/SCRAgent.h Fri Jul 11 14:08:33 2008 @@ -126,8 +126,6 @@ * not defined in your Agent. */ virtual YCPValue otherCommand (const YCPTerm& term); - - virtual YCPValue DBusCaller(const YCPString &caller); /** * A pointer to the SCRAgent (which normally is the ScriptingAgent) @@ -148,9 +146,6 @@ void setAsCurrentSCR() { current_scr = this; } - -protected: - std::string dbus_caller; private: static SCRAgent* current_scr; Modified: branches/tmp/lslezak/workshop/core/libscr/src/include/scr/Y2AgentComponent.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/core/libscr/src/include/scr/Y2AgentComponent.h?rev=48993&r1=48992&r2=48993&view=diff ============================================================================== --- branches/tmp/lslezak/workshop/core/libscr/src/include/scr/Y2AgentComponent.h (original) +++ branches/tmp/lslezak/workshop/core/libscr/src/include/scr/Y2AgentComponent.h Fri Jul 11 14:08:33 2008 @@ -126,13 +126,13 @@ // evaluate the term in native functions if( command == "Read" ) { - return getSCRAgent ()-> Read(args->value (0)->asPath (), args->size() > 1 ? args->value (1) : YCPNull ()) ; + return getSCRAgent ()-> Read (args->value (0)->asPath (), args->size() > 1 ? args->value (1) : YCPNull ()) ; } else if( command == "Write" ) { - return getSCRAgent ()-> Write(args->value (0)->asPath (), args->value (1), args->size () > 2 ? args->value (2) : YCPNull ()) ; + return getSCRAgent ()-> Write (args->value (0)->asPath (), args->value (1), args->size () > 2 ? args->value (2) : YCPNull ()) ; } else if( command == "Dir" ) { - return getSCRAgent ()-> Dir(args->value (0)->asPath ()) ; + return getSCRAgent ()-> Dir (args->value (0)->asPath ()) ; } else if( command == "Error" ) { return getSCRAgent ()-> Error (args->value (0)->asPath ()) ; @@ -141,11 +141,11 @@ y2debug( "Execute, arg size is %d", args->size() ); switch( args->size() ) { case 1: - return getSCRAgent ()->Execute(args->value (0)->asPath ()) ; + return getSCRAgent ()-> Execute (args->value (0)->asPath ()) ; case 2: - return getSCRAgent ()->Execute(args->value (0)->asPath (), args->value (1)) ; + return getSCRAgent ()-> Execute (args->value (0)->asPath (), args->value (1)) ; default: - return getSCRAgent ()->Execute(args->value (0)->asPath (), args->value (1), args->value (2)) ; + return getSCRAgent ()-> Execute (args->value (0)->asPath (), args->value (1), args->value (2)) ; } } else { @@ -177,10 +177,10 @@ return agent; } -template <class Agent> YCPValue Y2AgentComp<Agent>::Read(const YCPPath &path) +template <class Agent> YCPValue Y2AgentComp<Agent>::Read (const YCPPath &path) { y2error( "Y2AgentComp::Read" ); - return getSCRAgent()->Read(path); + return getSCRAgent()->Read (path); } #endif // Y2AgentComponent_h -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org