RDK Documentation (Open Sourced RDK Components)
|
Data Structures | |
class | ReservationCustomAttributes |
class | Tuner |
class | SpecVersion |
Enumerations | |
enum | |
enum | |
enum | |
enum | |
Functions | |
static TRM_BEGIN_NAMESPACE void | json_dump_error (const std::string &title, const json_error_t &error) |
static int | vector_dump_callback (const char *buffer, size_t size, void *data) |
static int | vector_load_callback (const char *buffer, size_t size, void *data) |
static void | JsonEncode (const Activity &r, json_t *parent) |
static void | JsonDecode (json_t *parent, Activity &r) |
static void | JsonEncode (const TunerReservation &r, json_t *parent) |
static void | JsonDecode (json_t *parent, TunerReservation &reservation) |
static void | JsonEncode (const DetailedTunerState &r, json_t *parent) |
static void | JsonDecode (json_t *parent, DetailedTunerState &reservation) |
static void | JsonEncode (const NotifyClientConnectionEvent &r, json_t *parent) |
static void | JsonDecode (json_t *parent, NotifyClientConnectionEvent ¬ification) |
static void | JsonEncode (const SimpleTRMRequest &r, std::vector< uint8_t > &out, int) |
static void | JsonEncode (const SimpleTRMRequest &r, json_t *parent) |
static void | JsonDecode (int handle, SimpleTRMRequest &message, int) |
static void | JsonDecode (json_t *parent, SimpleTRMRequest &message) |
static void | JsonEncode (const SimpleTRMResponse &r, json_t *parent) |
static void | JsonDecode (json_t *parent, SimpleTRMResponse &message) |
int | JsonDecode (const std::vector< uint8_t > &in, Enum< Klass > &klass) |
void | JsonEncode (const ReserveTuner &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, ReserveTuner &message) |
void | JsonEncode (const ReserveTunerResponse &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, ReserveTunerResponse &message) |
void | JsonEncode (const ReleaseTunerReservation &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, ReleaseTunerReservation &message) |
void | JsonEncode (const ValidateTunerReservation &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, ValidateTunerReservation &message) |
void | JsonEncode (const CancelRecording &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, CancelRecording &message) |
void | JsonEncode (const ReleaseTunerReservationResponse &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, ReleaseTunerReservationResponse &message) |
void | JsonEncode (const ValidateTunerReservationResponse &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, ValidateTunerReservationResponse &message) |
void | JsonEncode (const CancelRecordingResponse &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, CancelRecordingResponse &message) |
void | JsonEncode (const GetAllTunerIds &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, GetAllTunerIds &message) |
void | JsonEncode (const GetAllTunerIdsResponse &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, GetAllTunerIdsResponse &message) |
void | JsonEncode (const GetAllTunerStates &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, GetAllTunerStates &message) |
void | JsonEncode (const GetAllTunerStatesResponse &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, GetAllTunerStatesResponse &message) |
void | JsonEncode (const GetAllReservations &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, GetAllReservations &message) |
void | JsonEncode (const GetAllReservationsResponse &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, GetAllReservationsResponse &message) |
void | JsonEncode (const GetVersion &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, GetVersion &message) |
void | JsonEncode (const GetVersionResponse &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, GetVersionResponse &message) |
void | JsonEncode (const UpdateTunerActivityStatusResponse &r, std::vector< uint8_t > &out) |
void | JsonEncode (const UpdateTunerActivityStatus &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, UpdateTunerActivityStatus &message) |
void | JsonEncode (const NotifyTunerReservationRelease &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, NotifyTunerReservationRelease &message) |
void | JsonEncode (const NotifyTunerReservationUpdate &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, NotifyTunerReservationUpdate &message) |
void | JsonEncode (const NotifyTunerReservationConflicts &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, NotifyTunerReservationConflicts &message) |
void | JsonEncode (const NotifyTunerStatesUpdate &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, NotifyTunerStatesUpdate &message) |
void | JsonEncode (const NotifyTunerPretune &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, NotifyTunerPretune &message) |
void | JsonEncode (const CancelLiveResponse &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, CancelLiveResponse &message) |
void | JsonEncode (const CancelLive &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, CancelLive &message) |
int | JsonDecode (const std::vector< uint8_t > &in, GenerateAuthTokenResponse &response) |
int | JsonDecode (const std::vector< uint8_t > &in, GenerateAuthTokenResponseFromAuthService &response) |
std::string | GetDeviceId () |
void | JsonEncode (const NotifyClientConnectionEvent &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, NotifyClientConnectionEvent &message) |
void | JsonEncode (const GetTRMConnectionEvents &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, GetTRMConnectionEvents &message) |
void | JsonEncode (const GetAllConnectedDeviceIdsResponse &r, std::vector< uint8_t > &out) |
void | JsonDecode (int handle, GetAllConnectedDeviceIdsResponse &message) |
void | delete_ReservationCustomAttributes (void *p) |
static TRM_BEGIN_NAMESPACE bool | isOverlap (uint64_t start1, uint64_t dur1, uint64_t start2, uint64_t dur2) |
static TRM_BEGIN_NAMESPACE int | connect_to_authServer (const char *ip, int port, int *auth_fd) |
const std::string | IntToString (int i) |
const std::string | IntToString (int i, int j) |
const std::string | GenerateUUID (void) |
void | HexDump (const std::vector< uint8_t > &in) |
uint64_t | GetCurrentEpoch (void) |
std::ostream & | Timestamp (std::ostream &os) |
std::ostream & | Log (void) |
std::string | GetAuthToken (const char *generateTokenRequest) |
const SpecVersion & | GetSpecVersion (void) |
static const std::vector< const Enum< Activity > * > & | TRM::Activity::getEnums (void) |
const Enum< Activity > & | TRM::Activity::getActivity (void) const |
This function is used to return the request or granted usage of tuner. The Activity field represents the intended use of the tuner. More... | |
bool | TRM::Activity::hasDetails (void) const |
This function is used to return true if the activity has the detailed field describing the activity, otherwise the function will return false. More... | |
const std::string & | TRM::Activity::getDetail (const std::string &key) const |
This function will get the details of the recording. Each activity may be associated with a set of details describing the tuner activity. More... | |
const std::map< KeyT, ValT > & | TRM::Activity::getDetails (void) const |
void | TRM::Activity::addDetail (const std::string &key, const std::string &value) |
This API is used to add the details describing the activity in to a list. More... | |
bool | TRM::Activity::operator== (const Activity &that) const |
void | TRM::Activity::print (void) const |
Print the list of recording(s) details which are being scheduled. The defined fields are,. More... | |
void | TRM::Header::serialize (std::vector< uint8_t > &out) const |
void | TRM::Header::deserialize (const std::vector< uint8_t > &in) |
void | TRM::Header::setPayloadLength (size_t payloadLength) |
size_t | TRM::Header::getPayloadLength (void) const |
void | TRM::Header::setClientId (uint32_t connectionId) |
uint32_t | TRM::Header::getClientId (void) const |
void | TRM::JsonDecoder::decode (std::vector< uint8_t > &in) |
static const std::vector< const Enum< Klass > * > & | TRM::Klass::getEnums (void) |
static const std::vector< const Enum< ResponseStatus > * > & | TRM::ResponseStatus::getEnums (void) |
const Enum< ResponseStatus > & | TRM::ResponseStatus::getStatusCode (void) const |
bool | TRM::ResponseStatus::operator== (const ResponseStatus &that) const |
ResponseStatus & | TRM::ResponseStatus::operator+= (const char *message) |
ResponseStatus & | TRM::ResponseStatus::operator= (const Enum< ResponseStatus > &status) |
void | TRM::ResponseStatus::print (void) const |
const std::string & | TRM::ResponseStatus::getDetails (void) const |
std::string & | TRM::ResponseStatus::getDetails (void) |
Tuner::Tuner (const std::string &internalId) | |
TunerReservation::TokenList & | Tuner::getReservationTokens (TunerReservation::TokenList &tokens) const |
const TunerReservation & | Tuner::getReservation (const std::string &reservationToken) const |
TunerReservation & | Tuner::getReservation (const std::string &reservationToken) |
const TunerReservation & | Tuner::getReservation (const Activity &activity, int reservationState, const std::string &serviceLocator="") const |
const TunerState | Tuner::getState (void) const |
void | Tuner::setState (const TunerState &state) |
const std::string | Tuner::getServiceLocator (bool considerFutureToken=true) const |
uint64_t | Tuner::getEndTime (const Activity &activity) const |
const std::string & | Tuner::getId (void) const |
void | Tuner::addReservation (const TunerReservation &reservation) |
void | Tuner::releaseReservation (const std::string &reservationToken) |
bool | Tuner::assertTunerState (int state, int lowMark, int highMark) |
TRM::TunerReservationBase::TunerReservationBase (const std::string &device, const std::string &serviceLocator, const uint64_t startTime, const uint64_t duration, const Activity &activity, const std::string &reservationToken="", ReservationCustomAttributes *customAttributes=0) | |
void | TRM::TunerReservationBase::setReservationToken (const std::string &token) |
This function is used to set a unique token generated when a reservation is created. After a reservation is created, this token is used in all messages to uniquely identify an existing reservation within TRM. More... | |
const std::string & | TRM::TunerReservationBase::getReservationToken (void) const |
This function is used to return the unique token generated when a reservation is created. More... | |
const std::string & | TRM::TunerReservationBase::getServiceLocator (void) const |
This function is used to return the locator of the service that the tuner is tuned to. More... | |
uint64_t | TRM::TunerReservationBase::getStartTime (void) const |
This function is used to get the start time of the reservation in milliseconds from the epoch. More... | |
uint64_t | TRM::TunerReservationBase::getDuration (void) const |
This function is used to get the reservation period measured from the start in milliseconds. More... | |
const std::string & | TRM::TunerReservationBase::getDevice (void) const |
This function is used to get the remote device id requesting for tuner reservation. More... | |
const Activity & | TRM::TunerReservationBase::getActivity (void) const |
This function is used to return the granted activity. Granted activity may or may not be the same as the requested. In the later case the owner of the reservation will need to comply with the returned activity, or initiate conflict resolution. For example, a client requests for Live activity when EAS is in progress, the returned reservation will have the EAS activity. More... | |
void | TRM::TunerReservationBase::setServiceLocator (const std::string &_serviceLocator) |
This function is used to set the locator of the service that the tuner will tune to. The service locator is a URL containing tune parameters of the remote device. More... | |
void | TRM::TunerReservationBase::setStartTime (const uint64_t &_startTime) |
This function is used to set the start time of the reservation in milliseconds from the epoch. If the startTime not present a requested message, this is set to when the reservation is granted or renewed. More... | |
void | TRM::TunerReservationBase::setDuration (const uint64_t &_duratioin) |
This function is used to set the reservation duration measured from the start in milliseconds. If the duration field not present in a request message, the token is valid for a default duration. More... | |
uint64_t | TRM::TunerReservationBase::getExpirationTime (void) const |
This function is used to return remaining tuner reservation time. More... | |
void | TRM::TunerReservationBase::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 list. More... | |
const ReservationCustomAttributes * | TRM::TunerReservationBase::getCustomAttributes (void) const |
This function is used to return the custom attributes assigned by the application. These attributes are associated with the reservation token for the lifetime of the reservation. More... | |
void | TRM::TunerReservationBase::setCustomAttributes (ReservationCustomAttributes *) |
This function is used to set the attributes assigned by the application. These attributes are associated with the reservation token for the lifetime of the reservation. More... | |
virtual void | TRM::TunerReservationBase::print (void) const |
This function is used to print the following attributes of tunerReservation token. More... | |
static const std::vector< const Enum< TunerState > * > & | TRM::TunerState::getEnums (void) |
TRM::TunerState::TunerState (const Enum< TunerState > &state) | |
const Enum< TunerState > & | TRM::TunerState::getState (void) const |
virtual TunerState | TRM::TunerState::operator+ (const Enum< Activity > &activity) |
bool | TRM::TunerState::operator== (const TunerState &that) const |
bool | TRM::TunerState::operator!= (const TunerState &that) const |
void | TRM::TunerState::print (void) const |
Variables | |
static const Enum< Activity > | TRM::Activity::kNone |
static const Enum< Activity > | TRM::Activity::kLive |
static const Enum< Activity > | TRM::Activity::kRecord |
static const Enum< Activity > | TRM::Activity::kEAS |
static const char | TRM::Header::kProtocol [4] = {'T','R', 'M', 'S'} |
static const Enum< Klass > | TRM::Klass::kUnknown |
static const Enum< Klass > | TRM::Klass::kDetails |
static const Enum< Klass > | TRM::Klass::kActivity |
static const Enum< Klass > | TRM::Klass::kTunerReservation |
static const Enum< Klass > | TRM::Klass::kTunerState |
static const Enum< Klass > | TRM::Klass::kResponseStatus |
static const Enum< Klass > | TRM::Klass::kMessageBase |
static const Enum< Klass > | TRM::Klass::kNoResponse |
static const Enum< Klass > | TRM::Klass::kRequestBase |
static const Enum< Klass > | TRM::Klass::kResponseBase |
static const Enum< Klass > | TRM::Klass::kNotificationBase |
static const Enum< Klass > | TRM::Klass::kSimpleTRMRequest |
static const Enum< Klass > | TRM::Klass::kSimpleTRMResponse |
static const Enum< Klass > | TRM::Klass::kReserveTuner |
static const Enum< Klass > | TRM::Klass::kReserveTunerResponse |
static const Enum< Klass > | TRM::Klass::kReleaseTunerReservation |
static const Enum< Klass > | TRM::Klass::kReleaseTunerReservationResponse |
static const Enum< Klass > | TRM::Klass::kValidateTunerReservation |
static const Enum< Klass > | TRM::Klass::kValidateTunerReservationResponse |
static const Enum< Klass > | TRM::Klass::kCancelRecording |
static const Enum< Klass > | TRM::Klass::kCancelRecordingResponse |
static const Enum< Klass > | TRM::Klass::kCancelLive |
static const Enum< Klass > | TRM::Klass::kCancelLiveResponse |
static const Enum< Klass > | TRM::Klass::kGetAllTunerIds |
static const Enum< Klass > | TRM::Klass::kGetAllTunerIdsResponse |
static const Enum< Klass > | TRM::Klass::kGetAllTunerStates |
static const Enum< Klass > | TRM::Klass::kGetAllTunerStatesResponse |
static const Enum< Klass > | TRM::Klass::kGetAllReservations |
static const Enum< Klass > | TRM::Klass::kGetAllReservationsResponse |
static const Enum< Klass > | TRM::Klass::kGetVersion |
static const Enum< Klass > | TRM::Klass::kGetVersionResponse |
static const Enum< Klass > | TRM::Klass::kGetAllConnectedDeviceIdsResponse |
static const Enum< Klass > | TRM::Klass::kNotifyTunerReservationUpdate |
static const Enum< Klass > | TRM::Klass::kNotifyTunerReservationRelease |
static const Enum< Klass > | TRM::Klass::kNotifyTunerReservationConflicts |
static const Enum< Klass > | TRM::Klass::kNotifyTunerStatesUpdate |
static const Enum< Klass > | TRM::Klass::kNotifyTunerPretune |
static const Enum< Klass > | TRM::Klass::kNotifyClientConnectionEvent |
static const Enum< Klass > | TRM::Klass::kGetTRMConnectionEvents |
static const Enum< Klass > | TRM::Klass::kUpdateTunerActivityStatus |
static const Enum< Klass > | TRM::Klass::kUpdateTunerActivityStatusResponse |
static const Enum< ResponseStatus > | TRM::ResponseStatus::kOk |
static const Enum< ResponseStatus > | TRM::ResponseStatus::kGeneralError |
static const Enum< ResponseStatus > | TRM::ResponseStatus::kMalFormedRequest |
static const Enum< ResponseStatus > | TRM::ResponseStatus::kUnRecognizedRequest |
static const Enum< ResponseStatus > | TRM::ResponseStatus::kInvalidToken |
static const Enum< ResponseStatus > | TRM::ResponseStatus::kInvalidState |
static const Enum< ResponseStatus > | TRM::ResponseStatus::kUserCancellation |
static const Enum< ResponseStatus > | TRM::ResponseStatus::kInsufficientResource |
static const Enum< TunerState > | TRM::TunerState::kFree |
static const Enum< TunerState > | TRM::TunerState::kLive |
static const Enum< TunerState > | TRM::TunerState::kRecord |
static const Enum< TunerState > | TRM::TunerState::kHybrid |
static const Enum< TunerState > | TRM::TunerState::kEAS |
class ReservationCustomAttributes |
Definition at line 38 of file ReservationCustomAttributes.h.
Public Member Functions | |
ReservationCustomAttributes (json_t *jsonObject) | |
json_t * | getObject (void) const |
Private Attributes | |
json_t * | jsonObject |
class Tuner |
class SpecVersion |
Public Member Functions | |
SpecVersion (int major_, int minor_) | |
const std::string | toString () const |
bool | operator> (const SpecVersion &that) const |
Private Member Functions | |
int | toInt (void) const |
Private Attributes | |
int | major_ |
int | minor_ |
This function is used to return the request or granted usage of tuner. The Activity field represents the intended use of the tuner.
Definition at line 89 of file Activity.cpp.
bool Activity::hasDetails | ( | void | ) | const |
This function is used to return true if the activity has the detailed field describing the activity, otherwise the function will return false.
Definition at line 101 of file Activity.cpp.
const std::string & Activity::getDetail | ( | const std::string & | key | ) | const |
This function will get the details of the recording. Each activity may be associated with a set of details describing the tuner activity.
[in] | key | recording Id for which details to be extracted from the list. |
Definition at line 114 of file Activity.cpp.
void Activity::addDetail | ( | const std::string & | key, |
const std::string & | value | ||
) |
This API is used to add the details describing the activity in to a list.
The field specified here are required for the associated activity. The requestor is allowed to insert unspecified fields in the details. These unspecified fields are ignored by TRM, and echoed back in response message that have the activity field.
The defined fields are:
[in] | key | it could be "recordingId" or "hot" when requesting Record activity for a tuner. |
[in] | value | value associated for recording. |
Definition at line 147 of file Activity.cpp.
void Activity::print | ( | void | ) | const |
Print the list of recording(s) details which are being scheduled. The defined fields are,.
Definition at line 166 of file Activity.cpp.
void TunerReservationBase::setReservationToken | ( | const std::string & | token | ) |
This function is used to set a unique token generated when a reservation is created. After a reservation is created, this token is used in all messages to uniquely identify an existing reservation within TRM.
[in] | token | A unique token that the requesting device can use to make the remote tuning request. |
Definition at line 71 of file TunerReservation.cpp.
const std::string & TunerReservationBase::getReservationToken | ( | void | ) | const |
This function is used to return the unique token generated when a reservation is created.
Definition at line 83 of file TunerReservation.cpp.
const std::string & TunerReservationBase::getServiceLocator | ( | void | ) | const |
This function is used to return the locator of the service that the tuner is tuned to.
Definition at line 94 of file TunerReservation.cpp.
uint64_t TunerReservationBase::getStartTime | ( | void | ) | const |
This function is used to get the start time of the reservation in milliseconds from the epoch.
Definition at line 105 of file TunerReservation.cpp.
uint64_t TunerReservationBase::getDuration | ( | void | ) | const |
This function is used to get the reservation period measured from the start in milliseconds.
Definition at line 116 of file TunerReservation.cpp.
const std::string & TunerReservationBase::getDevice | ( | void | ) | const |
This function is used to get the remote device id requesting for tuner reservation.
Definition at line 127 of file TunerReservation.cpp.
const Activity & TunerReservationBase::getActivity | ( | void | ) | const |
This function is used to return the granted activity. Granted activity may or may not be the same as the requested. In the later case the owner of the reservation will need to comply with the returned activity, or initiate conflict resolution.
For example, a client requests for Live activity when EAS is in progress, the returned reservation will have the EAS activity.
Definition at line 142 of file TunerReservation.cpp.
void TunerReservationBase::setServiceLocator | ( | const std::string & | _serviceLocator | ) |
This function is used to set the locator of the service that the tuner will tune to. The service locator is a URL containing tune parameters of the remote device.
[in] | serviceLocator | Locator of the service that the tuner will tune to. |
Definition at line 155 of file TunerReservation.cpp.
void TunerReservationBase::setStartTime | ( | const uint64_t & | startTime | ) |
This function is used to set the start time of the reservation in milliseconds from the epoch. If the startTime not present a requested message, this is set to when the reservation is granted or renewed.
[in] | startTime | Time in milliseconds from the epoch. |
Definition at line 169 of file TunerReservation.cpp.
void TunerReservationBase::setDuration | ( | const uint64_t & | duration | ) |
This function is used to set the reservation duration measured from the start in milliseconds. If the duration field not present in a request message, the token is valid for a default duration.
[in] | duration | A time period measured from the start in milliseconds. |
Definition at line 183 of file TunerReservation.cpp.
uint64_t TunerReservationBase::getExpirationTime | ( | void | ) | const |
This function is used to return remaining tuner reservation time.
Definition at line 195 of file TunerReservation.cpp.
void TunerReservationBase::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 list.
The field specified here are required for the associated activity. The requestor is allowed to insert unspecified fields in the details. These unspecified fields are ignored by TRM, and echoed back in response message that have the activity field.
The defined fields are:
[in] | key | it could be "recordingId" or "hot" when requesting Record activity for a tuner. |
[in] | value | value associated for key. |
Definition at line 222 of file TunerReservation.cpp.
const ReservationCustomAttributes * TunerReservationBase::getCustomAttributes | ( | void | ) | const |
This function is used to return the custom attributes assigned by the application. These attributes are associated with the reservation token for the lifetime of the reservation.
Definition at line 234 of file TunerReservation.cpp.
void TunerReservationBase::setCustomAttributes | ( | ReservationCustomAttributes * | customAttributes | ) |
This function is used to set the attributes assigned by the application. These attributes are associated with the reservation token for the lifetime of the reservation.
The customAttributes contains JSON entities defined by the application. It is sent by the application when it requests for a tuner reservation. After the reservation is granted, and as long as the content of the reservation is not modified, the customAttributes will be present in any messages, including the asynchronous notifications, that contains the corresponding TunerReservation.
If a renewd TunerReservation also contains customAttributes, the new attributes object will take the place.
[in] | customAttributes | A set of attributes assigned by the application. |
Definition at line 255 of file TunerReservation.cpp.
|
virtual |
This function is used to print the following attributes of tunerReservation token.
Definition at line 270 of file TunerReservation.cpp.