1 /*
2 * Copyright 2009-2017 Alibaba Cloud All rights reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #include <alibabacloud/oss/model/GenerateRTMPSignedUrlRequest.h>
19 #include <sstream>
20 #include "utils/Utils.h"
21
22 using namespace AlibabaCloud::OSS;
23
GenerateRTMPSignedUrlRequest(const std::string & bucket,const std::string & channelName,const std::string & playlist,uint64_t expires)24 GenerateRTMPSignedUrlRequest::GenerateRTMPSignedUrlRequest(
25 const std::string& bucket,
26 const std::string& channelName, const std::string& playlist,
27 uint64_t expires):
28 LiveChannelRequest(bucket, channelName),
29 playList_(playlist),
30 expires_(expires)
31 {
32
33 }
34
Parameters() const35 ParameterCollection GenerateRTMPSignedUrlRequest::Parameters() const
36 {
37 ParameterCollection collection;
38 if(!playList_.empty())
39 {
40 collection["playlistName"] = playList_;
41 }
42 return collection;
43 }
44
setPlayList(const std::string & playList)45 void GenerateRTMPSignedUrlRequest::setPlayList(const std::string &playList)
46 {
47 playList_ = playList;
48 }
49
setExpires(uint64_t expires)50 void GenerateRTMPSignedUrlRequest::setExpires(uint64_t expires)
51 {
52 expires_ = expires;
53 }
54
PlayList() const55 const std::string& GenerateRTMPSignedUrlRequest::PlayList() const
56 {
57 return playList_;
58 }
59
Expires() const60 uint64_t GenerateRTMPSignedUrlRequest::Expires() const
61 {
62 return expires_;
63 }
64
65