xref: /aosp_15_r20/external/openscreen/cast/receiver/channel/message_util.h (revision 3f982cf4871df8771c9d4abe6e9a6f8d829b2736)
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 
5 #ifndef CAST_RECEIVER_CHANNEL_MESSAGE_UTIL_H_
6 #define CAST_RECEIVER_CHANNEL_MESSAGE_UTIL_H_
7 
8 #include "cast/common/channel/message_util.h"
9 #include "cast/common/channel/proto/cast_channel.pb.h"
10 #include "platform/base/error.h"
11 
12 namespace openscreen {
13 namespace cast {
14 
15 // Creates a message that responds to a previous app availability request with
16 // ID |request_id| which declares |app_id| to have availability of either
17 // available or unavailable respectively.
18 ErrorOr<::cast::channel::CastMessage> CreateAppAvailableResponse(
19     int request_id,
20     const std::string& sender_id,
21     const std::string& app_id);
22 ErrorOr<::cast::channel::CastMessage> CreateAppUnavailableResponse(
23     int request_id,
24     const std::string& sender_id,
25     const std::string& app_id);
26 
27 }  // namespace cast
28 }  // namespace openscreen
29 
30 #endif  // CAST_RECEIVER_CHANNEL_MESSAGE_UTIL_H_
31