aboutsummaryrefslogtreecommitdiff
path: root/cast/sender/testing/test_helpers.h
blob: c9a68c20e2af188f966305048535022e470425f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CAST_SENDER_TESTING_TEST_HELPERS_H_
#define CAST_SENDER_TESTING_TEST_HELPERS_H_

#include <cstdint>
#include <string>

#include "cast/sender/channel/message_util.h"

namespace cast {
namespace channel {
class CastMessage;
}  // namespace channel
}  // namespace cast

namespace openscreen {
namespace cast {

void VerifyAppAvailabilityRequest(const ::cast::channel::CastMessage& message,
                                  const std::string& expected_app_id,
                                  int* request_id_out,
                                  std::string* sender_id_out);
void VerifyAppAvailabilityRequest(const ::cast::channel::CastMessage& message,
                                  std::string* app_id_out,
                                  int* request_id_out,
                                  std::string* sender_id_out);

::cast::channel::CastMessage CreateAppAvailableResponseChecked(
    int request_id,
    const std::string& sender_id,
    const std::string& app_id);
::cast::channel::CastMessage CreateAppUnavailableResponseChecked(
    int request_id,
    const std::string& sender_id,
    const std::string& app_id);

}  // namespace cast
}  // namespace openscreen

#endif  // CAST_SENDER_TESTING_TEST_HELPERS_H_