decrypt_config_marshaller.h revision 1320f92c476a1ad9d19dba2a48c72b75566198e9
1// Copyright 2014 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 CHROMECAST_MEDIA_CMA_IPC_STREAMER_DECRYPT_CONFIG_MARSHALLER_H_
6#define CHROMECAST_MEDIA_CMA_IPC_STREAMER_DECRYPT_CONFIG_MARSHALLER_H_
7
8#include "base/memory/scoped_ptr.h"
9
10namespace media {
11class DecryptConfig;
12}
13
14namespace chromecast {
15namespace media {
16class MediaMessage;
17
18class DecryptConfigMarshaller {
19 public:
20  // Writes the serialized structure of |config| into |msg|.
21  static void Write(
22      const ::media::DecryptConfig& config, MediaMessage* msg);
23
24  // Returns a DecryptConfig from its serialized structure.
25  static scoped_ptr< ::media::DecryptConfig> Read(MediaMessage* msg);
26};
27
28}  // namespace media
29}  // namespace chromecast
30
31#endif  // CHROMECAST_MEDIA_CMA_IPC_STREAMER_DECRYPT_CONFIG_MARSHALLER_H_
32