Author: lslezak
Date: Wed Apr 2 15:22:57 2008
New Revision: 45966
URL: http://svn.opensuse.org/viewcvs/yast?rev=45966&view=rev
Log:
- changed callback registration - use references to functions
instead of strings, this enables compile time type checking
(fate#302296)
Modified:
trunk/pkg-bindings/package/yast2-pkg-bindings.changes
trunk/pkg-bindings/src/Callbacks.YCP.cc
trunk/pkg-bindings/src/Callbacks.YCP.h
trunk/pkg-bindings/src/Callbacks.cc
trunk/pkg-bindings/src/Callbacks_Register.cc
trunk/pkg-bindings/src/PkgFunctions.h
trunk/pkg-bindings/src/PkgProgress.cc
trunk/pkg-bindings/src/Y2PkgFunction.cc
Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/package/yast2-pkg-bindings.changes?rev=45966&r1=45965&r2=45966&view=diff
==============================================================================
--- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original)
+++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Wed Apr 2 15:22:57 2008
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed Apr 2 13:27:35 CEST 2008 - lslezak@suse.cz
+
+- changed callback registration - use references to functions
+ instead of strings, this enables compile time type checking
+ (fate#302296)
+
+-------------------------------------------------------------------
Fri Mar 28 14:09:18 CET 2008 - lslezak@suse.cz
- Pkg:ResolvableProperties() - added "transact_by" key for selected
Modified: trunk/pkg-bindings/src/Callbacks.YCP.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Callbacks.YCP.cc?rev=45966&r1=45965&r2=45966&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Callbacks.YCP.cc (original)
+++ trunk/pkg-bindings/src/Callbacks.YCP.cc Wed Apr 2 15:22:57 2008
@@ -141,56 +141,19 @@
/**
* Set a YCPCallbacks data from string "module::symbol"
**/
- void PkgFunctions::CallbackHandler::YCPCallbacks::setCallback( CBid id_r, const string & name_r ) {
- y2debug ("Registering callback %s", name_r.c_str ());
- string::size_type colonpos = name_r.find("::");
- if ( colonpos != string::npos ) {
-
- string module = name_r.substr ( 0, colonpos );
- string symbol = name_r.substr ( colonpos + 2 );
-
- Y2Component *c = Y2ComponentBroker::getNamespaceComponent (module.c_str());
- if (c == NULL)
- {
- y2error ("No component can provide namespace %s for a callback of %s (callback id %d)",
- module.c_str (), symbol.c_str (), id_r);
- return;
- }
-
- Y2Namespace *ns = c->import (module.c_str ());
- if (ns == NULL)
- {
- y2error ("Component %p could not provide namespace %s for a callback of %s",
- c, module.c_str (), symbol.c_str ());
- return;
- }
-
- // ensure it is an initialized namespace
- ns->initialize ();
-
- _cbdata[id_r].push (CBdata (module, symbol, ns));
- } else {
- y2error ("Callback must be a part of a namespace");
- }
- }
- /**
- * Set a YCPCallbacks data according to args_r.
- **/
- bool PkgFunctions::CallbackHandler::YCPCallbacks::setCallback( CBid id_r, const YCPString & args ) {
- string name = args->value();
- setCallback( id_r, name );
- return true;
+ void PkgFunctions::CallbackHandler::YCPCallbacks::setCallback( CBid id_r, const YCPReference &func_r ) {
+// y2debug ("Registering callback %s", name_r.c_str ());
+
+ _cbdata[id_r].push(func_r);
}
/**
* Set the YCPCallback according to args_r.
* @return YCPVoid on success, otherwise YCPError.
**/
- YCPValue PkgFunctions::CallbackHandler::YCPCallbacks::setYCPCallback( CBid id_r, const YCPString & args_r ) {
- if (!args_r->value().empty ())
+ YCPValue PkgFunctions::CallbackHandler::YCPCallbacks::setYCPCallback( CBid id_r, const YCPReference &func ) {
+ if (!func->isVoid())
{
- if ( ! setCallback( id_r, args_r ) ) {
- return YCPError( string("Bad args to Pkg::Callback") + cbName( id_r ) );
- }
+ setCallback(id_r, func);
}
else
{
@@ -212,28 +175,37 @@
* @return The YCPCallback term, ready to append any arguments.
**/
Y2Function* PkgFunctions::CallbackHandler::YCPCallbacks::createCallback( CBid id_r ) const {
- const _cbdata_t::const_iterator tmp1 = _cbdata.find(id_r);
- if (tmp1 == _cbdata.end() || tmp1->second.empty())
- return NULL;
- const CBdata& tmp2 = tmp1->second.top();
-
- string module = tmp2.module;
- string name = tmp2.symbol;
- Y2Namespace *ns = tmp2.component;
- if (ns == NULL)
- {
- y2error ("No namespace %s for a callback of %s", module.c_str (), name.c_str ());
- return NULL;
- }
-
- Y2Function* func = ns->createFunctionCall (name, Type::Unspec); // FIXME: here we can setup the type check
- if (func == NULL)
- {
- y2error ("Cannot find function %s in module %s as a callback", name.c_str (), module.c_str());
- return NULL;
- }
+ const _cbdata_t::const_iterator tmp1 = _cbdata.find(id_r);
+
+ if (tmp1 == _cbdata.end())
+ return NULL;
+
+ const YCPReference func(tmp1->second.top());
+
+ if (func.isNull() || ! func->isReference())
+ {
+ // TODO
+// ycp2error ("Unexpected function pointer: %s"
+// , ptr.isNull () ? "NULL" : ptr->toString ().c_str ());
+ return NULL;
+ }
+
+ SymbolEntryPtr ptr_sentry = func->entry();
+
+ Y2Namespace* ns = const_cast (ptr_sentry->nameSpace ());
+
+ Y2Function* functioncall = ns->createFunctionCall (
+ ptr_sentry->name (),
+ ptr_sentry->type ()
+ );
+
+ if (!functioncall)
+ {
+// TODO: y2internal ("Cannot get function call object for %s", m_sentry->toString().c_str());
+ return NULL;
+ }
- return func;
+ return functioncall;
}
Modified: trunk/pkg-bindings/src/Callbacks.YCP.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Callbacks.YCP.h?rev=45966&r1=45965&r2=45966&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Callbacks.YCP.h (original)
+++ trunk/pkg-bindings/src/Callbacks.YCP.h Wed Apr 2 15:22:57 2008
@@ -117,17 +117,7 @@
static string cbName( CBid id_r );
private:
- struct CBdata
- {
- CBdata (string module, string symbol, Y2Namespace* component)
- : module (module), symbol (symbol), component (component)
- { }
-
- const string module, symbol;
- Y2Namespace* component;
- };
-
- typedef map _cbdata_t;
+ typedef map _cbdata_t;
_cbdata_t _cbdata;
public:
@@ -142,20 +132,15 @@
void popCallback( CBid id_r );
/**
- * Set a YCPCallbacks data from string "module::symbol"
+ * Set a YCPCallback data
**/
- void setCallback( CBid id_r, const string & name_r );
-
- /**
- * Set a YCPCallbacks data according to args_r.
- **/
- bool setCallback( CBid id_r, const YCPString & args );
+ void setCallback( CBid id_r, const YCPReference &func_r );
/**
* Set the YCPCallback according to args_r.
* @return YCPVoid on success, otherwise YCPError.
**/
- YCPValue setYCPCallback( CBid id_r, const YCPString & args_r );
+ YCPValue setYCPCallback( CBid id_r, const YCPReference &func);
/**
* @return Whether the YCPCallback is set. If not, there's
@@ -218,6 +203,8 @@
CB & addMap( YCPMap arg ) { if (_func != NULL) _func->appendParameter( arg ); return *this; }
CB & addList( YCPList arg ) { if (_func != NULL) _func->appendParameter( arg ); return *this; }
+ CB & addSymbol( const string &arg ) { if (_func != NULL) _func->appendParameter( YCPSymbol(arg) ); return *this; }
+
bool isStr() const { return _result->isString(); }
bool isInt() const { return _result->isInteger(); }
bool isBool() const { return _result->isBoolean(); }
Modified: trunk/pkg-bindings/src/Callbacks.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Callbacks.cc?rev=45966&r1=45965&r2=45966&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Callbacks.cc (original)
+++ trunk/pkg-bindings/src/Callbacks.cc Wed Apr 2 15:22:57 2008
@@ -115,11 +115,7 @@
CB callback( ycpcb( YCPCallbacks::CB_ProgressConvertDb ) );
if (callback._set) {
callback.addInt( value );
- // TODO adapt callback typeinfo to zypp
- callback.addInt( 100 );
- callback.addInt( 0 /*failed*/ );
- callback.addInt( 0 /* ignored */ );
- callback.addInt( 1 /*alreadyInV4*/ );
+ callback.addStr(pth.asString());
callback.evaluate();
}
@@ -133,7 +129,7 @@
if (callback._set) {
callback.addInt( error );
callback.addStr( reason );
- callback.evaluateStr(); // return value ignored by RpmDb
+ callback.evaluate();
}
}
};
@@ -182,7 +178,7 @@
if (callback._set) {
callback.addInt( error );
callback.addStr( reason );
- callback.evaluateStr(); // return value ignored by RpmDb
+ callback.evaluate();
}
}
};
@@ -287,7 +283,7 @@
callback.addStr(res->summary());
callback.addInt(res->size());
callback.addBool(false); // is_delete = false (package installation)
- callback.evaluateBool();
+ callback.evaluate();
}
_last = resolvable;
@@ -1240,7 +1236,7 @@
if ( callback._set )
{
callback.addStr(url);
- callback.addStr(CreateSrcErrorAsString(error));
+ callback.addSymbol(CreateSrcErrorAsString(error));
callback.addStr(description);
std::string result = callback.evaluateSymbol();
@@ -1265,7 +1261,7 @@
if (callback._set)
{
callback.addStr(url);
- callback.addStr(CreateSrcErrorAsString(error));
+ callback.addSymbol(CreateSrcErrorAsString(error));
callback.addStr(reason);
callback.evaluate();
@@ -1351,7 +1347,7 @@
if (callback._set)
{
callback.addStr(url);
- callback.addStr(ProbeSrcErrorAsString(error));
+ callback.addSymbol(ProbeSrcErrorAsString(error));
callback.addStr(reason);
callback.evaluate();
@@ -1381,7 +1377,7 @@
if ( callback._set )
{
callback.addStr(url);
- callback.addStr(ProbeSrcErrorAsString(error));
+ callback.addSymbol(ProbeSrcErrorAsString(error));
callback.addStr(description);
std::string result = callback.evaluateSymbol();
@@ -1507,7 +1503,7 @@
}
callback.addStr(url);
- callback.addStr(SrcReportErrorAsString(error));
+ callback.addSymbol(SrcReportErrorAsString(error));
callback.addStr(description);
std::string result = callback.evaluateSymbol();
@@ -1544,7 +1540,7 @@
callback.addStr(url);
callback.addStr(task);
- callback.addStr(SrcReportErrorAsString(error));
+ callback.addSymbol(SrcReportErrorAsString(error));
callback.addStr(reason);
callback.evaluate();
Modified: trunk/pkg-bindings/src/Callbacks_Register.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Callbacks_Register.cc?rev=45966&r1=45965&r2=45966&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Callbacks_Register.cc (original)
+++ trunk/pkg-bindings/src/Callbacks_Register.cc Wed Apr 2 15:22:57 2008
@@ -41,27 +41,27 @@
#define SET_YCP_CB(E,A) _callbackHandler._ycpCallbacks.setYCPCallback( CallbackHandler::YCPCallbacks::E, A );
-YCPValue PkgFunctions::CallbackStartProvide( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackStartProvide( const YCPReference& args ) {
return SET_YCP_CB( CB_StartProvide, args );
}
-YCPValue PkgFunctions::CallbackProgressProvide( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackProgressProvide( const YCPReference& args ) {
return SET_YCP_CB( CB_ProgressProvide, args );
}
-YCPValue PkgFunctions::CallbackDoneProvide( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackDoneProvide( const YCPReference& args ) {
return SET_YCP_CB( CB_DoneProvide, args );
}
-YCPValue PkgFunctions::CallbackStartPackage( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackStartPackage( const YCPReference& args ) {
return SET_YCP_CB( CB_StartPackage, args );
}
-YCPValue PkgFunctions::CallbackProgressPackage( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackProgressPackage( const YCPReference& args ) {
return SET_YCP_CB( CB_ProgressPackage, args );
}
-YCPValue PkgFunctions::CallbackDonePackage( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackDonePackage( const YCPReference& args ) {
return SET_YCP_CB( CB_DonePackage, args );
}
-YCPValue PkgFunctions::CallbackResolvableReport( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackResolvableReport( const YCPReference& args ) {
return SET_YCP_CB( CB_ResolvableReport, args );
}
@@ -71,7 +71,7 @@
* @param string args Name of the callback handler function. Required callback prototype is <code>boolean(map key)</code>. The callback function should ask user whether the key is trusted, returned true value means the key is trusted.
* @return void
*/
-YCPValue PkgFunctions::CallbackImportGpgKey( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackImportGpgKey( const YCPReference& args ) {
return SET_YCP_CB( CB_ImportGpgKey, args );
}
@@ -81,7 +81,7 @@
* @param string args Name of the callback handler function. Required callback prototype is <code>boolean(string filename, string keyid)</code>. The callback function should ask user whether the unknown key can be accepted, returned true value means to accept the key.
* @return void
*/
-YCPValue PkgFunctions::CallbackAcceptUnknownGpgKey( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackAcceptUnknownGpgKey( const YCPReference& args ) {
return SET_YCP_CB( CB_AcceptUnknownGpgKey, args );
}
@@ -91,7 +91,7 @@
* @param string args Name of the callback handler function. Required callback prototype is <code>boolean(string filename, map key)</code>. The callback function should ask user whether the unknown key can be accepted, returned true value means to accept the file.
* @return void
*/
-YCPValue PkgFunctions::CallbackAcceptNonTrustedGpgKey( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackAcceptNonTrustedGpgKey( const YCPReference& args ) {
return SET_YCP_CB( CB_AcceptNonTrustedGpgKey, args );
}
@@ -101,7 +101,7 @@
* @param string args Name of the callback handler function. Required callback prototype is <code>boolean(string filename)</code>. The callback function should ask user whether the unsigned file can be accepted, returned true value means to accept the file.
* @return void
*/
-YCPValue PkgFunctions::CallbackAcceptUnsignedFile( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackAcceptUnsignedFile( const YCPReference& args ) {
return SET_YCP_CB( CB_AcceptUnsignedFile, args );
}
@@ -111,7 +111,7 @@
* @param string args Name of the callback handler function. Required callback prototype is <code>boolean(string filename)</code>. The callback function should ask user whether the unsigned file can be accepted, returned true value means to accept the file.
* @return void
*/
-YCPValue PkgFunctions::CallbackAcceptFileWithoutChecksum( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackAcceptFileWithoutChecksum( const YCPReference& args ) {
return SET_YCP_CB( CB_AcceptFileWithoutChecksum, args );
}
@@ -121,7 +121,7 @@
* @param string args Name of the callback handler function. Required callback prototype is <code>boolean(string filename, map key)</code>. The callback function should ask user whether the unsigned file can be accepted, returned true value means to accept the file.
* @return void
*/
-YCPValue PkgFunctions::CallbackAcceptVerificationFailed( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackAcceptVerificationFailed( const YCPReference& args ) {
return SET_YCP_CB( CB_AcceptVerificationFailed, args );
}
@@ -131,9 +131,9 @@
* @param string args Name of the callback handler function. Required callback prototype is <code>boolean(string filename, string requested_digest, string found_digest)</code>. The callback function should ask user whether the wrong digest can be accepted, returned true value means to accept the file.
* @return void
*/
-YCPValue PkgFunctions::CallbackAcceptWrongDigest( const YCPString& func)
+YCPValue PkgFunctions::CallbackAcceptWrongDigest( const YCPReference& args)
{
- return SET_YCP_CB( CB_AcceptWrongDigest, func );
+ return SET_YCP_CB( CB_AcceptWrongDigest, args);
}
/**
@@ -142,9 +142,9 @@
* @param string args Name of the callback handler function. Required callback prototype is <code>boolean(string filename, string name)</code>. The callback function should ask user whether the uknown digest can be accepted, returned true value means to accept the digest.
* @return void
*/
-YCPValue PkgFunctions::CallbackAcceptUnknownDigest( const YCPString& func)
+YCPValue PkgFunctions::CallbackAcceptUnknownDigest( const YCPReference& args)
{
- return SET_YCP_CB( CB_AcceptUnknownDigest, func );
+ return SET_YCP_CB( CB_AcceptUnknownDigest, args);
}
/**
@@ -153,7 +153,7 @@
* @param string args Name of the callback handler function. Required callback prototype is <code>void(string keyid, string keyname)</code>. The callback function should inform user that a trusted key has been added.
* @return void
*/
-YCPValue PkgFunctions::CallbackTrustedKeyAdded( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackTrustedKeyAdded( const YCPReference& args ) {
return SET_YCP_CB( CB_TrustedKeyAdded, args );
}
@@ -163,7 +163,7 @@
* @param string args Name of the callback handler function. Required callback prototype is <code>void(string keyid, string keyname)</code>. The callback function should inform user that a trusted key has been removed.
* @return void
*/
-YCPValue PkgFunctions::CallbackTrustedKeyRemoved( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackTrustedKeyRemoved( const YCPReference& args ) {
return SET_YCP_CB( CB_TrustedKeyRemoved, args );
}
@@ -173,62 +173,62 @@
* @param string args Name of the callback handler function. Required callback prototype is <code>string( string error_code, string error, string url, string product, integer current, string current_label, integer wanted, string wanted_label, boolean double_sided, list<string> devices, integer current_device )</code>. The callback function should ask user to change the medium or to change the URL of the repository. Error code can be "NO_ERROR" (no error occured), "NOT_FOUND" (the file was not found), "IO" (I/O error), "IO_SOFT" (timeout when acceessing the network), "INVALID" (broken medium), "WRONG" (unexpected medium, wrong ID). Result of the callback must be "" (retry), "I" (ignore), "C" (cancel), "S" (skip), "E" (eject), "E+number" (eject device at number) or a new URL of the repository.
* @return void
*/
-YCPValue PkgFunctions::CallbackMediaChange( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackMediaChange( const YCPReference& args ) {
// FIXME: Allow omission of 'src' argument in 'src, name'. Since we can
// handle one callback function at most, passing a src argument
// implies a per-source callback which isn't implemented anyway.
return SET_YCP_CB( CB_MediaChange, args );
}
-YCPValue PkgFunctions::CallbackSourceChange( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackSourceChange( const YCPReference& args ) {
return SET_YCP_CB( CB_SourceChange, args );
}
-YCPValue PkgFunctions::CallbackYouProgress( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackYouProgress( const YCPReference& args ) {
y2warning("Pkg::CallbackYouProgress is obsoleted, do not use it (empty implementation)!");
return YCPVoid();
}
-YCPValue PkgFunctions::CallbackYouPatchProgress( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackYouPatchProgress( const YCPReference& args ) {
y2warning("Pkg::CallbackYouPatchProgress is obsoleted, do not use it (empty implementation)!");
return YCPVoid();
}
-YCPValue PkgFunctions::CallbackYouError( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackYouError( const YCPReference& args ) {
y2warning("Pkg::CallbackYouError is obsoleted, do not use it (empty implementation)!");
return YCPVoid();
}
-YCPValue PkgFunctions::CallbackYouMessage( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackYouMessage( const YCPReference& args ) {
y2warning("Pkg::CallbackYouMessage is obsoleted, do not use it (empty implementation)!");
return YCPVoid();
}
-YCPValue PkgFunctions::CallbackYouLog( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackYouLog( const YCPReference& args ) {
y2warning("Pkg::CallbackYouLog is obsoleted, do not use it (empty implementation)!");
return YCPVoid();
}
-YCPValue PkgFunctions::CallbackYouExecuteYcpScript( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackYouExecuteYcpScript( const YCPReference& args ) {
y2warning("Pkg::CallbackYouExecuteYcpScript is obsoleted, do not use it (empty implementation)!");
return YCPVoid();
}
-YCPValue PkgFunctions::CallbackYouScriptProgress( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackYouScriptProgress( const YCPReference& args ) {
y2warning("Pkg::CallbackYouScriptProgress is obsoleted, do not use it (empty implementation)!");
return YCPVoid();
}
-YCPValue PkgFunctions::CallbackStartRebuildDb( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackStartRebuildDb( const YCPReference& args ) {
return SET_YCP_CB( CB_StartRebuildDb, args );
}
-YCPValue PkgFunctions::CallbackProgressRebuildDb( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackProgressRebuildDb( const YCPReference& args ) {
return SET_YCP_CB( CB_ProgressRebuildDb, args );
}
-YCPValue PkgFunctions::CallbackNotifyRebuildDb( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackNotifyRebuildDb( const YCPReference& args ) {
return SET_YCP_CB( CB_NotifyRebuildDb, args );
}
-YCPValue PkgFunctions::CallbackStopRebuildDb( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackStopRebuildDb( const YCPReference& args ) {
return SET_YCP_CB( CB_StopRebuildDb, args );
}
@@ -237,51 +237,51 @@
/**
* @builtin CallbackStartScanDb
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void()</code>. The callback function is evaluated when the RPM DB reading has been started.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void()</code>. The callback function is evaluated when the RPM DB reading has been started.
* @return void
*/
-YCPValue PkgFunctions::CallbackStartScanDb( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackStartScanDb( const YCPReference& args ) {
return SET_YCP_CB( CB_StartScanDb, args );
}
/**
* @builtin CallbackProgressScanDb
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>boolean(integer percent)</code>. The callback function is evaluated during RPM DB reading.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>boolean(integer percent)</code>. The callback function is evaluated during RPM DB reading.
* @return void
*/
-YCPValue PkgFunctions::CallbackProgressScanDb( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackProgressScanDb( const YCPReference& args ) {
return SET_YCP_CB( CB_ProgressScanDb, args );
}
/**
* @builtin CallbackErrorScanDb
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(integer error_code, string description)</code>. The callback function is evaluated when an error occurrs during RPM DB reading. error_code 0 means no error.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(integer error_code, string description)</code>. The callback function is evaluated when an error occurrs during RPM DB reading. error_code 0 means no error.
* @return void
*/
-YCPValue PkgFunctions::CallbackErrorScanDb( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackErrorScanDb( const YCPReference& args ) {
return SET_YCP_CB( CB_ErrorScanDb, args );
}
/**
* @builtin CallbackDoneScanDb
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(integer error_code, string description)</code>. The callback function is evaluated when RPM DB reading is finished. error_code 0 means no error.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(integer error_code, string description)</code>. The callback function is evaluated when RPM DB reading is finished. error_code 0 means no error.
* @return void
*/
-YCPValue PkgFunctions::CallbackDoneScanDb( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackDoneScanDb( const YCPReference& args ) {
return SET_YCP_CB( CB_DoneScanDb, args );
}
-YCPValue PkgFunctions::CallbackStartConvertDb( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackStartConvertDb( const YCPReference& args ) {
return SET_YCP_CB( CB_StartConvertDb, args );
}
-YCPValue PkgFunctions::CallbackProgressConvertDb( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackProgressConvertDb( const YCPReference& args ) {
return SET_YCP_CB( CB_ProgressConvertDb, args );
}
-YCPValue PkgFunctions::CallbackNotifyConvertDb( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackNotifyConvertDb( const YCPReference& args ) {
return SET_YCP_CB( CB_NotifyConvertDb, args );
}
-YCPValue PkgFunctions::CallbackStopConvertDb( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackStopConvertDb( const YCPReference& args ) {
return SET_YCP_CB( CB_StopConvertDb, args );
}
@@ -289,171 +289,171 @@
/**
* @builtin CallbackStartDeltaDownload
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string filename, integer download_size)</code>. If the download size is unknown download_size is 0. The callback function is evaluated when a delta RPM download has been started.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string filename, integer download_size)</code>. If the download size is unknown download_size is 0. The callback function is evaluated when a delta RPM download has been started.
* @return void
*/
-YCPValue PkgFunctions::CallbackStartDeltaDownload( const YCPString& func ) {
- return SET_YCP_CB( CB_StartDeltaDownload, func );
+YCPValue PkgFunctions::CallbackStartDeltaDownload( const YCPReference& args ) {
+ return SET_YCP_CB( CB_StartDeltaDownload, args);
}
/**
* @builtin CallbackProgressDeltaDownload
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>boolean (integer value)</code>. The callback function is evaluated when more than 5% of the size has been downloaded since the last evaluation. If the handler returns false the download is aborted.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>boolean (integer value)</code>. The callback function is evaluated when more than 5% of the size has been downloaded since the last evaluation. If the handler returns false the download is aborted.
* @return void
*/
-YCPValue PkgFunctions::CallbackProgressDeltaDownload( const YCPString& func ) {
- return SET_YCP_CB( CB_ProgressDeltaDownload, func );
+YCPValue PkgFunctions::CallbackProgressDeltaDownload( const YCPReference& args ) {
+ return SET_YCP_CB( CB_ProgressDeltaDownload, args);
}
/**
* @builtin CallbackProblemDeltaDownload
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string description)</code>. The callback function should inform user that a problem has occurred during delta file download. This is not fatal, it still may be possible to download the full RPM instead.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string description)</code>. The callback function should inform user that a problem has occurred during delta file download. This is not fatal, it still may be possible to download the full RPM instead.
* @return void
*/
-YCPValue PkgFunctions::CallbackProblemDeltaDownload( const YCPString& func ) {
- return SET_YCP_CB( CB_ProblemDeltaDownload, func );
+YCPValue PkgFunctions::CallbackProblemDeltaDownload( const YCPReference& args ) {
+ return SET_YCP_CB( CB_ProblemDeltaDownload, args);
}
/**
* @builtin CallbackStartDeltaApply
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string filename)</code>. The callback function should inform user that a delta application has been started.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string filename)</code>. The callback function should inform user that a delta application has been started.
* @return void
*/
-YCPValue PkgFunctions::CallbackStartDeltaApply( const YCPString& func ) {
- return SET_YCP_CB( CB_StartDeltaApply, func );
+YCPValue PkgFunctions::CallbackStartDeltaApply( const YCPReference& args ) {
+ return SET_YCP_CB( CB_StartDeltaApply, args);
}
/**
* @builtin CallbackProgressDeltaApply
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(integer value)</code>. The callback function is evaluated when more than 5% of the delta size has been applied since the last evaluation.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(integer value)</code>. The callback function is evaluated when more than 5% of the delta size has been applied since the last evaluation.
* @return void
*/
-YCPValue PkgFunctions::CallbackProgressDeltaApply( const YCPString& func ) {
- return SET_YCP_CB( CB_ProgressDeltaApply, func );
+YCPValue PkgFunctions::CallbackProgressDeltaApply( const YCPReference& args ) {
+ return SET_YCP_CB( CB_ProgressDeltaApply, args);
}
/**
* @builtin CallbackProblemDeltaApply
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string description)</code>. The callback function should inform user that a problem has occurred during delta file application. This is not fatal, it still may be possible to use the full RPM instead.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string description)</code>. The callback function should inform user that a problem has occurred during delta file application. This is not fatal, it still may be possible to use the full RPM instead.
* @return void
*/
-YCPValue PkgFunctions::CallbackProblemDeltaApply( const YCPString& func ) {
- return SET_YCP_CB( CB_ProblemDeltaApply, func );
+YCPValue PkgFunctions::CallbackProblemDeltaApply( const YCPReference& args ) {
+ return SET_YCP_CB( CB_ProblemDeltaApply, args);
}
/**
* @builtin CallbackStartPatchDownload
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string filename, integer download_size)</code>. If the download size is unknown download_size is 0. The callback function is evaluated when a patch download has been started.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string filename, integer download_size)</code>. If the download size is unknown download_size is 0. The callback function is evaluated when a patch download has been started.
* @return void
*/
-YCPValue PkgFunctions::CallbackStartPatchDownload( const YCPString& func ) {
- return SET_YCP_CB( CB_StartPatchDownload, func );
+YCPValue PkgFunctions::CallbackStartPatchDownload( const YCPReference& args ) {
+ return SET_YCP_CB( CB_StartPatchDownload, args);
}
/**
* @builtin CallbackProgressPatchDownload
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>boolean(integer value)</code>. The callback function is evaluated when more than 5% of the patch size has been downloaded since the last evaluation. If the handler returns false the download is aborted.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>boolean(integer value)</code>. The callback function is evaluated when more than 5% of the patch size has been downloaded since the last evaluation. If the handler returns false the download is aborted.
* @return void
*/
-YCPValue PkgFunctions::CallbackProgressPatchDownload( const YCPString& func ) {
- return SET_YCP_CB( CB_ProgressPatchDownload, func );
+YCPValue PkgFunctions::CallbackProgressPatchDownload( const YCPReference& args ) {
+ return SET_YCP_CB( CB_ProgressPatchDownload, args);
}
/**
* @builtin CallbackProblemPatchDownload
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string description)</code>. The callback function should inform user that a problem has occurred during download of the patch.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string description)</code>. The callback function should inform user that a problem has occurred during download of the patch.
* @return void
*/
-YCPValue PkgFunctions::CallbackProblemPatchDownload( const YCPString& func ) {
- return SET_YCP_CB( CB_ProblemPatchDownload, func );
+YCPValue PkgFunctions::CallbackProblemPatchDownload( const YCPReference& args ) {
+ return SET_YCP_CB( CB_ProblemPatchDownload, args);
}
/**
* @builtin CallbackFinishDeltaDownload
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void()</code>. The callback function is evaluated when the delta download has been finished.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void()</code>. The callback function is evaluated when the delta download has been finished.
* @return void
*/
-YCPValue PkgFunctions::CallbackFinishDeltaDownload( const YCPString& func)
+YCPValue PkgFunctions::CallbackFinishDeltaDownload( const YCPReference& args)
{
- return SET_YCP_CB( CB_FinishDeltaDownload, func );
+ return SET_YCP_CB( CB_FinishDeltaDownload, args);
}
/**
* @builtin CallbackFinishDeltaApply
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void()</code>. The callback function is evaluated when the delta download has been applied.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void()</code>. The callback function is evaluated when the delta download has been applied.
* @return void
*/
-YCPValue PkgFunctions::CallbackFinishDeltaApply( const YCPString& func)
+YCPValue PkgFunctions::CallbackFinishDeltaApply( const YCPReference& args)
{
- return SET_YCP_CB( CB_FinishDeltaApply, func );
+ return SET_YCP_CB( CB_FinishDeltaApply, args);
}
/**
* @builtin CallbackFinishPatchDownload
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void()</code>. The callback function is evaluated when the patch download has been finished.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void()</code>. The callback function is evaluated when the patch download has been finished.
* @return void
*/
-YCPValue PkgFunctions::CallbackFinishPatchDownload( const YCPString& func)
+YCPValue PkgFunctions::CallbackFinishPatchDownload( const YCPReference& args)
{
- return SET_YCP_CB( CB_FinishPatchDownload, func );
+ return SET_YCP_CB( CB_FinishPatchDownload, args);
}
/**
* @builtin CallbackSourceCreateStart
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string url)</code>. The callback is evaluated when a source creation has been started.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string url)</code>. The callback is evaluated when a source creation has been started.
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceCreateStart( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceCreateStart( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceCreateStart, func );
+ return SET_YCP_CB( CB_SourceCreateStart, args);
}
/**
* @builtin CallbackSourceProgressData
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>boolean(integer value)</code>. The callback function is evaluated when more than 5% of the data has been processed since the last evaluation. If the handler returns false the download is aborted.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>boolean(integer value)</code>. The callback function is evaluated when more than 5% of the data has been processed since the last evaluation. If the handler returns false the download is aborted.
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceCreateProgress( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceCreateProgress( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceCreateProgress, func );
+ return SET_YCP_CB( CB_SourceCreateProgress, args);
}
/**
* @builtin CallbackSourceCreateError
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>string(string url, string err_code, string description)</code>. err_code is "NO_ERROR", "NOT_FOUND" (the URL was not found), "IO" (I/O error) or "INVALID" (the source is not valid). The callback function must return "ABORT" or "RETRY". The callback function is evaluated when an error occurrs during creation of the source.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>string(string url, string err_code, string description)</code>. err_code is "NO_ERROR", "NOT_FOUND" (the URL was not found), "IO" (I/O error) or "INVALID" (the source is not valid). The callback function must return "ABORT" or "RETRY". The callback function is evaluated when an error occurrs during creation of the source.
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceCreateError( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceCreateError( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceCreateError, func );
+ return SET_YCP_CB( CB_SourceCreateError, args);
}
/**
* @builtin CallbackSourceCreateEnd
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string url, string err_code, string description)</code>. err_code is "NO_ERROR", "NOT_FOUND" (the URL was not found), "IO" (I/O error) or "INVALID" (the source is not valid). The callback function is evaluated when creation of the source has been finished.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string url, string err_code, string description)</code>. err_code is "NO_ERROR", "NOT_FOUND" (the URL was not found), "IO" (I/O error) or "INVALID" (the source is not valid). The callback function is evaluated when creation of the source has been finished.
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceCreateEnd( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceCreateEnd( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceCreateEnd, func );
+ return SET_YCP_CB( CB_SourceCreateEnd, args);
}
@@ -462,148 +462,148 @@
/**
* @builtin CallbackSourceProbeStart
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string url)</code>. The callback function is evaluated when source probing has been started.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string url)</code>. The callback function is evaluated when source probing has been started.
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceProbeStart( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceProbeStart( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceProbeStart, func );
+ return SET_YCP_CB( CB_SourceProbeStart, args);
}
/**
* @builtin CallbackSourceProbeFailed
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string url, string type)</code>. The callback function is evaluated when the probed source has different type.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string url, string type)</code>. The callback function is evaluated when the probed source has different type.
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceProbeFailed( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceProbeFailed( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceProbeFailed, func );
+ return SET_YCP_CB( CB_SourceProbeFailed, args);
}
/**
* @builtin CallbackSourceProbeSucceeded
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string url, string type)</code>. The callback function is evaluated when the probed source has type <code>type</code>.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string url, string type)</code>. The callback function is evaluated when the probed source has type <code>type</code>.
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceProbeSucceeded( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceProbeSucceeded( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceProbeSucceeded, func );
+ return SET_YCP_CB( CB_SourceProbeSucceeded, args);
}
/**
* @builtin CallbackSourceProbeEnd
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string url, string error, string reason)</code>. The callback function is evaluated when source probing has been finished.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string url, string error, string reason)</code>. The callback function is evaluated when source probing has been finished.
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceProbeEnd( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceProbeEnd( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceProbeEnd, func );
+ return SET_YCP_CB( CB_SourceProbeEnd, args);
}
/**
* @builtin CallbackSourceProbeProgress
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>boolean(integer value)</code>. If the handler returns false the refresh is aborted.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>boolean(integer value)</code>. If the handler returns false the refresh is aborted.
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceProbeProgress( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceProbeProgress( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceProbeProgress, func );
+ return SET_YCP_CB( CB_SourceProbeProgress, args);
}
/**
* @builtin CallbackSourceProbeError
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>string(string url, string error, string reason)</code>. The callback function is evaluated when an error occurrs. The callback function must return string "ABORT" or "RETRY".
+ * @param string args Name of the callback handler function. Required callback prototype is <code>string(string url, string error, string reason)</code>. The callback function is evaluated when an error occurrs. The callback function must return string "ABORT" or "RETRY".
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceProbeError( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceProbeError( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceProbeError, func );
+ return SET_YCP_CB( CB_SourceProbeError, args);
}
-YCPValue PkgFunctions::CallbackSourceReportInit( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceReportInit( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceReportInit, func );
+ return SET_YCP_CB( CB_SourceReportInit, args);
}
-YCPValue PkgFunctions::CallbackSourceReportDestroy( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceReportDestroy( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceReportDestroy, func );
+ return SET_YCP_CB( CB_SourceReportDestroy, args);
}
-YCPValue PkgFunctions::CallbackSourceCreateInit( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceCreateInit( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceCreateInit, func );
+ return SET_YCP_CB( CB_SourceCreateInit, args);
}
-YCPValue PkgFunctions::CallbackSourceCreateDestroy( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceCreateDestroy( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceCreateDestroy, func );
+ return SET_YCP_CB( CB_SourceCreateDestroy, args);
}
/**
* @builtin CallbackSourceProbeStart
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(integer source_id, string url, string task)</code>.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(integer source_id, string url, string task)</code>.
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceReportStart( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceReportStart( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceReportStart, func );
+ return SET_YCP_CB( CB_SourceReportStart, args);
}
/**
* @builtin CallbackSourceReportProgress
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>boolean(integer value)</code>. If the handler returns false the task is aborted.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>boolean(integer value)</code>. If the handler returns false the task is aborted.
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceReportProgress( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceReportProgress( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceReportProgress, func );
+ return SET_YCP_CB( CB_SourceReportProgress, args);
}
/**
* @builtin CallbackSourceReportError
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>string(integer numeric_id, string url, string error, string reason)</code>. Parameter error is "NO_ERROR", "NOT_FOUND", "IO" or "INVALID". The callback function is evaluated when an error occurrs. The callback function must return string "ABORT", "IGNORE" or "RETRY".
+ * @param string args Name of the callback handler function. Required callback prototype is <code>string(integer numeric_id, string url, string error, string reason)</code>. Parameter error is "NO_ERROR", "NOT_FOUND", "IO" or "INVALID". The callback function is evaluated when an error occurrs. The callback function must return string "ABORT", "IGNORE" or "RETRY".
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceReportError( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceReportError( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceReportError, func );
+ return SET_YCP_CB( CB_SourceReportError, args);
}
/**
* @builtin CallbackSourceReportEnd
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(integer numeric_id, string url, string task, string error, string reason)</code>. Parameter error is "NO_ERROR", "NOT_FOUND", "IO" or "INVALID". The callback function is evaluated when an error occurrs. The callback function must return string "ABORT", "IGNORE" or "RETRY".
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(integer numeric_id, string url, string task, string error, string reason)</code>. Parameter error is "NO_ERROR", "NOT_FOUND", "IO" or "INVALID". The callback function is evaluated when an error occurrs. The callback function must return string "ABORT", "IGNORE" or "RETRY".
* @return void
*/
-YCPValue PkgFunctions::CallbackSourceReportEnd( const YCPString& func)
+YCPValue PkgFunctions::CallbackSourceReportEnd( const YCPReference& args)
{
- return SET_YCP_CB( CB_SourceReportEnd, func );
+ return SET_YCP_CB( CB_SourceReportEnd, args);
}
-YCPValue PkgFunctions::CallbackStartDownload( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackStartDownload( const YCPReference& args ) {
return SET_YCP_CB( CB_StartDownload, args );
}
/**
* @builtin CallbackProgressDownload
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>boolean(integer percent, integer average_bps, integer current_bps)</code>. The callback function is evaluated when at least 5% has been downloaded. If the callback function returns false the download is aborted.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>boolean(integer percent, integer average_bps, integer current_bps)</code>. The callback function is evaluated when at least 5% has been downloaded. If the callback function returns false the download is aborted.
* @return void
*/
-YCPValue PkgFunctions::CallbackProgressDownload( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackProgressDownload( const YCPReference& args ) {
return SET_YCP_CB( CB_ProgressDownload, args );
}
-YCPValue PkgFunctions::CallbackDoneDownload( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackDoneDownload( const YCPReference& args ) {
return SET_YCP_CB( CB_DoneDownload, args );
}
@@ -611,145 +611,145 @@
/**
* @builtin CallbackScriptStart
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string patch_name, string patch_version, string patch_arch, string script_path, boolean installation)</code>. Parameter 'installation' is true when the script is called during installation of a patch, false means patch removal. The callback function is evaluated when a script (which is part of a patch) has been started.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string patch_name, string patch_version, string patch_arch, string script_path, boolean installation)</code>. Parameter 'installation' is true when the script is called during installation of a patch, false means patch removal. The callback function is evaluated when a script (which is part of a patch) has been started.
* @return void
*/
-YCPValue PkgFunctions::CallbackScriptStart( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackScriptStart( const YCPReference& args ) {
return SET_YCP_CB( CB_ScriptStart, args );
}
/**
* @builtin CallbackScriptProgress
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(boolean ping, string output)</code>. If parameter 'ping' is true than there is no output available, but the script is still running (This functionality enables aborting the script). If it is false, 'output' contains (part of) the script output. The callback function is evaluated when a script is running.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(boolean ping, string output)</code>. If parameter 'ping' is true than there is no output available, but the script is still running (This functionality enables aborting the script). If it is false, 'output' contains (part of) the script output. The callback function is evaluated when a script is running.
* @return void
*/
-YCPValue PkgFunctions::CallbackScriptProgress( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackScriptProgress( const YCPReference& args ) {
return SET_YCP_CB( CB_ScriptProgress, args );
}
/**
* @builtin CallbackScriptProblem
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string description)</code>. The callback function is evaluated when an error occurrs.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string description)</code>. The callback function is evaluated when an error occurrs.
* @return void
*/
-YCPValue PkgFunctions::CallbackScriptProblem( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackScriptProblem( const YCPReference& args ) {
return SET_YCP_CB( CB_ScriptProblem, args );
}
/**
* @builtin CallbackScriptFinish
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void()</code>. The callback function is evaluated when the script has been finished.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void()</code>. The callback function is evaluated when the script has been finished.
* @return void
*/
-YCPValue PkgFunctions::CallbackScriptFinish( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackScriptFinish( const YCPReference& args ) {
return SET_YCP_CB( CB_ScriptFinish, args );
}
/**
* @builtin CallbackMessage
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(string patch_name, string patch_version, string patch_arch, string message)</code>. The callback function is evaluated when a message which is part of a patch should be displayed.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(string patch_name, string patch_version, string patch_arch, string message)</code>. The callback function is evaluated when a message which is part of a patch should be displayed.
* @return void
*/
-YCPValue PkgFunctions::CallbackMessage( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackMessage( const YCPReference& args ) {
return SET_YCP_CB( CB_Message, args );
}
/**
* @builtin CallbackAuthentication
* @short Register callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>map(string url, string message, string username, string password)</code>. The returned map must contain these items: $[ "username" : string, "password" : string, "continue" : boolean ]. If <code>"continue"</code> value is false or is missing the authentification (and the download process) is canceled. The callback function is evaluated when user authentication is required to download the requested file.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>map(string url, string message, string username, string password)</code>. The returned map must contain these items: $[ "username" : string, "password" : string, "continue" : boolean ]. If <code>"continue"</code> value is false or is missing the authentification (and the download process) is canceled. The callback function is evaluated when user authentication is required to download the requested file.
* @return void
*/
-YCPValue PkgFunctions::CallbackAuthentication( const YCPString& func ) {
- return SET_YCP_CB( CB_Authentication, func );
+YCPValue PkgFunctions::CallbackAuthentication( const YCPReference& args ) {
+ return SET_YCP_CB( CB_Authentication, args);
}
/**
* @builtin CallbackProgressReportStart
* @short Register a callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(integer id, string task, boolean in_percent, boolean is_alive, integer min, integer max, integer val_raw, integer val_percent)</code>. Parameter id is used for callback identification in the Progress() and in the End() callbacks, task describe the action. Parameter in_percent defines whether the progress will be reported in percent, if is_alive is true then the progress will be 'still alive' tick, if both in_percent and is_alive are then a raw value is reported (e.g. number of processed files without knowing the total number).
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(integer id, string task, boolean in_percent, boolean is_alive, integer min, integer max, integer val_raw, integer val_percent)</code>. Parameter id is used for callback identification in the Progress() and in the End() callbacks, task describe the action. Parameter in_percent defines whether the progress will be reported in percent, if is_alive is true then the progress will be 'still alive' tick, if both in_percent and is_alive are then a raw value is reported (e.g. number of processed files without knowing the total number).
* The callback function is evaluated when an progress event starts
* @return void
*/
-YCPValue PkgFunctions::CallbackProgressReportStart(const YCPString& func)
+YCPValue PkgFunctions::CallbackProgressReportStart(const YCPReference& args)
{
- return SET_YCP_CB( CB_ProgressStart, func );
+ return SET_YCP_CB( CB_ProgressStart, args);
}
/**
* @builtin CallbackProgressReportProgress
* @short Register a callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>boolean(integer id, integer val_raw, integer val_percent)</code>. Parameter id identifies the callback, val_raw is raw status, val_percent is in percent or if the total progress is not known it's -1 (the callback is a 'tick' in this case). If the handler returns false the task is aborted.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>boolean(integer id, integer val_raw, integer val_percent)</code>. Parameter id identifies the callback, val_raw is raw status, val_percent is in percent or if the total progress is not known it's -1 (the callback is a 'tick' in this case). If the handler returns false the task is aborted.
* @return void
*/
-YCPValue PkgFunctions::CallbackProgressReportProgress(const YCPString& func)
+YCPValue PkgFunctions::CallbackProgressReportProgress(const YCPReference& args)
{
- return SET_YCP_CB( CB_ProgressProgress, func );
+ return SET_YCP_CB( CB_ProgressProgress, args);
}
/**
* @builtin CallbackProgressReportEnd
* @short Register a callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void(integer id)</code>. The id identifies the callback.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void(integer id)</code>. The id identifies the callback.
* The callback function is evaluated when an progress event finishes
* @return void
*/
-YCPValue PkgFunctions::CallbackProgressReportEnd(const YCPString& func)
+YCPValue PkgFunctions::CallbackProgressReportEnd(const YCPReference& args)
{
- return SET_YCP_CB( CB_ProgressDone, func );
+ return SET_YCP_CB( CB_ProgressDone, args);
}
-YCPValue PkgFunctions::CallbackInitDownload( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackInitDownload( const YCPReference& args ) {
return SET_YCP_CB( CB_InitDownload, args );
}
-YCPValue PkgFunctions::CallbackDestDownload( const YCPString& args ) {
+YCPValue PkgFunctions::CallbackDestDownload( const YCPReference& args ) {
return SET_YCP_CB( CB_DestDownload, args );
}
-YCPValue PkgFunctions::CallbackProcessStart( const YCPString& func )
+YCPValue PkgFunctions::CallbackProcessStart( const YCPReference& args )
{
- return SET_YCP_CB( CB_ProcessStart, func );
+ return SET_YCP_CB( CB_ProcessStart, args);
}
-YCPValue PkgFunctions::CallbackProcessNextStage( const YCPString& func )
+YCPValue PkgFunctions::CallbackProcessNextStage( const YCPReference& args )
{
- return SET_YCP_CB( CB_ProcessNextStage, func );
+ return SET_YCP_CB( CB_ProcessNextStage, args);
}
-YCPValue PkgFunctions::CallbackProcessDone( const YCPString& func )
+YCPValue PkgFunctions::CallbackProcessDone( const YCPReference& args )
{
- return SET_YCP_CB( CB_ProcessFinished, func );
+ return SET_YCP_CB( CB_ProcessFinished, args);
}
-YCPValue PkgFunctions::CallbackProcessProgress( const YCPString& func )
+YCPValue PkgFunctions::CallbackProcessProgress( const YCPReference& args )
{
- return SET_YCP_CB( CB_ProcessProgress, func);
+ return SET_YCP_CB( CB_ProcessProgress, args);
}
/**
* @builtin CallbackStartRefresh
* @short Register a callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void()</code>.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void()</code>.
* The callback function is evaluated when repository refresh is started
* @return void
*/
-YCPValue PkgFunctions::CallbackStartRefresh( const YCPString& func )
+YCPValue PkgFunctions::CallbackStartRefresh( const YCPReference& args )
{
- return SET_YCP_CB( CB_StartSourceRefresh, func);
+ return SET_YCP_CB( CB_StartSourceRefresh, args);
}
/**
* @builtin CallbackDoneRefresh
* @short Register a callback function
- * @param string func Name of the callback handler function. Required callback prototype is <code>void()</code>.
+ * @param string args Name of the callback handler function. Required callback prototype is <code>void()</code>.
* The callback function is evaluated when repository refresh is finished
* @return void
*/
-YCPValue PkgFunctions::CallbackDoneRefresh( const YCPString& func )
+YCPValue PkgFunctions::CallbackDoneRefresh( const YCPReference& args )
{
- return SET_YCP_CB( CB_DoneSourceRefresh, func);
+ return SET_YCP_CB( CB_DoneSourceRefresh, args);
}
#undef SET_YCP_CB
Modified: trunk/pkg-bindings/src/PkgFunctions.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/PkgFunctions.h?rev=45966&r1=45965&r2=45966&view=diff
==============================================================================
--- trunk/pkg-bindings/src/PkgFunctions.h (original)
+++ trunk/pkg-bindings/src/PkgFunctions.h Wed Apr 2 15:22:57 2008
@@ -39,6 +39,7 @@
class YCPString;
class YCPInteger;
class YCPVoid;
+class YCPReference;
#include
@@ -215,197 +216,206 @@
YCPValue Connect ();
// callbacks
- /* TYPEINFO: void(string) */
- YCPValue CallbackStartProvide (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackProgressProvide (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackDoneProvide (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackStartPackage (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackProgressPackage (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackDonePackage (const YCPString& func);
-
- /* TYPEINFO: void(string) */
- YCPValue CallbackStartDeltaDownload( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackProgressDeltaDownload( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackProblemDeltaDownload( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackStartDeltaApply( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackProgressDeltaApply( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackProblemDeltaApply( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackStartPatchDownload( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackProgressPatchDownload( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackProblemPatchDownload( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackFinishDeltaDownload( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackFinishDeltaApply( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackFinishPatchDownload( const YCPString& func);
-
- /* TYPEINFO: void(string) */
- YCPValue CallbackStartDownload (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackProgressDownload (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackDoneDownload (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackInitDownload( const YCPString& args );
- /* TYPEINFO: void(string) */
- YCPValue CallbackDestDownload( const YCPString& args );
-
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceCreateStart( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceCreateProgress( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceCreateError( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceCreateEnd( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceCreateInit( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceCreateDestroy( const YCPString& func);
-
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceProbeStart( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceProbeFailed( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceProbeSucceeded( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceProbeEnd( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceProbeProgress( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceProbeError( const YCPString& func);
-
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceReportInit( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceReportDestroy( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceReportStart( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceReportProgress( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceReportError( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceReportEnd( const YCPString& func);
-
- /* TYPEINFO: void(string) */
- YCPValue CallbackProgressReportStart(const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackProgressReportProgress(const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackProgressReportEnd(const YCPString& func);
-
- /* TYPEINFO: void(string) */
- YCPValue CallbackStartRefresh( const YCPString& func );
- /* TYPEINFO: void(string) */
- YCPValue CallbackDoneRefresh( const YCPString& func );
+ /* TYPEINFO: void(void(string,integer,boolean)) */
+ YCPValue CallbackStartProvide (const YCPReference& args);
+ /* TYPEINFO: void(boolean(integer)) */
+ YCPValue CallbackProgressProvide (const YCPReference& args);
+ // FIXME: create ErrorProvide
+ /* TYPEINFO: void(string(integer,string,string)) */
+ YCPValue CallbackDoneProvide (const YCPReference& args);
+ /* TYPEINFO: void(void(string,string,integer,boolean)) */
+ YCPValue CallbackStartPackage (const YCPReference& args);
+ /* TYPEINFO: void(boolean(integer)) */
+ YCPValue CallbackProgressPackage (const YCPReference& args);
+ /* TYPEINFO: void(string(integer,string)) */
+ YCPValue CallbackDonePackage (const YCPReference& args);
+
+ /* TYPEINFO: void(void(string,integer)) */
+ YCPValue CallbackStartDeltaDownload( const YCPReference& args);
+ /* TYPEINFO: void(boolean(integer)) */
+ YCPValue CallbackProgressDeltaDownload( const YCPReference& args);
+ /* TYPEINFO: void(void(string)) */
+ YCPValue CallbackProblemDeltaDownload( const YCPReference& args);
+ /* TYPEINFO: void(void(string)) */
+ YCPValue CallbackStartDeltaApply( const YCPReference& args);
+ /* TYPEINFO: void(void(integer)) */
+ YCPValue CallbackProgressDeltaApply( const YCPReference& args);
+ /* TYPEINFO: void(void(string)) */
+ YCPValue CallbackProblemDeltaApply( const YCPReference& args);
+ /* TYPEINFO: void(void(string,integer)) */
+ YCPValue CallbackStartPatchDownload( const YCPReference& args);
+ /* TYPEINFO: void(boolean(integer)) */
+ YCPValue CallbackProgressPatchDownload( const YCPReference& args);
+ /* TYPEINFO: void(void(string)) */
+ YCPValue CallbackProblemPatchDownload( const YCPReference& args);
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackFinishDeltaDownload( const YCPReference& args);
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackFinishDeltaApply( const YCPReference& args);
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackFinishPatchDownload( const YCPReference& args);
+
+ /* TYPEINFO: void(void(string,string)) */
+ YCPValue CallbackStartDownload (const YCPReference& args);
+ /* TYPEINFO: void(boolean(integer,integer,integer)) */
+ YCPValue CallbackProgressDownload (const YCPReference& args);
+ /* TYPEINFO: void(void(integer,string)) */
+ YCPValue CallbackDoneDownload (const YCPReference& args);
+
+ /* TYPEINFO: void(void(string)) */
+ YCPValue CallbackInitDownload( const YCPReference& args );
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackDestDownload( const YCPReference& args );
+
+ /* TYPEINFO: void(void(string)) */
+ YCPValue CallbackSourceCreateStart( const YCPReference& args);
+ /* TYPEINFO: void(boolean(integer)) */
+ YCPValue CallbackSourceCreateProgress( const YCPReference& args);
+ /* TYPEINFO: void(symbol(string,symbol,string)) */
+ YCPValue CallbackSourceCreateError( const YCPReference& args);
+ /* TYPEINFO: void(void(string,symbol,string)) */
+ YCPValue CallbackSourceCreateEnd( const YCPReference& args);
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackSourceCreateInit( const YCPReference& args);
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackSourceCreateDestroy( const YCPReference& args);
+
+ /* TYPEINFO: void(void(string)) */
+ YCPValue CallbackSourceProbeStart( const YCPReference& args);
+ /* TYPEINFO: void(void(string,string)) */
+ YCPValue CallbackSourceProbeFailed( const YCPReference& args);
+ /* TYPEINFO: void(void(string,string)) */
+ YCPValue CallbackSourceProbeSucceeded( const YCPReference& args);
+ /* TYPEINFO: void(void(string,symbol,string)) */
+ YCPValue CallbackSourceProbeEnd( const YCPReference& args);
+ /* TYPEINFO: void(boolean(string,integer)) */
+ YCPValue CallbackSourceProbeProgress( const YCPReference& args);
+ /* TYPEINFO: void(symbol(string,symbol,string)) */
+ YCPValue CallbackSourceProbeError( const YCPReference& args);
+
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackSourceReportInit( const YCPReference& args);
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackSourceReportDestroy( const YCPReference& args);
+ /* TYPEINFO: void(void(integer,string,string)) */
+ YCPValue CallbackSourceReportStart( const YCPReference& args);
+ /* TYPEINFO: void(boolean(integer)) */
+ YCPValue CallbackSourceReportProgress( const YCPReference& args);
+ /* TYPEINFO: void(symbol(integer,string,symbol,string)) */
+ YCPValue CallbackSourceReportError( const YCPReference& args);
+ /* TYPEINFO: void(void(integer,string,string,symbol,string)) */
+ YCPValue CallbackSourceReportEnd( const YCPReference& args);
+
+ /* TYPEINFO: void(void(integer,string,boolean,boolean,integer,integer,integer,integer)) */
+ YCPValue CallbackProgressReportStart(const YCPReference& args);
+ /* TYPEINFO: void(boolean(integer,integer,integer)) */
+ YCPValue CallbackProgressReportProgress(const YCPReference& args);
+ /* TYPEINFO: void(void(integer)) */
+ YCPValue CallbackProgressReportEnd(const YCPReference& args);
+
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackStartRefresh( const YCPReference& args );
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackDoneRefresh( const YCPReference& args );
// Script (patch installation) callbacks
- /* TYPEINFO: void(string) */
- YCPValue CallbackScriptStart( const YCPString& args );
- /* TYPEINFO: void(string) */
- YCPValue CallbackScriptProgress( const YCPString& args );
- /* TYPEINFO: void(string) */
- YCPValue CallbackScriptProblem( const YCPString& args );
- /* TYPEINFO: void(string) */
- YCPValue CallbackScriptFinish( const YCPString& args );
- /* TYPEINFO: void(string) */
- YCPValue CallbackMessage( const YCPString& args );
-
- /* TYPEINFO: void(string) */
- YCPValue CallbackAuthentication( const YCPString& func );
-
- /* TYPEINFO: void(string) */
- YCPValue CallbackMediaChange (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackSourceChange (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackYouProgress (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackYouPatchProgress (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackYouError (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackYouMessage (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackYouLog (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackYouExecuteYcpScript (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackYouScriptProgress (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackStartRebuildDb (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackProgressRebuildDb (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackNotifyRebuildDb (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackStopRebuildDb (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackStartConvertDb (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackProgressConvertDb (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackNotifyConvertDb (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackStopConvertDb (const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackStartScanDb( const YCPString& args );
- /* TYPEINFO: void(string) */
- YCPValue CallbackProgressScanDb( const YCPString& args );
- /* TYPEINFO: void(string) */
- YCPValue CallbackErrorScanDb( const YCPString& args );
- /* TYPEINFO: void(string) */
- YCPValue CallbackDoneScanDb( const YCPString& args );
-
-
- /* TYPEINFO: void(string) */
- YCPValue CallbackResolvableReport( const YCPString& func );
- /* TYPEINFO: void(string) */
- YCPValue CallbackImportGpgKey( const YCPString& func );
- /* TYPEINFO: void(string) */
- YCPValue CallbackAcceptNonTrustedGpgKey( const YCPString& args );
- /* TYPEINFO: void(string) */
- YCPValue CallbackAcceptUnknownGpgKey( const YCPString& func );
- /* TYPEINFO: void(string) */
- YCPValue CallbackAcceptUnsignedFile( const YCPString& func );
- /* TYPEINFO: void(string) */
- YCPValue CallbackAcceptVerificationFailed( const YCPString& func );
- /* TYPEINFO: void(string) */
- YCPValue CallbackAcceptWrongDigest( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackAcceptUnknownDigest( const YCPString& func);
- /* TYPEINFO: void(string) */
- YCPValue CallbackTrustedKeyAdded( const YCPString& func );
- /* TYPEINFO: void(string) */
- YCPValue CallbackTrustedKeyRemoved( const YCPString& func );
- /* TYPEINFO: void(string) */
- YCPValue CallbackAcceptFileWithoutChecksum( const YCPString& func );
-
-
- /* TYPEINFO: void(string) */
- YCPValue CallbackProcessStart( const YCPString& func );
- /* TYPEINFO: void(string) */
- YCPValue CallbackProcessProgress( const YCPString& func );
- /* TYPEINFO: void(string) */
- YCPValue CallbackProcessNextStage( const YCPString& func );
- /* TYPEINFO: void(string) */
- YCPValue CallbackProcessDone( const YCPString& func );
+ /* TYPEINFO: void(void(string,string,string,string,boolean)) */
+ YCPValue CallbackScriptStart( const YCPReference& args );
+ /* TYPEINFO: void(boolean(boolean,string)) */
+ YCPValue CallbackScriptProgress( const YCPReference& args );
+ /* TYPEINFO: void(void(string)) */
+ YCPValue CallbackScriptProblem( const YCPReference& args );
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackScriptFinish( const YCPReference& args );
+ /* TYPEINFO: void(void(string,string,string,string)) */
+ YCPValue CallbackMessage( const YCPReference& args );
+
+ /* TYPEINFO: void(map(string,string,string,string)) */
+ YCPValue CallbackAuthentication( const YCPReference& args );
+
+ /* TYPEINFO: void(string(string,string,string,string,integer,string,integer,string,boolean,list<string>,integer)) */
+ YCPValue CallbackMediaChange (const YCPReference& args);
+ /* TYPEINFO: void(void(integer,integer)) */
+ YCPValue CallbackSourceChange (const YCPReference& args);
+
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackYouProgress (const YCPReference& args);
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackYouPatchProgress (const YCPReference& args);
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackYouError (const YCPReference& args);
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackYouMessage (const YCPReference& args);
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackYouLog (const YCPReference& args);
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackYouExecuteYcpScript (const YCPReference& args);
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackYouScriptProgress (const YCPReference& args);
+
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackStartRebuildDb (const YCPReference& args);
+ /* TYPEINFO: void(void(integer)) */
+ YCPValue CallbackProgressRebuildDb (const YCPReference& args);
+ // FIXME: not used
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackNotifyRebuildDb (const YCPReference& args);
+ /* TYPEINFO: void(void(integer,string)) */
+ YCPValue CallbackStopRebuildDb (const YCPReference& args);
+
+ /* TYPEINFO: void(void(string)) */
+ YCPValue CallbackStartConvertDb (const YCPReference& args);
+ /* TYPEINFO: void(void(integer,string)) */
+ YCPValue CallbackProgressConvertDb (const YCPReference& args);
+ // FIXME: not used
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackNotifyConvertDb (const YCPReference& args);
+ /* TYPEINFO: void(void(integer,string)) */
+ YCPValue CallbackStopConvertDb (const YCPReference& args);
+
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackStartScanDb( const YCPReference& args );
+ /* TYPEINFO: void(boolean(integer)) */
+ YCPValue CallbackProgressScanDb( const YCPReference& args );
+ /* TYPEINFO: void(string(integer,string)) */
+ YCPValue CallbackErrorScanDb( const YCPReference& args );
+ /* TYPEINFO: void(void(integer,string)) */
+ YCPValue CallbackDoneScanDb( const YCPReference& args );
+
+
+ /* TYPEINFO: void(void(string,string,string)) */
+ YCPValue CallbackResolvableReport( const YCPReference& args );
+
+ /* TYPEINFO: void(boolean(map)) */
+ YCPValue CallbackImportGpgKey( const YCPReference& args );
+ /* TYPEINFO: void(boolean(map)) */
+ YCPValue CallbackAcceptNonTrustedGpgKey( const YCPReference& args );
+ /* TYPEINFO: void(boolean(string,string)) */
+ YCPValue CallbackAcceptUnknownGpgKey( const YCPReference& args );
+ /* TYPEINFO: void(boolean(string)) */
+ YCPValue CallbackAcceptUnsignedFile( const YCPReference& args );
+ /* TYPEINFO: void(boolean(string,map)) */
+ YCPValue CallbackAcceptVerificationFailed( const YCPReference& args );
+ /* TYPEINFO: void(boolean(string,string,string)) */
+ YCPValue CallbackAcceptWrongDigest( const YCPReference& args);
+ /* TYPEINFO: void(boolean(string,string)) */
+ YCPValue CallbackAcceptUnknownDigest( const YCPReference& args);
+ /* TYPEINFO: void(void(map)) */
+ YCPValue CallbackTrustedKeyAdded( const YCPReference& args );
+ /* TYPEINFO: void(void(map)) */
+ YCPValue CallbackTrustedKeyRemoved( const YCPReference& args );
+ /* TYPEINFO: void(boolean(string)) */
+ YCPValue CallbackAcceptFileWithoutChecksum( const YCPReference& args );
+
+
+ /* TYPEINFO: void(void(string,list<string>,string)) */
+ YCPValue CallbackProcessStart( const YCPReference& args );
+ /* TYPEINFO: void(boolean(integer)) */
+ YCPValue CallbackProcessProgress( const YCPReference& args );
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackProcessNextStage( const YCPReference& args );
+ /* TYPEINFO: void(void()) */
+ YCPValue CallbackProcessDone( const YCPReference& args );
// source related
Modified: trunk/pkg-bindings/src/PkgProgress.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/PkgProgress.cc?rev=45966&r1=45965&r2=45966&view=diff
==============================================================================
--- trunk/pkg-bindings/src/PkgProgress.cc (original)
+++ trunk/pkg-bindings/src/PkgProgress.cc Wed Apr 2 15:22:57 2008
@@ -104,7 +104,16 @@
{
ycp_handler->appendParameter(YCPInteger(progress.reportValue()));
// evaluate the callback function
- ycp_handler->evaluateCall();
+ YCPValue ret = ycp_handler->evaluateCall();
+
+ if (!ret.isNull() && ret->isBoolean())
+ {
+ return ret->asBoolean()->value();
+ }
+ else
+ {
+ y2error("Callback evaluated to a non-boolean value: %s", ret->toString().c_str());
+ }
}
}
Modified: trunk/pkg-bindings/src/Y2PkgFunction.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Y2PkgFunction.cc?rev=45966&r1=45965&r2=45966&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Y2PkgFunction.cc (original)
+++ trunk/pkg-bindings/src/Y2PkgFunction.cc Wed Apr 2 15:22:57 2008
@@ -31,6 +31,7 @@
#include
#include
#include
+#include
#include
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org