Sam Hurst | 17954fe | 2016-03-10 16:33:41 -0800 | [diff] [blame] | 1 | #ifndef CAR_VEHICLE_PROPERTY_ACCESS_CONTROL_MOCK_H_ |
| 2 | #define CAR_VEHICLE_PROPERTY_ACCESS_CONTROL_MOCK_H_ |
| 3 | |
| 4 | #include <utils/String8.h> |
| 5 | #include <libxml/parser.h> |
| 6 | #include <libxml/tree.h> |
| 7 | #include <map> |
| 8 | #include <string> |
| 9 | #include <private/android_filesystem_config.h> |
| 10 | #include <vehicle-internal.h> |
| 11 | #include <VehiclePropertyAccessControl.h> |
| 12 | |
| 13 | namespace android { |
| 14 | class VehiclePropertyAccessControlForTesting : public VehiclePropertyAccessControl { |
| 15 | public: |
| 16 | bool isHexNotation(std::string const& s); |
| 17 | bool accessToInt(int32_t* const value,const xmlChar* property, |
| 18 | const xmlChar* uid, const xmlChar* access); |
| 19 | bool updateOrCreate(int32_t uid, int32_t property, int32_t access); |
| 20 | bool populate(xmlNode* a_node); |
| 21 | bool process(const char* policy); |
| 22 | void emptyAccessControlMap(); |
| 23 | bool getAccessToProperty(int32_t property, std::map<int32_t, int32_t>** accessMap); |
| 24 | }; |
| 25 | }; |
| 26 | #endif |