Andreas Huber | 84f89de | 2016-07-28 15:39:51 -0700 | [diff] [blame] | 1 | #ifndef FQNAME_H_ |
| 2 | |
| 3 | #define FQNAME_H_ |
| 4 | |
| 5 | #include <android-base/macros.h> |
| 6 | #include <string> |
| 7 | |
| 8 | namespace android { |
| 9 | |
| 10 | struct FQName { |
Andreas Huber | da51b8e | 2016-07-28 16:00:57 -0700 | [diff] [blame^] | 11 | explicit FQName(); |
Andreas Huber | 84f89de | 2016-07-28 15:39:51 -0700 | [diff] [blame] | 12 | explicit FQName(const std::string &s); |
| 13 | |
| 14 | bool isValid() const; |
| 15 | bool setTo(const std::string &s); |
| 16 | |
| 17 | void applyDefaults( |
| 18 | const std::string &defaultPackage, |
| 19 | const std::string &defaultVersion); |
| 20 | |
| 21 | std::string package() const; |
| 22 | std::string version() const; |
| 23 | std::string name() const; |
| 24 | |
Andreas Huber | da51b8e | 2016-07-28 16:00:57 -0700 | [diff] [blame^] | 25 | void print() const; |
Andreas Huber | 84f89de | 2016-07-28 15:39:51 -0700 | [diff] [blame] | 26 | std::string debugString() const; |
| 27 | |
| 28 | private: |
| 29 | bool mValid; |
| 30 | std::string mPackage; |
| 31 | std::string mVersion; |
| 32 | std::string mName; |
| 33 | |
| 34 | DISALLOW_COPY_AND_ASSIGN(FQName); |
| 35 | }; |
| 36 | |
| 37 | } // namespace android |
| 38 | |
| 39 | #endif // FQNAME_H_ |