|
RDK Documentation (Open Sourced RDK Components)
|
109 #ifndef TRM_TUNER_RESERVATION_H_
110 #define TRM_TUNER_RESERVATION_H_
119 #include "Activity.h"
142 typedef std::list<std::string> TokenList;
149 static const char *klassName(
void) {
return Klass::kTunerReservation; }
152 const std::string &
getDevice(
void)
const;
163 void setActivity(
const Activity &activity);
164 void addDetail(
const std::string &key,
const std::string &value);
167 virtual void print(
void)
const;
172 : reservationToken(
""), device(
""), serviceLocator(
""),
173 startTime(0), duration(0),
174 activity(Activity::kNone),
175 customAttributes(0),state(0) {};
178 const std::string &serviceLocator,
179 const uint64_t startTime,
180 const uint64_t duration,
182 const std::string &reservationToken =
"",
188 std::string reservationToken;
190 std::string serviceLocator;
void setServiceLocator(const std::string &_serviceLocator)
This function is used to set the locator of the service that the tuner will tune to....
uint64_t getStartTime(void) const
This function is used to get the start time of the reservation in milliseconds from the epoch.
virtual void print(void) const
This function is used to print the following attributes of tunerReservation token.
The Activity class represents the request or granted usage of a tuner. The activity field in the clas...
void setStartTime(const uint64_t &_startTime)
This function is used to set the start time of the reservation in milliseconds from the epoch....
void setReservationToken(const std::string &token)
This function is used to set a unique token generated when a reservation is created....
const std::string & getDevice(void) const
This function is used to get the remote device id requesting for tuner reservation.
const ReservationCustomAttributes * getCustomAttributes(void) const
This function is used to return the custom attributes assigned by the application....
void setCustomAttributes(ReservationCustomAttributes *)
This function is used to set the attributes assigned by the application. These attributes are associa...
uint64_t getExpirationTime(void) const
This function is used to return remaining tuner reservation time.
const Activity & getActivity(void) const
This function is used to return the granted activity. Granted activity may or may not be the same as ...
const std::string & getServiceLocator(void) const
This function is used to return the locator of the service that the tuner is tuned to.
uint64_t getDuration(void) const
This function is used to get the reservation period measured from the start in milliseconds.
void setDuration(const uint64_t &_duratioin)
This function is used to set the reservation duration measured from the start in milliseconds....
The TunerReservation class is used to set the requested or granted tuner reservation from client....
const std::string & getReservationToken(void) const
This function is used to return the unique token generated when a reservation is created.
void addDetail(const std::string &key, const std::string &value)
This function is used to add the details describing the tuner reservation activity in to the activity...