message_sender_impl.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_COMPONENTS_PHONEHUB_MESSAGE_SENDER_IMPL_H_
  5. #define ASH_COMPONENTS_PHONEHUB_MESSAGE_SENDER_IMPL_H_
  6. #include "ash/components/phonehub/message_sender.h"
  7. #include <stdint.h>
  8. #include <string>
  9. #include "ash/components/phonehub/proto/phonehub_api.pb.h"
  10. // TODO(https://crbug.com/1164001): move to forward declaration.
  11. #include "ash/services/secure_channel/public/cpp/client/connection_manager.h"
  12. namespace ash {
  13. namespace phonehub {
  14. class MessageSenderImpl : public MessageSender {
  15. public:
  16. explicit MessageSenderImpl(
  17. secure_channel::ConnectionManager* connection_manager);
  18. ~MessageSenderImpl() override;
  19. // MessageSender:
  20. void SendCrosState(bool notification_setting_enabled,
  21. bool camera_roll_setting_enabled) override;
  22. void SendUpdateNotificationModeRequest(bool do_not_disturb_enabled) override;
  23. void SendUpdateBatteryModeRequest(bool battery_saver_mode_enabled) override;
  24. void SendDismissNotificationRequest(int64_t notification_id) override;
  25. void SendNotificationInlineReplyRequest(
  26. int64_t notification_id,
  27. const std::u16string& reply_text) override;
  28. void SendShowNotificationAccessSetupRequest() override;
  29. void SendFeatureSetupRequest(bool camera_roll, bool notifications) override;
  30. void SendRingDeviceRequest(bool device_ringing_enabled) override;
  31. void SendFetchCameraRollItemsRequest(
  32. const proto::FetchCameraRollItemsRequest& request) override;
  33. void SendFetchCameraRollItemDataRequest(
  34. const proto::FetchCameraRollItemDataRequest& request) override;
  35. void SendInitiateCameraRollItemTransferRequest(
  36. const proto::InitiateCameraRollItemTransferRequest& request) override;
  37. private:
  38. void SendMessage(proto::MessageType message_type,
  39. const google::protobuf::MessageLite* request);
  40. secure_channel::ConnectionManager* connection_manager_;
  41. };
  42. } // namespace phonehub
  43. } // namespace ash
  44. #endif // ASH_COMPONENTS_PHONEHUB_MESSAGE_SENDER_IMPL_H_