41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
// Copyright 2014 Google Inc. All rights reserved.
|
|
//
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file or at
|
|
// https://developers.google.com/open-source/licenses/bsd
|
|
|
|
#ifndef MEDIA_BASE_KEY_FETCHER_H_
|
|
#define MEDIA_BASE_KEY_FETCHER_H_
|
|
|
|
#include "base/macros.h"
|
|
#include "packager/media/base/status.h"
|
|
|
|
namespace shaka {
|
|
namespace media {
|
|
|
|
/// Base class for fetching keys from the license service.
|
|
class KeyFetcher {
|
|
public:
|
|
KeyFetcher();
|
|
virtual ~KeyFetcher();
|
|
|
|
/// Fetch Keys from license service.
|
|
/// |response| is owned by caller.
|
|
/// @param service_address license service address.
|
|
/// @param request JSON formatted request.
|
|
/// @param response JSON formatted response. Owned by caller.
|
|
/// @return OK on success.
|
|
virtual Status FetchKeys(const std::string& service_address,
|
|
const std::string& request,
|
|
std::string* response) = 0;
|
|
|
|
private:
|
|
DISALLOW_COPY_AND_ASSIGN(KeyFetcher);
|
|
};
|
|
|
|
} // namespace media
|
|
} // namespace shaka
|
|
|
|
#endif // MEDIA_BASE_KEY_FETCHER_H_
|
|
|