Data Structures | |
struct | Service_t |
Structure describing a digital TV service. More... | |
Defines | |
#define | ServiceAreEqual(_service1, _service2) |
Macro to compare 2 service structures. | |
#define | ServiceNew() (Service_t*)ObjectCreateType(Service_t) |
Create a new service object. | |
#define | ServiceRefInc(__service) |
Increment the references to the specified service object. | |
#define | ServiceRefDec(__service) |
Decrement the references of the specified service object. | |
Typedefs | |
typedef void * | ServiceEnumerator_t |
Handle for enumerating services. | |
Enumerations | |
enum | ServiceType { ServiceType_TV, ServiceType_Radio, ServiceType_Data, ServiceType_Unknown } |
Enumeration to describe the type of a service. More... | |
Functions | |
int | ServiceInit (void) |
Initialise the service module for use. | |
int | ServiceDeinit (void) |
Release resources used by the service module. | |
int | ServiceCount () |
Return the number of services in the database. | |
int | ServiceForMultiplexCount (int multiplexuid) |
Retrieve the number of services on the specified multplex. | |
int | ServiceDelete (Service_t *service) |
Remove a service from the database. | |
int | ServiceAdd (int multiplexuid, char *name, int id, int source, bool ca, ServiceType type, int pmtversion, int pmtpid, int pcrpid) |
Add a service to the database. | |
int | ServicePMTVersionSet (Service_t *service, int pmtversion) |
Set the PMT version for the given service. | |
int | ServicePMTPIDSet (Service_t *service, int pmtpid) |
Set the PMT PID for the given service. | |
int | ServicePCRPIDSet (Service_t *service, int pcrpid) |
Set the PCR PID for the given service. | |
int | ServiceNameSet (Service_t *service, char *name) |
Set the service name for the given service. | |
int | ServiceSourceSet (Service_t *service, int source) |
Set the service name for the given service. | |
int | ServiceConditionalAccessSet (Service_t *service, bool ca) |
Set whether the service is conditional access of not. | |
int | ServiceTypeSet (Service_t *service, ServiceType type) |
Set the type of the specified service. | |
int | ServiceProviderSet (Service_t *service, char *provider) |
Set the service provider name for the given service. | |
int | ServiceDefaultAuthoritySet (Service_t *service, char *defaultAuthority) |
Set the default authority for the given service. | |
Service_t * | ServiceFind (char *name) |
Find a service based either on service name or fully qualified id. | |
Service_t * | ServiceFindName (char *name) |
Find the service with the given name. | |
Service_t * | ServiceFindId (Multiplex_t *multiplex, int id) |
Find the service with the given id. | |
Service_t * | ServiceFindFQID (uint16_t networkId, uint16_t tsId, uint16_t serviceId) |
Find the service based on the fully qualified ID. | |
Service_t * | ServiceFindFQIDStr (char *FQIdStr) |
Find the service based on the fully qualified ID string. | |
ServiceEnumerator_t | ServiceEnumeratorGet () |
Retrieve an enumerator for the entire service table. | |
ServiceEnumerator_t | ServiceEnumeratorForMultiplex (Multiplex_t *multiplex) |
Retrieve an enumerator for the specified multiplex. | |
ServiceEnumerator_t | ServiceFindByPID (int pid, Multiplex_t *opt_multiplex) |
Retrieve an enumerator for the services known to be assosciated with the given PID. | |
ServiceEnumerator_t | ServiceQueryNameLike (char *query) |
Retrieve an enumerator for the names that match the query string. | |
void | ServiceEnumeratorDestroy (ServiceEnumerator_t enumerator) |
Free an enumerator. | |
Service_t * | ServiceGetNext (ServiceEnumerator_t enumerator) |
Retrieve the next service from an enumerator. |
payload
= A Service_t representing the service that has been added.payload
= A Service_t representing the service that is to be removed. #define ServiceAreEqual | ( | _service1, | |||
_service2 | ) |
Value:
(((_service1)->multiplexUID == (_service2)->multiplexUID) && \
((_service1)->id == (_service2)->id))
#define ServiceRefDec | ( | __service | ) |
Value:
do{ \ if ((__service)) \ { \ ObjectRefDec(__service); \ } \ }while(0)
If the reference count reaches 0 the instance is free'd.
__service | The service instance to decrement the reference count of. |
#define ServiceRefInc | ( | __service | ) |
Value:
do{ \ if ((__service)) \ { \ ObjectRefInc(__service); \ } \ }while(0)
__service | The service instance to increment the reference count of. |
enum ServiceType |
int ServiceAdd | ( | int | multiplexuid, | |
char * | name, | |||
int | id, | |||
int | source, | |||
bool | ca, | |||
ServiceType | type, | |||
int | pmtversion, | |||
int | pmtpid, | |||
int | pcrpid | |||
) |
Add a service to the database.
multiplexuid | The multiplex the service is broadcast on. | |
name | Name of the service. | |
id | The service/program id of the service. | |
source | The service/channels source id. | |
ca | Whether the service is conditional access. | |
type | The type of the service. | |
pmtversion | The version of the last PMT processed. | |
pmtpid | The PID the service's PMT is transmitted on. | |
pcrpid | The PID the service's PCR is transmitted on. |
Set whether the service is conditional access of not.
service | The service to update. | |
ca | The new state of the service |
int ServiceCount | ( | ) |
Return the number of services in the database.
int ServiceDefaultAuthoritySet | ( | Service_t * | service, | |
char * | defaultAuthority | |||
) |
Set the default authority for the given service.
service | The service to update. | |
defaultAuthority | The new authority of the service. |
int ServiceDeinit | ( | void | ) |
Release resources used by the service module.
int ServiceDelete | ( | Service_t * | service | ) |
Remove a service from the database.
service | The service to remove from the database. |
ServiceEnumerator_t ServiceEnumeratorForMultiplex | ( | Multiplex_t * | multiplex | ) |
Retrieve an enumerator for the specified multiplex.
multiplex | The multiplex the service is broadcast on. |
ServiceEnumerator_t ServiceEnumeratorGet | ( | ) |
Retrieve an enumerator for the entire service table.
Service_t* ServiceFind | ( | char * | name | ) |
Find a service based either on service name or fully qualified id.
name | Service name or fully qualified id. |
ServiceEnumerator_t ServiceFindByPID | ( | int | pid, | |
Multiplex_t * | opt_multiplex | |||
) |
Retrieve an enumerator for the services known to be assosciated with the given PID.
Optionally restrict the search to a given multiplex.
pid | The PID to search for. | |
opt_multiplex | Optional. The multiplex the service is broadcast on. |
Service_t* ServiceFindFQID | ( | uint16_t | networkId, | |
uint16_t | tsId, | |||
uint16_t | serviceId | |||
) |
Find the service based on the fully qualified ID.
The returned service should be released with ServiceRefDec.
networkId | Network ID of the multiplex this service is on. | |
tsId | TS ID of the multiplex this service is on. | |
serviceId | ID of the service to find. |
Service_t* ServiceFindFQIDStr | ( | char * | FQIdStr | ) |
Find the service based on the fully qualified ID string.
A fully qualified ID string is in the form "<netId>.<tsId>.<serviceId>", where all the IDs are 16bit hex numbers. The returned service should be released with ServiceRefDec.
FQIdStr | String to extract the network, ts and service IDs from. |
Service_t* ServiceFindId | ( | Multiplex_t * | multiplex, | |
int | id | |||
) |
Find the service with the given id.
The returned service should be released with ServiceRefDec.
multiplex | The multiplex the service is broadcast on. | |
id | The id of the service to find. |
Service_t* ServiceFindName | ( | char * | name | ) |
Find the service with the given name.
The returned service should be released with ServiceRefDec.
name | The name of the service to find. |
int ServiceForMultiplexCount | ( | int | multiplexuid | ) |
Retrieve the number of services on the specified multplex.
multiplexuid | The multiplex to retrieve the service count for. |
Service_t* ServiceGetNext | ( | ServiceEnumerator_t | enumerator | ) |
Retrieve the next service from an enumerator.
The returned service should be released with ServiceRefDec.
enumerator | The enumerator to retrieve the next service from. |
int ServiceInit | ( | void | ) |
Initialise the service module for use.
int ServiceNameSet | ( | Service_t * | service, | |
char * | name | |||
) |
Set the service name for the given service.
service | The service to update. | |
name | The new name of the service. |
int ServicePCRPIDSet | ( | Service_t * | service, | |
int | pcrpid | |||
) |
Set the PCR PID for the given service.
service | The service to update. | |
pcrpid | The new PID of the PCR. |
int ServicePMTPIDSet | ( | Service_t * | service, | |
int | pmtpid | |||
) |
Set the PMT PID for the given service.
service | The service to update. | |
pmtpid | The new PID of the PMT. |
int ServicePMTVersionSet | ( | Service_t * | service, | |
int | pmtversion | |||
) |
Set the PMT version for the given service.
service | The service to update. | |
pmtversion | The version of the PMT to set. |
int ServiceProviderSet | ( | Service_t * | service, | |
char * | provider | |||
) |
Set the service provider name for the given service.
service | The service to update. | |
provider | The new provider name of the service. |
ServiceEnumerator_t ServiceQueryNameLike | ( | char * | query | ) |
Retrieve an enumerator for the names that match the query string.
This function uses the SQL LIKE syntax for the query string.
query | An SQL LIKE formated string of the name to search for. |
int ServiceSourceSet | ( | Service_t * | service, | |
int | source | |||
) |
Set the service name for the given service.
service | The service to update. | |
source | The new source id of the service. |
int ServiceTypeSet | ( | Service_t * | service, | |
ServiceType | type | |||
) |
Set the type of the specified service.
service | The service to update. | |
type | The new type of the service |