1 #ifndef ANDROID_DVR_PERFORMANCE_RPC_H_ 2 #define ANDROID_DVR_PERFORMANCE_RPC_H_ 3 4 #include <sys/types.h> 5 6 #include <string> 7 8 #include <pdx/rpc/remote_method_type.h> 9 10 namespace android { 11 namespace dvr { 12 13 // Performance Service RPC interface. Defines the endpoint paths, op codes, and 14 // method type signatures supported by performanced. 15 struct PerformanceRPC { 16 // Service path. 17 static constexpr char kClientPath[] = "system/performance/client"; 18 19 // Op codes. 20 enum { 21 kOpSetCpuPartition = 0, 22 kOpSetSchedulerClass, 23 kOpGetCpuPartition, 24 kOpSetSchedulerPolicy, 25 }; 26 27 // Methods. 28 PDX_REMOTE_METHOD(SetCpuPartition, kOpSetCpuPartition, 29 void(pid_t, const std::string&)); 30 PDX_REMOTE_METHOD(SetSchedulerClass, kOpSetSchedulerClass, 31 void(pid_t, const std::string&)); 32 PDX_REMOTE_METHOD(GetCpuPartition, kOpGetCpuPartition, std::string(pid_t)); 33 PDX_REMOTE_METHOD(SetSchedulerPolicy, kOpSetSchedulerPolicy, 34 void(pid_t, const std::string&)); 35 }; 36 37 } // namespace dvr 38 } // namespace android 39 40 #endif // ANDROID_DVR_PERFORMANCE_RPC_H_ 41