MirrorLink.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef MIRRORLINK_H
  2. #define MIRRORLINK_H
  3. #include "IUserLinkPlayer.h"
  4. class MirrorPlayer;
  5. class MirrorLink : public IUserLinkPlayer
  6. {
  7. public:
  8. MirrorLink();
  9. virtual ~MirrorLink();
  10. #ifdef USE_MIRROR
  11. protected:
  12. virtual bool init(LinkMode linkMode);
  13. virtual bool release();
  14. virtual bool start();
  15. virtual bool stop();
  16. virtual bool start_mirror();
  17. virtual bool stop_mirror();
  18. virtual bool set_background();
  19. virtual bool set_foreground();
  20. virtual bool get_audio_focus();
  21. virtual bool release_audio_focus();
  22. virtual void set_inserted(bool inserted, PhoneType phoneType);
  23. virtual void send_screen_size(int width, int height);
  24. virtual void record_audio_callback(unsigned char *data, int len);
  25. virtual void send_car_bluetooth(const string& name, const string& address, const string& pin);
  26. virtual void send_phone_bluetooth(const string& address);
  27. virtual void send_car_wifi(WifiInfo& info){}
  28. virtual void send_touch(int x, int y, TouchCode touchCode);
  29. virtual void send_multi_touch(int x1, int y1, TouchCode touchCode1, int x2, int y2, TouchCode touchCode2){}
  30. virtual bool send_key(KeyCode keyCode);
  31. virtual bool send_wheel(WheelCode wheel, bool foucs);
  32. virtual bool send_night_mode(bool night){}
  33. virtual bool send_right_hand_driver(bool right){}
  34. virtual bool open_page(AppPage appPage);
  35. virtual void request_status(RequestAppStatus requestAppStatus, void *reserved = nullptr);
  36. virtual void send_license(const string& license){}
  37. virtual void send_input_text(const string& text) {}
  38. virtual void send_input_selection(const int start, const int stop){}
  39. virtual void send_input_action(const int acionId, const int keyCode){}
  40. private:
  41. static void linkstatus_callback_func(int status, void* parameter);
  42. void onVideoStartCallback(bool start, int width, int height);
  43. void onVideoInfoCallback(int width, int height, unsigned char* data, int length);
  44. private:
  45. MirrorPlayer* m_pMirrorPlayer;
  46. #endif
  47. };
  48. #endif // MIRRORLINK_H