2022-08-26 15:44:59 +00:00
|
|
|
// Copyright 2014 Google LLC. All rights reserved.
|
2014-10-07 21:33:08 +00:00
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
2017-12-20 00:56:36 +00:00
|
|
|
#ifndef PACKAGER_MEDIA_BASE_KEY_FETCHER_H_
|
|
|
|
#define PACKAGER_MEDIA_BASE_KEY_FETCHER_H_
|
2014-10-07 21:33:08 +00:00
|
|
|
|
2023-10-14 16:36:01 +00:00
|
|
|
#include <packager/macros/classes.h>
|
|
|
|
#include <packager/status.h>
|
2014-10-07 21:33:08 +00:00
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
namespace shaka {
|
2014-10-07 21:33:08 +00:00
|
|
|
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
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|
2014-10-07 21:33:08 +00:00
|
|
|
|
2017-12-20 00:56:36 +00:00
|
|
|
#endif // PACKAGER_MEDIA_BASE_KEY_FETCHER_H_
|
2014-10-07 21:33:08 +00:00
|
|
|
|