Separate benchmark tool from rpc-port
[platform/core/appfw/rpc-port.git] / benchmark / tool / dbus-proxy.hh
index 7c5f4c4..7e0c8a6 100644 (file)
 #ifndef DBUS_PROXY_HH_
 #define DBUS_PROXY_HH_
 
-#include <string>
-#include <memory>
-
 #include <gio/gio.h>
 #include <glib.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <memory>
+#include <string>
+#include <string_view>
 
 namespace rpc_port {
 namespace benchmark {
@@ -31,7 +34,13 @@ class DbusProxy {
   DbusProxy();
 
   void Connect();
-  int Test(std::string data) const;
+  int Test(std::string data);
+  int Start(pid_t caller_pid);
+  int Stop(pid_t caller_pid);
+
+ private:
+  int MethodCall(const std::string_view method_name,
+                 GVariant* parameters);
 
  private:
   GDBusConnection* system_conn_ = nullptr;