SASC-NG
DVBSoftCAM

dvbdev-2.6.14.h

Go to the documentation of this file.
00001 /*
00002  * dvbdev.h
00003  *
00004  * Copyright (C) 2000 Ralph Metzler & Marcus Metzler
00005  *                    for convergence integrated media GmbH
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Lesser Public License
00009  * as published by the Free Software Foundation; either version 2.1
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00020  *
00021  */
00022 
00023 #ifndef _DVBDEV_H_
00024 #define _DVBDEV_H_
00025 
00026 #include <linux/types.h>
00027 #include <linux/poll.h>
00028 #include <linux/fs.h>
00029 #include <linux/list.h>
00030 #include <linux/devfs_fs_kernel.h>
00031 #include <linux/smp_lock.h>
00032 
00033 #define DVB_MAJOR 212
00034 
00035 #define DVB_DEVICE_VIDEO      0
00036 #define DVB_DEVICE_AUDIO      1
00037 #define DVB_DEVICE_SEC        2
00038 #define DVB_DEVICE_FRONTEND   3
00039 #define DVB_DEVICE_DEMUX      4
00040 #define DVB_DEVICE_DVR        5
00041 #define DVB_DEVICE_CA         6
00042 #define DVB_DEVICE_NET        7
00043 #define DVB_DEVICE_OSD        8
00044 
00045 
00046 struct dvb_adapter {
00047         int num;
00048         struct list_head list_head;
00049         struct list_head device_list;
00050         const char *name;
00051         u8 proposed_mac [6];
00052         void* priv;
00053 
00054         struct module *module;
00055 };
00056 
00057 
00058 struct dvb_device {
00059         struct list_head list_head;
00060         struct file_operations *fops;
00061         struct dvb_adapter *adapter;
00062         int type;
00063         u32 id;
00064 
00065         /* in theory, 'users' can vanish now,
00066            but I don't want to change too much now... */
00067         int readers;
00068         int writers;
00069         int users;
00070 
00071         /* don't really need those !? -- FIXME: use video_usercopy  */
00072         int (*kernel_ioctl)(struct inode *inode, struct file *file,
00073                             unsigned int cmd, void *arg);
00074 
00075         void *priv;
00076 };
00077 
00078 
00079 extern int dvb_register_adapter (struct dvb_adapter *adap, const char *name, struct module *module);
00080 extern int dvb_unregister_adapter (struct dvb_adapter *adap);
00081 
00082 extern int dvb_register_device (struct dvb_adapter *adap,
00083                                 struct dvb_device **pdvbdev,
00084                                 const struct dvb_device *template,
00085                                 void *priv,
00086                                 int type);
00087 
00088 extern void dvb_unregister_device (struct dvb_device *dvbdev);
00089 
00090 extern int dvb_generic_open (struct inode *inode, struct file *file);
00091 extern int dvb_generic_release (struct inode *inode, struct file *file);
00092 extern int dvb_generic_ioctl (struct inode *inode, struct file *file,
00093                               unsigned int cmd, unsigned long arg);
00094 
00095 /* we don't mess with video_usercopy() any more,
00096 we simply define out own dvb_usercopy(), which will hopefully become
00097 generic_usercopy()  someday... */
00098 
00099 extern int dvb_usercopy(struct inode *inode, struct file *file,
00100                             unsigned int cmd, unsigned long arg,
00101                             int (*func)(struct inode *inode, struct file *file,
00102                             unsigned int cmd, void *arg));
00103 
00104 #endif /* #ifndef _DVBDEV_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines