11320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// Copyright 2014 The Chromium Authors. All rights reserved.
21320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// Use of this source code is governed by a BSD-style license that can be
31320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// found in the LICENSE file.
41320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
51320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#ifndef CHROMECAST_MEDIA_CMA_IPC_STREAMER_DECRYPT_CONFIG_MARSHALLER_H_
61320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#define CHROMECAST_MEDIA_CMA_IPC_STREAMER_DECRYPT_CONFIG_MARSHALLER_H_
71320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
81320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#include "base/memory/scoped_ptr.h"
91320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
101320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccinamespace media {
111320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucciclass DecryptConfig;
121320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci}
131320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
141320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccinamespace chromecast {
151320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccinamespace media {
161320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucciclass MediaMessage;
171320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
181320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucciclass DecryptConfigMarshaller {
191320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci public:
201320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci  // Writes the serialized structure of |config| into |msg|.
211320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci  static void Write(
221320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci      const ::media::DecryptConfig& config, MediaMessage* msg);
231320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
241320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci  // Returns a DecryptConfig from its serialized structure.
251320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci  static scoped_ptr< ::media::DecryptConfig> Read(MediaMessage* msg);
261320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci};
271320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
281320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci}  // namespace media
291320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci}  // namespace chromecast
301320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
311320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#endif  // CHROMECAST_MEDIA_CMA_IPC_STREAMER_DECRYPT_CONFIG_MARSHALLER_H_
32