1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
10 #ifndef YUMRESOURCETYPE_H_
11 #define YUMRESOURCETYPE_H_
29 static const ResourceType NONE; // unknown
30 static const ResourceType REPOMD;
31 static const ResourceType PRIMARY;
32 static const ResourceType OTHER;
33 static const ResourceType FILELISTS;
34 static const ResourceType GROUP;
35 static const ResourceType PATCHES; // suse extension
36 static const ResourceType PATCH; // suse extension
37 static const ResourceType PRODUCT; // suse extension
38 static const ResourceType PATTERNS; // suse extension
39 // sqlite caches yum extensions:
40 static const ResourceType PRIMARY_DB; // yum extension
41 static const ResourceType OTHER_DB; // yum extension
59 ResourceType(Type type) : _type(type) {}
61 explicit ResourceType(const std::string & strval_r);
63 Type toEnum() const { return _type; }
65 ResourceType::Type parse(const std::string & strval_r);
67 const std::string & asString() const;
73 inline std::ostream & operator<<( std::ostream & str, const ResourceType & obj )
74 { return str << obj.asString(); }
76 inline bool operator==(const ResourceType & obj1, const ResourceType & obj2)
77 { return obj1._type == obj2._type; }
84 #endif /*YUMRESOURCETYPE_H_*/
86 // vim: set ts=2 sts=2 sw=2 et ai: