1 /* 2 * Copyright 2013, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _PACKAGE__SOLVER_PACKAGE_SPECIFIER_H_ 6 #define _PACKAGE__SOLVER_PACKAGE_SPECIFIER_H_ 7 8 9 #include <String.h> 10 11 12 namespace BPackageKit { 13 14 15 class BSolverPackage; 16 17 18 class BSolverPackageSpecifier { 19 public: 20 enum BType { 21 B_UNSPECIFIED, 22 B_PACKAGE, 23 B_SELECT_STRING 24 }; 25 26 public: 27 BSolverPackageSpecifier(); 28 explicit BSolverPackageSpecifier( 29 BSolverPackage* package); 30 explicit BSolverPackageSpecifier( 31 const BString& selectString); 32 BSolverPackageSpecifier( 33 const BSolverPackageSpecifier& other); 34 ~BSolverPackageSpecifier(); 35 36 BType Type() const; 37 BSolverPackage* Package() const; 38 const BString& SelectString() const; 39 40 BSolverPackageSpecifier& operator=( 41 const BSolverPackageSpecifier& other); 42 43 private: 44 BType fType; 45 BSolverPackage* fPackage; 46 BString fSelectString; 47 }; 48 49 50 } // namespace BPackageKit 51 52 53 #endif // _PACKAGE__SOLVER_PACKAGE_SPECIFIER_H_ 54