00001 #include <time.h> 00002 00003 #ifdef __cplusplus 00004 extern "C" { 00005 #endif 00006 typedef void * rwil_handle; 00007 typedef struct { rwil_handle handle; int dev_handle; } rwil_device; 00008 00010 00013 rwil_handle rwil_init(); 00014 00016 00022 rwil_device rwil_create(rwil_handle rwilhandle, char house, int num); 00023 00025 00028 void rwil_destroy(rwil_device handle); 00029 00031 00035 void rwil_on(rwil_device handle, time_t when); 00036 00038 00042 void rwil_off(rwil_device handle, time_t when); 00043 00045 00050 void rwil_setbright(rwil_device handle, int brightness, time_t when); 00051 00053 00062 void rwil_interpolatebright(rwil_device handle, int startbrightness, int endbrightness, time_t startwhen, time_t endwhen, int steps); 00063 00068 00069 int rwil_getbright(rwil_device handle); 00070 00072 00075 int rwil_ison(rwil_device handle); 00076 00078 00081 typedef void (*rwil_success_callback_t)(rwil_device); 00082 00084 00088 void rwil_success_callback(rwil_success_callback_t callback); 00089 00091 00094 typedef void (*rwil_failure_callback_t)(rwil_device, const char *); 00095 00097 00101 void rwil_failure_callback(rwil_failure_callback_t callback); 00102 00104 00108 void rwil_shutdown(rwil_handle rwilhandle); 00109 00110 #ifdef __cplusplus 00111 } 00112 #endif