Move subscription_t to subscriptions.h
This commit is contained in:
parent
bdb1d3e32b
commit
7270c59e5c
5 changed files with 63 additions and 60 deletions
|
@ -63,8 +63,6 @@ channel_t *channel_find_by_name(const char *name, int create);
|
|||
|
||||
channel_t *channel_find_by_identifier(int id);
|
||||
|
||||
void channel_unsubscribe(th_subscription_t *s);
|
||||
|
||||
void channel_set_teletext_rundown(channel_t *ch, int v);
|
||||
|
||||
void channel_settings_write(channel_t *ch);
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#include "dvb.h"
|
||||
#include "channels.h"
|
||||
#include "transports.h"
|
||||
#include "subscriptions.h"
|
||||
#include "teletext.h"
|
||||
#include "psi.h"
|
||||
#include "dvb_support.h"
|
||||
|
|
|
@ -19,6 +19,68 @@
|
|||
#ifndef SUBSCRIPTIONS_H
|
||||
#define SUBSCRIPTIONS_H
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Subscription
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
TRANSPORT_AVAILABLE,
|
||||
TRANSPORT_UNAVAILABLE,
|
||||
} subscription_event_t;
|
||||
|
||||
typedef void (subscription_callback_t)(struct th_subscription *s,
|
||||
subscription_event_t event,
|
||||
void *opaque);
|
||||
|
||||
typedef void (subscription_raw_input_t)(struct th_subscription *s,
|
||||
void *data, int len,
|
||||
th_stream_t *st,
|
||||
void *opaque);
|
||||
|
||||
|
||||
|
||||
typedef void (subscription_status_callback_t)(struct th_subscription *s,
|
||||
int status,
|
||||
void *opaque);
|
||||
|
||||
typedef struct th_subscription {
|
||||
LIST_ENTRY(th_subscription) ths_global_link;
|
||||
int ths_weight;
|
||||
|
||||
LIST_ENTRY(th_subscription) ths_channel_link;
|
||||
struct channel *ths_channel; /* May be NULL if channel has been
|
||||
destroyed during the
|
||||
subscription */
|
||||
|
||||
LIST_ENTRY(th_subscription) ths_transport_link;
|
||||
struct th_transport *ths_transport; /* if NULL, ths_transport_link
|
||||
is not linked */
|
||||
|
||||
LIST_ENTRY(th_subscription) ths_subscriber_link; /* Caller is responsible
|
||||
for this link */
|
||||
|
||||
char *ths_title; /* display title */
|
||||
time_t ths_start; /* time when subscription started */
|
||||
int ths_total_err; /* total errors during entire subscription */
|
||||
|
||||
subscription_callback_t *ths_callback;
|
||||
void *ths_opaque;
|
||||
uint32_t ths_u32;
|
||||
|
||||
subscription_raw_input_t *ths_raw_input;
|
||||
|
||||
th_muxer_t *ths_muxer;
|
||||
|
||||
subscription_status_callback_t *ths_status_callback;
|
||||
|
||||
} th_subscription_t;
|
||||
|
||||
|
||||
/**
|
||||
* Prototypes
|
||||
*/
|
||||
void subscription_unsubscribe(th_subscription_t *s);
|
||||
|
||||
void subscription_set_weight(th_subscription_t *s, unsigned int weight);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#define TRANSPORTS_H
|
||||
|
||||
#include "channels.h"
|
||||
#include "subscriptions.h"
|
||||
|
||||
unsigned int transport_compute_weight(struct th_transport_list *head);
|
||||
|
||||
|
|
57
tvhead.h
57
tvhead.h
|
@ -753,63 +753,6 @@ typedef struct tt_decoder {
|
|||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Subscription
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
TRANSPORT_AVAILABLE,
|
||||
TRANSPORT_UNAVAILABLE,
|
||||
} subscription_event_t;
|
||||
|
||||
typedef void (subscription_callback_t)(struct th_subscription *s,
|
||||
subscription_event_t event,
|
||||
void *opaque);
|
||||
|
||||
typedef void (subscription_raw_input_t)(struct th_subscription *s,
|
||||
void *data, int len,
|
||||
th_stream_t *st,
|
||||
void *opaque);
|
||||
|
||||
|
||||
|
||||
typedef void (subscription_status_callback_t)(struct th_subscription *s,
|
||||
int status,
|
||||
void *opaque);
|
||||
|
||||
typedef struct th_subscription {
|
||||
LIST_ENTRY(th_subscription) ths_global_link;
|
||||
int ths_weight;
|
||||
|
||||
LIST_ENTRY(th_subscription) ths_channel_link;
|
||||
struct channel *ths_channel; /* May be NULL if channel has been
|
||||
destroyed during the
|
||||
subscription */
|
||||
|
||||
LIST_ENTRY(th_subscription) ths_transport_link;
|
||||
struct th_transport *ths_transport; /* if NULL, ths_transport_link
|
||||
is not linked */
|
||||
|
||||
LIST_ENTRY(th_subscription) ths_subscriber_link; /* Caller is responsible
|
||||
for this link */
|
||||
|
||||
char *ths_title; /* display title */
|
||||
time_t ths_start; /* time when subscription started */
|
||||
int ths_total_err; /* total errors during entire subscription */
|
||||
|
||||
subscription_callback_t *ths_callback;
|
||||
void *ths_opaque;
|
||||
uint32_t ths_u32;
|
||||
|
||||
subscription_raw_input_t *ths_raw_input;
|
||||
|
||||
th_muxer_t *ths_muxer;
|
||||
|
||||
subscription_status_callback_t *ths_status_callback;
|
||||
|
||||
} th_subscription_t;
|
||||
|
||||
char *utf8toprintable(const char *in);
|
||||
char *utf8tofilename(const char *in);
|
||||
const char *htstvstreamtype2txt(tv_streamtype_t s);
|
||||
|
|
Loading…
Add table
Reference in a new issue