| 1 | #if 0
 | 
|---|
| 2 |     V4L INDI Driver
 | 
|---|
| 3 |     INDI Interface for V4L devices
 | 
|---|
| 4 |     Copyright (C) 2003-2005 Jasem Mutlaq (mutlaqja@ikarustech.com)
 | 
|---|
| 5 | 
 | 
|---|
| 6 |     This library is free software; you can redistribute it and/or
 | 
|---|
| 7 |     modify it under the terms of the GNU Lesser General Public
 | 
|---|
| 8 |     License as published by the Free Software Foundation; either
 | 
|---|
| 9 |     version 2.1 of the License, or (at your option) any later version.
 | 
|---|
| 10 | 
 | 
|---|
| 11 |     This library is distributed in the hope that it will be useful,
 | 
|---|
| 12 |     but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 13 |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 | 
|---|
| 14 |     Lesser General Public License for more details.
 | 
|---|
| 15 | 
 | 
|---|
| 16 |     You should have received a copy of the GNU Lesser General Public
 | 
|---|
| 17 |     License along with this library; if not, write to the Free Software
 | 
|---|
| 18 |     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 | 
|---|
| 19 | 
 | 
|---|
| 20 | #endif
 | 
|---|
| 21 | 
 | 
|---|
| 22 | #include "v4ldriver.h"
 | 
|---|
| 23 | 
 | 
|---|
| 24 | V4L_Driver *MainCam = NULL;             /* Main and only camera */
 | 
|---|
| 25 | 
 | 
|---|
| 26 | /* send client definitions of all properties */
 | 
|---|
| 27 | void ISInit()
 | 
|---|
| 28 | {
 | 
|---|
| 29 |   if (MainCam == NULL)
 | 
|---|
| 30 |   {
 | 
|---|
| 31 |     MainCam = new V4L_Driver();
 | 
|---|
| 32 |     MainCam->initProperties("Video4Linux Generic Device");
 | 
|---|
| 33 |     MainCam->initCamBase();
 | 
|---|
| 34 |   }
 | 
|---|
| 35 | }
 | 
|---|
| 36 |     
 | 
|---|
| 37 | void ISGetProperties (const char *dev)
 | 
|---|
| 38 | { 
 | 
|---|
| 39 |    ISInit();
 | 
|---|
| 40 |   
 | 
|---|
| 41 |   MainCam->ISGetProperties(dev);
 | 
|---|
| 42 | }
 | 
|---|
| 43 | 
 | 
|---|
| 44 | 
 | 
|---|
| 45 | void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 | 
|---|
| 46 | {
 | 
|---|
| 47 |         
 | 
|---|
| 48 |   ISInit();
 | 
|---|
| 49 |   
 | 
|---|
| 50 |   MainCam->ISNewSwitch(dev, name, states, names, n);
 | 
|---|
| 51 | }
 | 
|---|
| 52 | 
 | 
|---|
| 53 | void ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
 | 
|---|
| 54 | {
 | 
|---|
| 55 |   
 | 
|---|
| 56 |    ISInit();
 | 
|---|
| 57 |    
 | 
|---|
| 58 |    MainCam->ISNewText(dev, name, texts, names, n);
 | 
|---|
| 59 | }
 | 
|---|
| 60 | 
 | 
|---|
| 61 | 
 | 
|---|
| 62 | void ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n)
 | 
|---|
| 63 | {
 | 
|---|
| 64 |       
 | 
|---|
| 65 |   ISInit();
 | 
|---|
| 66 |   
 | 
|---|
| 67 |   MainCam->ISNewNumber(dev, name, values, names, n);
 | 
|---|
| 68 | }
 | 
|---|
| 69 | 
 | 
|---|
| 70 | void ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n) {}
 | 
|---|
| 71 | void ISSnoopDevice (XMLEle *root) {}
 | 
|---|