ECSDKTouchKeyManager.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #ifndef ECSDKTOUCHKEYMANAGER_H
  2. #define ECSDKTOUCHKEYMANAGER_H
  3. #include "ECSDKTypes.h"
  4. namespace ECSDKFrameWork {
  5. /**
  6. * @brief The ECSDKTouchKeyEventManager class
  7. */
  8. class EC_DLL_EXPORT ECSDKTouchKeyManager
  9. {
  10. public:
  11. /**
  12. * @brief getInstance
  13. * @return
  14. */
  15. static ECSDKTouchKeyManager* getInstance();
  16. /**
  17. * @brief Send touch event to phone.
  18. *
  19. * @param touch Touch parameters.
  20. *
  21. * @param type Touch type.
  22. *
  23. * @return ECSDK_OK on success, others on fail.
  24. *
  25. * @note Touch event does NOT work without mirror connection.
  26. */
  27. virtual int32_t sendTouchEvent(const ECTouchEventData& touch, ECTouchEventType type) = 0;
  28. /**
  29. * @brief when you press button on steering wheel, send corresponding button event to phone.
  30. *
  31. * @param btnCode key code of the Button .
  32. *
  33. * @param type Event type.
  34. *
  35. * @return ECSDK_OK on success, others on fail.
  36. *
  37. * @note Button event does NOT work without phone app.
  38. */
  39. virtual int32_t sendBtnEvent(ECBtnCode btnCode, ECBtnEventType type) = 0;
  40. /**
  41. * @brief send button code to phone.
  42. *
  43. * @param btnCode key code of the Button .
  44. *
  45. * @param type Event type.
  46. *
  47. * @param channel Which can specify the namespace of the code. Zero means standard, others means custom.
  48. * When channel is zero, the value of channel can refer to ECBtnCode.
  49. *
  50. * @return EC_OK on success, others on fail.
  51. *
  52. * @note Button event does NOT work without phone app.
  53. */
  54. virtual int32_t sendBtnEvent(int32_t btnCode, ECBtnEventType type, int32_t channel) = 0;
  55. protected:
  56. ECSDKTouchKeyManager();
  57. virtual ~ECSDKTouchKeyManager();
  58. };
  59. }
  60. #endif // ECSDKTOUCHKEYMANAGER_H