]> git.kernelconcepts.de Git - metawatch.git/blobdiff - metawatch.h
More callbacks, further GUI work
[metawatch.git] / metawatch.h
index eb93784fb86cec92cfcaf13d4d3505eaddf50cb0..5df07a07493d70242c29e29467eece3e5e52204e 100644 (file)
@@ -13,6 +13,9 @@
 typedef struct _mwdevice_t {
        int mw_fd;              /* file decriptor for MW connection */
        unsigned char devtype;  /* the device type of the connected device */
 typedef struct _mwdevice_t {
        int mw_fd;              /* file decriptor for MW connection */
        unsigned char devtype;  /* the device type of the connected device */
+       /* watch message callbacks */
+       void (*mw_get_device_type_response_cb) (struct _mwdevice_t *mwdevice, unsigned char devtype, void *user_data);
+       void *mw_gdtypersp_data;
        void (*mw_get_real_time_clock_response_cb) (struct _mwdevice_t *mwdevice, struct tm *mw_tm, void *user_data);
        void *mw_grtcrsp_data;
        void (*mw_get_battery_voltage_response_cb) (struct _mwdevice_t *mwdevice, unsigned short *voltage, unsigned char *pgood, unsigned char *charging, void *user_data);
        void (*mw_get_real_time_clock_response_cb) (struct _mwdevice_t *mwdevice, struct tm *mw_tm, void *user_data);
        void *mw_grtcrsp_data;
        void (*mw_get_battery_voltage_response_cb) (struct _mwdevice_t *mwdevice, unsigned short *voltage, unsigned char *pgood, unsigned char *charging, void *user_data);
@@ -53,6 +56,9 @@ int mw_write_oled_buffer(mwdevice_t *mwdevice,
        unsigned char col_index, /* starting index */
        unsigned char *buffer, int buflen);
 
        unsigned char col_index, /* starting index */
        unsigned char *buffer, int buflen);
 
+int mw_get_device_type_response(mwdevice_t *mwdevice, unsigned char devtype);
+void mw_set_get_device_type_response_cb(mwdevice_t *mwdevice, void (*mw_get_device_type_response_cb) (mwdevice_t *mwdevice, unsigned char devtype, void *user_data), void *user_data);
+
 int mw_get_real_time_clock_response(mwdevice_t *mwdevice, unsigned char *rtcrsp, int len);
 void mw_set_get_real_time_clock_response_cb(mwdevice_t *mwdevice, void (*mw_get_real_time_clock_response_cb) (mwdevice_t *mwdevice, struct tm *mw_tm, void *user_data), void *user_data);
 
 int mw_get_real_time_clock_response(mwdevice_t *mwdevice, unsigned char *rtcrsp, int len);
 void mw_set_get_real_time_clock_response_cb(mwdevice_t *mwdevice, void (*mw_get_real_time_clock_response_cb) (mwdevice_t *mwdevice, struct tm *mw_tm, void *user_data), void *user_data);
 
@@ -71,6 +77,8 @@ int mw_enable_button(mwdevice_t *mwdevice, unsigned char mode, unsigned char but
 
 int mw_disable_button(mwdevice_t *mwdevice, unsigned char mode, unsigned char button_index, unsigned char press_type);
 
 
 int mw_disable_button(mwdevice_t *mwdevice, unsigned char mode, unsigned char button_index, unsigned char press_type);
 
+int mw_advance_watch_hands(mwdevice_t *mwdevice, unsigned char hours, unsigned char minutes, unsigned char seconds);
+
 int decode_frame(mwdevice_t *mwdevice, unsigned char *buf, int len);
 
 int mw_init(mwdevice_t *mwdevice, int mw_fd);
 int decode_frame(mwdevice_t *mwdevice, unsigned char *buf, int len);
 
 int mw_init(mwdevice_t *mwdevice, int mw_fd);