00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00012 #include "zypp/detail/ScriptImplIf.h" 00013 00015 namespace zypp 00016 { 00017 00018 namespace detail 00019 { 00020 00022 // Default implementation of ScriptImplIf attributes, 00023 // as far as resonable. 00025 00026 bool ScriptImplIf::doAvailable() const 00027 { return ! ( doScriptInlined().empty() 00028 && doScriptLocation().filename().empty() ); } 00029 00030 unsigned ScriptImplIf::mediaNr() const 00031 { return( doScriptInlined().empty() ? doScriptLocation().medianr() : 0 ); } 00032 00033 std::string ScriptImplIf::doScriptInlined() const 00034 { return std::string(); } 00035 00036 OnMediaLocation ScriptImplIf::doScriptLocation() const 00037 { return OnMediaLocation(); } 00038 00039 bool ScriptImplIf::undoAvailable() const 00040 { return ! ( undoScriptInlined().empty() 00041 && undoScriptLocation().filename().empty() ); } 00042 00043 std::string ScriptImplIf::undoScriptInlined() const 00044 { return std::string(); } 00045 00046 OnMediaLocation ScriptImplIf::undoScriptLocation() const 00047 { return OnMediaLocation(); } 00048 00050 } // namespace detail 00053 } // namespace zypp
1.5.3