aboutsummaryrefslogtreecommitdiffstats
path: root/src/wm_client.hpp
diff options
context:
space:
mode:
authorfukubayashi.akio <fukubayashi.akio@genetec.co.jp>2019-06-03 17:59:13 +0900
committerfukubayashi.akio <fukubayashi.akio@genetec.co.jp>2019-06-03 17:59:13 +0900
commit98006b6538c5be44350746ec3756f004a5c68af8 (patch)
treef76ed8991d3837678c00722a23b779c4e2dcb67b /src/wm_client.hpp
parentb6644e5cffa84e40d62e38f4ee0c14e64e0faf48 (diff)
Add boot sequence and multi ecu transfer
Signed-off-by: fukubayashi.akio <fukubayashi.akio@genetec.co.jp>
Diffstat (limited to 'src/wm_client.hpp')
-rw-r--r--src/wm_client.hpp45
1 files changed, 23 insertions, 22 deletions
diff --git a/src/wm_client.hpp b/src/wm_client.hpp
index 7df4dea..fc171f4 100644
--- a/src/wm_client.hpp
+++ b/src/wm_client.hpp
@@ -20,17 +20,22 @@
#include <vector>
#include <string>
#include <unordered_map>
-#include "util.hpp"
#include "wm_error.hpp"
extern "C"
{
+#define AFB_BINDING_VERSION 2
#include <afb/afb-binding.h>
}
namespace wm
{
+enum WM_CLIENT_ERROR_EVENT
+{
+ UNKNOWN_ERROR
+};
+
class WMClient
{
public:
@@ -45,47 +50,43 @@ class WMClient
std::string appID() const;
std::string role() const;
- void setRole(const std::string& role);
unsigned layerID() const;
- void setLayerID(unsigned id);
unsigned surfaceID() const;
- void registerSurface(unsigned surface);
- void activate();
- void deactivate();
- std::string area() const {return this->app_area;};
- void setArea(const std::string area) {this->app_area = area;}
+ // void setRole(const std::string& role);
+ // void appendRole(const std::string& role);
WMError addSurface(unsigned surface);
- bool isSourceSizeSet();
- void setSurfaceSizeCorrectly();
- bool isActive() { return this->is_active;}
bool removeSurfaceIfExist(unsigned surface);
+ // bool removeRole(const std::string& role);
+ std::vector<unsigned> renderOrder() const;
+ WMError setRenderOrder(const std::vector<std::string>& order);
+ std::string attachTmpServiceSurface(const std::string& from, const std::string& service_surface);
+ WMError attachServiceSurface(const std::string& service_surface, unsigned surface);
- bool subscribe(afb_req_t req, const std::string &event_name);
- void emitActive(bool active);
- void emitVisible(bool visible);
- void emitSyncDraw(const std::string& area, struct rect& r);
- void emitFlushDraw();
- void emitError(WMError error);
+#if GTEST_ENABLED
+ bool subscribe(afb_req req, const std::string &event_name);
+ void emitError(WM_CLIENT_ERROR_EVENT ev);
+#endif
void dumpInfo();
private:
std::string id;
unsigned layer;
- bool is_source_set;
- bool is_active;
std::string main_role;
- std::string app_area;
+ std::string area;
unsigned surface; // currently, main application has only one surface.
//std::vector<std::string> role_list;
+ std::vector<unsigned> surface_render_order;
+ std::unordered_map<std::string, unsigned> service2surfaces;
std::unordered_map<std::string, unsigned> role2surface;
+ std::unordered_map<std::string, std::string> service2supplier;
#if GTEST_ENABLED
// This is for unit test. afb_make_event occurs sig11 if call not in afb-binding
std::unordered_map<std::string, std::string> evname2afb_event;
#else
- std::unordered_map<std::string, afb_event_t> evname2afb_event;
+ std::unordered_map<std::string, struct afb_event> evname2afb_event;
#endif
};
} // namespace wm
-#endif
+#endif \ No newline at end of file