Add API UploadStreamByURL.

This commit is contained in:
sdk-team
2021-11-02 04:10:06 +00:00
parent a6fdb87ef4
commit e4fc46970b
9 changed files with 298 additions and 1 deletions

View File

@@ -350,6 +350,8 @@
#include "model/UpdateWatermarkResult.h"
#include "model/UploadMediaByURLRequest.h"
#include "model/UploadMediaByURLResult.h"
#include "model/UploadStreamByURLRequest.h"
#include "model/UploadStreamByURLResult.h"
#include "model/VerifyVodDomainOwnerRequest.h"
#include "model/VerifyVodDomainOwnerResult.h"
@@ -853,6 +855,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::UploadMediaByURLResult> UploadMediaByURLOutcome;
typedef std::future<UploadMediaByURLOutcome> UploadMediaByURLOutcomeCallable;
typedef std::function<void(const VodClient*, const Model::UploadMediaByURLRequest&, const UploadMediaByURLOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UploadMediaByURLAsyncHandler;
typedef Outcome<Error, Model::UploadStreamByURLResult> UploadStreamByURLOutcome;
typedef std::future<UploadStreamByURLOutcome> UploadStreamByURLOutcomeCallable;
typedef std::function<void(const VodClient*, const Model::UploadStreamByURLRequest&, const UploadStreamByURLOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UploadStreamByURLAsyncHandler;
typedef Outcome<Error, Model::VerifyVodDomainOwnerResult> VerifyVodDomainOwnerOutcome;
typedef std::future<VerifyVodDomainOwnerOutcome> VerifyVodDomainOwnerOutcomeCallable;
typedef std::function<void(const VodClient*, const Model::VerifyVodDomainOwnerRequest&, const VerifyVodDomainOwnerOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> VerifyVodDomainOwnerAsyncHandler;
@@ -1353,6 +1358,9 @@ namespace AlibabaCloud
UploadMediaByURLOutcome uploadMediaByURL(const Model::UploadMediaByURLRequest &request)const;
void uploadMediaByURLAsync(const Model::UploadMediaByURLRequest& request, const UploadMediaByURLAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UploadMediaByURLOutcomeCallable uploadMediaByURLCallable(const Model::UploadMediaByURLRequest& request) const;
UploadStreamByURLOutcome uploadStreamByURL(const Model::UploadStreamByURLRequest &request)const;
void uploadStreamByURLAsync(const Model::UploadStreamByURLRequest& request, const UploadStreamByURLAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UploadStreamByURLOutcomeCallable uploadStreamByURLCallable(const Model::UploadStreamByURLRequest& request) const;
VerifyVodDomainOwnerOutcome verifyVodDomainOwner(const Model::VerifyVodDomainOwnerRequest &request)const;
void verifyVodDomainOwnerAsync(const Model::VerifyVodDomainOwnerRequest& request, const VerifyVodDomainOwnerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
VerifyVodDomainOwnerOutcomeCallable verifyVodDomainOwnerCallable(const Model::VerifyVodDomainOwnerRequest& request) const;

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_VOD_MODEL_UPLOADSTREAMBYURLREQUEST_H_
#define ALIBABACLOUD_VOD_MODEL_UPLOADSTREAMBYURLREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/vod/VodExport.h>
namespace AlibabaCloud
{
namespace Vod
{
namespace Model
{
class ALIBABACLOUD_VOD_EXPORT UploadStreamByURLRequest : public RpcServiceRequest
{
public:
UploadStreamByURLRequest();
~UploadStreamByURLRequest();
std::string getFileExtension()const;
void setFileExtension(const std::string& fileExtension);
std::string getMediaId()const;
void setMediaId(const std::string& mediaId);
std::string getUserData()const;
void setUserData(const std::string& userData);
std::string getDefinition()const;
void setDefinition(const std::string& definition);
std::string getStreamURL()const;
void setStreamURL(const std::string& streamURL);
private:
std::string fileExtension_;
std::string mediaId_;
std::string userData_;
std::string definition_;
std::string streamURL_;
};
}
}
}
#endif // !ALIBABACLOUD_VOD_MODEL_UPLOADSTREAMBYURLREQUEST_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_VOD_MODEL_UPLOADSTREAMBYURLRESULT_H_
#define ALIBABACLOUD_VOD_MODEL_UPLOADSTREAMBYURLRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/vod/VodExport.h>
namespace AlibabaCloud
{
namespace Vod
{
namespace Model
{
class ALIBABACLOUD_VOD_EXPORT UploadStreamByURLResult : public ServiceResult
{
public:
UploadStreamByURLResult();
explicit UploadStreamByURLResult(const std::string &payload);
~UploadStreamByURLResult();
std::string getStreamJobId()const;
protected:
void parse(const std::string &payload);
private:
std::string streamJobId_;
};
}
}
}
#endif // !ALIBABACLOUD_VOD_MODEL_UPLOADSTREAMBYURLRESULT_H_