Functions | |
int | CacheInit () |
void | CacheDeInit () |
int | CacheLoad (Multiplex_t *multiplex) |
Load the cache with all the service in the specfied multiplex. | |
void | CacheWriteback () |
Write any changes in the cache, back to the database. | |
Multiplex_t * | CacheMultiplexGet (void) |
Retrieve the Multiplex that the cache is currently managing the services of. | |
Service_t * | CacheServiceFind (char *name) |
Find a service in the cache by either name or fully qualified id (i.e. | |
Service_t * | CacheServiceFindId (int id) |
Find a service in the cache with the specified id. | |
Service_t * | CacheServiceFindName (char *name) |
Find a service with a given name in the cache. | |
Service_t ** | CacheServicesGet (int *count) |
Retrieve all the services currently in the cache and locks the cache to prevent updates to the list. | |
void | CacheServicesRelease (void) |
Releases the services retieved by CacheServiesGet and allows updates to the cache. | |
PIDList_t * | CachePIDsGet (Service_t *service) |
Retrieve the PIDs for a given service and locks the cache to prevent updates. | |
void | CachePIDsRelease (void) |
Releases the PIDs retrieved by CachePIDsGet and allows updates to the cache. | |
void | CacheUpdateMultiplex (Multiplex_t *multiplex, int patversion, int tsid) |
Update the specified Multiplex's pat version and TS id. | |
void | CacheUpdateNetworkId (Multiplex_t *multiplex, int netid) |
Update the specified Multiplex's network id. | |
void | CacheUpdateServicePMTPID (Service_t *service, int pmtpid) |
Update the cached service with a new PMT PID. | |
void | CacheUpdateServiceName (Service_t *service, char *name) |
Update the cached service with a new name. | |
void | CacheUpdateServiceProvider (Service_t *service, char *provider) |
Update the cached service with a new provider. | |
void | CacheUpdateServiceDefaultAuthority (Service_t *service, char *defaultAuthority) |
Update the cached service with a new default authority, used by TVAnytime. | |
void | CacheUpdateServiceSource (Service_t *service, uint16_t source) |
Update the cached service with a new source id. | |
void | CacheUpdateServiceConditionalAccess (Service_t *service, bool ca) |
Update the cached service with the new CA state of the service. | |
void | CacheUpdateServiceType (Service_t *service, ServiceType type) |
Update the cached service with the new type of the service. | |
void | CacheUpdatePIDs (Service_t *service, int pcrpid, PIDList_t *pids, int pmtversion) |
Update the PIDs for the specified service. | |
Service_t * | CacheServiceAdd (int id) |
Add a new Service to the cache. | |
bool | CacheServiceSeen (Service_t *service, bool seen, bool pat) |
Update the 'seen' state of the service. | |
void | CacheServiceDelete (Service_t *service) |
Delete a service from the cache. |
void CacheDeInit | ( | ) |
For internal use only.
De-initialise the cache module, release all services and pids.
int CacheInit | ( | ) |
For internal use only.
Initialise the cache module.
int CacheLoad | ( | Multiplex_t * | multiplex | ) |
Load the cache with all the service in the specfied multiplex.
multiplex | The multiplex to load all the services for. |
Multiplex_t* CacheMultiplexGet | ( | void | ) |
Retrieve the Multiplex that the cache is currently managing the services of.
Retrieve the PIDs for a given service and locks the cache to prevent updates.
CachePIDsRelease() should be called when the list is no longer needed.
service | Service to retrieve the PIDs for. |
Service_t* CacheServiceAdd | ( | int | id | ) |
Add a new Service to the cache.
id | The new service/program id. |
void CacheServiceDelete | ( | Service_t * | service | ) |
Delete a service from the cache.
service | The service to be deleted when CacheWriteback() is called. |
Service_t* CacheServiceFind | ( | char * | name | ) |
Find a service in the cache by either name or fully qualified id (i.e.
<network id>.<ts id>.<service id> where ids are in hex).
name | Name of the service or fully qualified id |
Service_t* CacheServiceFindId | ( | int | id | ) |
Find a service in the cache with the specified id.
id | The service/program id to search for. |
Service_t* CacheServiceFindName | ( | char * | name | ) |
Find a service with a given name in the cache.
name | Name of the service to look for. |
Update the 'seen' state of the service.
If a service is seen in the PAT but not in the SDT/VCT or vice versa the service still exists, but if the service is no longer seen in the PAT and SDT/VCT, the service no longer exists and should be deleted.
service | The service to update the 'seen' status of. | |
seen | Whether the service has been seen or not. | |
pat | If the services was (not) seen in the PAT, but in the SDT/VCT. |
Service_t** CacheServicesGet | ( | int * | count | ) |
Retrieve all the services currently in the cache and locks the cache to prevent updates to the list.
CacheServicesRelease() should be called when the list is no longer needed.
count | Used to store the number of services in the cache. |
void CacheUpdateMultiplex | ( | Multiplex_t * | multiplex, | |
int | patversion, | |||
int | tsid | |||
) |
Update the specified Multiplex's pat version and TS id.
multiplex | The multiplex to update. | |
patversion | The new pat version. | |
tsid | The new TS ID. |
void CacheUpdateNetworkId | ( | Multiplex_t * | multiplex, | |
int | netid | |||
) |
Update the specified Multiplex's network id.
multiplex | The multiplex to update. | |
netid | The network id to set. |
Update the PIDs for the specified service.
service | The service to update. | |
pcrpid | The PID the PCR is being sent on. | |
pids | A PIDList_t structure of new PIDs. | |
pmtversion | The new PMT version. |
Update the cached service with the new CA state of the service.
service | The service to update. | |
ca | The new CA state. |
void CacheUpdateServiceDefaultAuthority | ( | Service_t * | service, | |
char * | defaultAuthority | |||
) |
Update the cached service with a new default authority, used by TVAnytime.
service | The service to update. | |
defaultAuthority | The new default authority. |
void CacheUpdateServiceName | ( | Service_t * | service, | |
char * | name | |||
) |
Update the cached service with a new name.
service | The service to update. | |
name | The new name. |
void CacheUpdateServicePMTPID | ( | Service_t * | service, | |
int | pmtpid | |||
) |
Update the cached service with a new PMT PID.
service | The service to update. | |
pmtpid | The new PMT PID. |
void CacheUpdateServiceProvider | ( | Service_t * | service, | |
char * | provider | |||
) |
Update the cached service with a new provider.
service | The service to update. | |
provider | The new provider name. |
void CacheUpdateServiceSource | ( | Service_t * | service, | |
uint16_t | source | |||
) |
Update the cached service with a new source id.
service | The service to update. | |
source | The new source id. |
void CacheUpdateServiceType | ( | Service_t * | service, | |
ServiceType | type | |||
) |
Update the cached service with the new type of the service.
service | The service to update. | |
type | The new type of the service. |