RDK Documentation (Open Sourced RDK Components)
AampDrmData.h
Go to the documentation of this file.
1 /*
2  * If not stated otherwise in this file or this component's license file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2020 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 /**
21  * @file AampDrmData.h
22  * @brief File holds DRM License data
23  */
24 
25 #ifndef AAMPDRMDATA_H
26 #define AAMPDRMDATA_H
27 
28 /**
29  * @class DrmData
30  * @brief To hold DRM key, license request etc.
31  */
32 class DrmData{
33 
34 private:
35  std::string data; /**< License Data */
36 public:
37  /**
38  * @fn DrmData
39  */
40  DrmData();
41  /**
42  * @fn DrmData
43  *
44  * @param[in] data - pointer to data to be copied.
45  * @param[in] dataLength - length of data
46  */
47  DrmData(unsigned char *data, int dataLength);
48  /**
49  * @brief Copy constructor disabled
50  *
51  */
52  DrmData(const DrmData&) = delete;
53  /**
54  * @brief assignment operator disabled
55  *
56  */
57  DrmData& operator=(const DrmData&) = delete;
58  /**
59  * @fn ~DrmData
60  */
61  ~DrmData();
62  /**
63  * @fn getData
64  *
65  * @return Returns pointer to data.
66  */
67  const std::string &getData();
68  /**
69  * @fn getDataLength
70  *
71  * @return Returns dataLength.
72  */
73  int getDataLength();
74  /**
75  * @fn setData
76  *
77  * @param[in] data - Pointer to data to be set.
78  * @param[in] dataLength - length of data.
79  * @return void.
80  */
81  void setData(unsigned char *data, int dataLength);
82  /**
83  * @fn addData
84  *
85  * @param[in] data - Pointer to data to be appended.
86  * @param[in] dataLength - length of data.
87  * @return void.
88  */
89  void addData(unsigned char *data, int dataLength);
90 };
91 
92 
93 #endif /* AAMPDRMDATA_H */
94 
DrmData::operator=
DrmData & operator=(const DrmData &)=delete
assignment operator disabled
DrmData::addData
void addData(unsigned char *data, int dataLength)
Appends DrmData with given data.
Definition: AampDRMutils.cpp:103
DrmData
To hold DRM key, license request etc.
Definition: AampDrmData.h:32
DrmData::setData
void setData(unsigned char *data, int dataLength)
Updates DrmData with given data.
Definition: AampDRMutils.cpp:91
DrmData::getDataLength
int getDataLength()
Getter method for dataLength.
Definition: AampDRMutils.cpp:83
DrmData::data
std::string data
Definition: AampDrmData.h:35
DrmData::~DrmData
~DrmData()
Distructor for DrmData. Free memory (if any) allocated for data.
Definition: AampDRMutils.cpp:63
DrmData::getData
const std::string & getData()
Getter method for data.
Definition: AampDRMutils.cpp:75
DrmData::DrmData
DrmData()
Default constructor for DrmData. NULL initialize data and dataLength.
Definition: AampDRMutils.cpp:44