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 }; 25 26 // Methods. 27 PDX_REMOTE_METHOD(SetCpuPartition, kOpSetCpuPartition, 28 int(pid_t, const std::string&)); 29 PDX_REMOTE_METHOD(SetSchedulerClass, kOpSetSchedulerClass, 30 int(pid_t, const std::string&)); 31 PDX_REMOTE_METHOD(GetCpuPartition, kOpGetCpuPartition, std::string(pid_t)); 32 }; 33 34 } // namespace dvr 35 } // namespace android 36 37 #endif // ANDROID_DVR_PERFORMANCE_RPC_H_ 38