Source release 17.1.1
This commit is contained in:
33
factory_upload_tool/ce/example_main.cpp
Normal file
33
factory_upload_tool/ce/example_main.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
// Copyright 2021 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine License
|
||||
// Agreement.
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "log.h"
|
||||
#include "wv_factory_extractor.h"
|
||||
|
||||
int main() {
|
||||
widevine::ClientInfo client_info;
|
||||
client_info.company_name = "";
|
||||
client_info.arch_name = "";
|
||||
client_info.device_name = "";
|
||||
client_info.model_name = "";
|
||||
client_info.product_name = "";
|
||||
client_info.build_info = "";
|
||||
|
||||
auto extractor = widevine::WidevineFactoryExtractor::Create(client_info);
|
||||
if (extractor == nullptr) {
|
||||
LOGE("Failed to create WidevineFactoryExtractor");
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string request;
|
||||
widevine::Status status = extractor->GenerateUploadRequest(request);
|
||||
if (status != widevine::Status::kSuccess) {
|
||||
LOGE("Fail to generate upload request: %d", status);
|
||||
return 2;
|
||||
}
|
||||
std::cout << request << std::endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user