[zypp-commit] r10846 - in /trunk/libzypp/zypp: VendorSupportOptions.cc VendorSupportOptions.h
Author: dmacvicar Date: Wed Aug 13 18:27:28 2008 New Revision: 10846 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10846&view=rev Log: add strings for user interfaces Modified: trunk/libzypp/zypp/VendorSupportOptions.cc trunk/libzypp/zypp/VendorSupportOptions.h Modified: trunk/libzypp/zypp/VendorSupportOptions.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/VendorSupportOptions.cc?rev=10846&r1=10845&r2=10846&view=diff ============================================================================== --- trunk/libzypp/zypp/VendorSupportOptions.cc (original) +++ trunk/libzypp/zypp/VendorSupportOptions.cc Wed Aug 13 18:27:28 2008 @@ -1,9 +1,61 @@ #include "zypp/VendorSupportOptions.h" +#include "zypp/base/Gettext.h" namespace zypp { +std::string +asUserString( VendorSupportOption opt ) +{ + switch (opt) + { + case VendorSupportUnknown: + return _("unknown"); + break; + case VendorSupportUnsupported: + return _("unsupported"); + break; + case VendorSupportLevel1: + return _("Level 1"); + break; + case VendorSupportLevel2: + return _("Level 2"); + break; + case VendorSupportLevel3: + return _("Level 3"); + break; + case VendorSupportACC: + return _("Additional Customer Contract Necessary"); + } + return _("invalid"); +} + +std::string asUserStringDescription( VendorSupportOption opt ) +{ + switch (opt) + { + case VendorSupportUnknown: + return _("The level of support is unspecified"); + break; + case VendorSupportUnsupported: + return _("The vendor does not provide support."); + break; + case VendorSupportLevel1: + return _("Problem determination, which means technical support designed to provide compatibility information, installation assistance, usage support, on-going maintenance and basic troubleshooting. Level 1 Support is not intended to correct product defect errors."); + break; + case VendorSupportLevel2: + return _("Problem isolation, which means technical support designed to duplicate customer problems, isolate problem area and provide resolution for problems not resolved by Level 1 Support."); + break; + case VendorSupportLevel3: + return _("Problem resolution, which means technical support designed to resolve complex problems by engaging engineering in resolution of product defects which have been identified by Level 2 Support."); + break; + case VendorSupportACC: + return _("An additional customer contract is necessary for getting support."); + } + return _("Unknown support option. Description not available"); +} + +} -} Modified: trunk/libzypp/zypp/VendorSupportOptions.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/VendorSupportOptions.h?rev=10846&r1=10845&r2=10846&view=diff ============================================================================== --- trunk/libzypp/zypp/VendorSupportOptions.h (original) +++ trunk/libzypp/zypp/VendorSupportOptions.h Wed Aug 13 18:27:28 2008 @@ -12,6 +12,7 @@ #ifndef ZYPP_VendorSupportOptions_H #define ZYPP_VendorSupportOptions_H +#include <string> #include "zypp/base/Flags.h" namespace zypp @@ -52,12 +53,35 @@ * * May have different semantics for different organizations. */ - VendorSupportLevel3 = 0x0004 + VendorSupportLevel3 = 0x0004, + /** + * Additional Customer Contract necessary + */ + VendorSupportACC = 0x0008 }; // Make a flag set for this ZYPP_DECLARE_FLAGS(VendorSupportOptions,VendorSupportOption); ZYPP_DECLARE_OPERATORS_FOR_FLAGS(VendorSupportOptions) + + /** + * converts the support option to a name intended to be printed + * to the user. + * + * Note the description is based in the way Novell defines the support + * levels, and the semantics may be different for other vendors. + */ + std::string asUserString( VendorSupportOption ); + + /** + * converts the support option to a description intended to be printed + * to the user. + * + * Note the description is based in the way Novell defines the support + * levels, and the semantics may be different for other vendors. + */ + std::string asUserStringDescription( VendorSupportOption ); + } #endif -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
dmacvicar@svn.opensuse.org