1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
10 #ifndef ZYPP_SERVICE_TYPE_H_
11 #define ZYPP_SERVICE_TYPE_H_
22 * \short Service type enumeration
24 * Currently we have only RIS service, but more can come later.
29 * Repository Index Service (RIS)
30 * (formerly known as 'Novell Update' (NU) service)
32 static const ServiceType RIS;
33 /** No service set. */
34 static const ServiceType NONE;
42 ServiceType() : _type(NONE_e) {}
44 ServiceType(Type type) : _type(type) {}
46 explicit ServiceType(const std::string & strval_r);
48 Type toEnum() const { return _type; }
50 ServiceType::Type parse(const std::string & strval_r);
52 const std::string & asString() const;
58 inline std::ostream & operator<<( std::ostream & str, const ServiceType & obj )
59 { return str << obj.asString(); }
61 inline bool operator==(const ServiceType & obj1, const ServiceType & obj2)
62 { return obj1._type == obj2._type; }
64 inline bool operator!=(const ServiceType & obj1, const ServiceType & obj2)
65 { return ! (obj1 == obj2); }
71 #endif /* ZYPP_SERVICE_TYPE_H_ */
73 // vim: set ts=2 sts=2 sw=2 et ai: