1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
#ifndef __INCLUDED_TVOE_FRONTEND
#define __INCLUDED_TVOE_FRONTEND
#include <cstdbool>
#include <functional>
#include "tvoe.h"
using std::function;
struct tune {
/** Delivery system type, reserved for future use */
unsigned int delivery_system;
// union {
struct {
unsigned int frequency;
unsigned int symbol_rate;
unsigned int inversion;
unsigned int fec;
/** Polarization. True: horizontal, false: Vertical */
bool polarization;
} dvbs;
/** Service ID requested */
unsigned int sid;
// };
};
struct lnb {
unsigned int lof1, lof2, slof;
size_t dmxbuf;
};
/**
* Tune to a specific transponder. This function selects a new, current unused
* frontend and tunes to the specified frequency. dvr_callback will be called
* with the argument "ptr" passed unmodified to the callback
* @param s Struct describing the transponder to tune to
* @param ptr Pointer to be passed to the callback function
* @return Frontend handle to be passed to frontend_release(), NULL
* on error.
*/
void *frontend_acquire(struct tune s, void *ptr);
/**
* Release a specific frontend
* @param ptr Pointer returned by frontend_acquire()
*/
void frontend_release(void *ptr);
/**
* Add a new DVB-S frontend on /dev/dvb/adapterX/frontendY, X and Y are
* specified by the caller, and sets the parameters of the attached LNB.
* No error handling is performed if the frontend does not exists or is in use,
* subscribe_to_frontend() will fail at some point then. (This behaviour might
* change in the future)
* @param adapter Adapter number
* @param frontend Frontend number
*/
int frontend_add(int adapter, int frontend, struct lnb l);
/**
* Initialize the frontend management subsystem
*/
void frontend_init(void);
/**
* Send a (HTML-formatted) list of current idle/used transponders
*/
void send_transponder_list(function<void(string)> sendfn);
#endif
|