home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lxapi32.zip / Include / lxapilib.h < prev    next >
C/C++ Source or Header  |  2002-04-22  |  3KB  |  85 lines

  1. /*
  2.  * lxapilib.h
  3.  * Autor:               Stefan Milcke
  4.  * Erstellt am:         08.01.2002
  5.  * Letzte Aenderung am: 31.01.2002
  6.  *
  7. */
  8.  
  9. #ifndef LXAPILIB_H_INCLUDED
  10. #define LXAPILIB_H_INCLUDED
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. #include <linux/module.h>
  17.  
  18. // Returns 0, if successfull, any other value indicates a failure
  19. int OS2_initlxapi(void);
  20.  
  21. #ifndef NOOS2LXAPI
  22. extern unsigned long (*OS2_lxioctl)(void __far* requestPacketPtr);
  23. extern int (*OS2_add_module)(struct os2lx_module *pModule);
  24. extern int (*OS2_apply_mod_parm)(char *parm,struct os2lx_parm *parmList,int num);
  25. extern int (*OS2_set_module_parm)(char *parm);
  26. extern int (*OS2_get_num_modules)(void);
  27. extern int (*OS2_get_total_num_modules)(void);
  28. extern char *(*OS2_get_module_name)(int nr);
  29. extern int (*OS2_enum_modules)(void *buffer,unsigned long buffer_len);
  30.  
  31. extern int (*OS2_v4lx_enum_devices)(void *buffer,unsigned long buffer_len);
  32. extern unsigned long (*OS2_v4lx_get_num_devices)(void);
  33. extern int (*OS2_v4lx_open_device)(char *devname);
  34. extern int (*OS2_v4lx_close_device)(int handle);
  35. extern void (*OS2_v4lx_close_all_opened_devices)(void);
  36. extern struct video_device *(*OS2_v4lx_get_opened_device)(int handle);
  37. extern int (*OS2_v4lx_ioctl)(int handle,int ioctlfn,void *userData);
  38. #else
  39. unsigned long OS2_lxioctl(void __far* requestPacketPtr);
  40. int OS2_add_module(struct os2lx_module *pModule);
  41. int OS2_apply_mod_parm(char *parm,struct os2lx_parm *parmList,int num);
  42. int OS2_set_module_parm(char *parm);
  43. int OS2_get_num_modules(void);
  44. int OS2_get_total_num_modules(void);
  45. char *OS2_get_module_name(int nr);
  46. int OS2_enum_modules(void *buffer,unsigned long buffer_len);
  47.  
  48. int OS2_v4lx_enum_devices(void *buffer,unsigned long buffer_len);
  49. unsigned long OS2_v4lx_get_num_devices(void);
  50. int OS2_v4lx_open_device(char *devname);
  51. int OS2_v4lx_close_device(int handle);
  52. void OS2_v4lx_close_all_opened_devices(void);
  53. struct video_device *OS2_v4lx_get_opened_device(int handle);
  54. int OS2_v4lx_ioctl(int handle,int ioctlfn,void *userData);
  55.  
  56.  
  57. //----------------------------- internal use only ------------------------------
  58. int OS2_do_add_module(struct os2lx_module *pModule,int external);
  59. void do_cleanup_all_requested_modules(int external);
  60.  
  61. #endif
  62.  
  63. #pragma pack(1)
  64. struct os2_enum_module
  65. {
  66.  char name[32];
  67.  int active;
  68. };
  69.  
  70. struct os2_enum_video_device
  71. {
  72.  char name[32];
  73.  char devname[16];
  74.  unsigned long type;
  75.  unsigned long hardware;
  76. };
  77. #pragma pack()
  78.  
  79. #ifdef __cplusplus
  80. };
  81. #endif
  82.  
  83.  
  84. #endif //LXAPILIB_H_INCLUDED
  85.