Update to spec
[metawatch.git] / metawatch.h
index bedaa4e..2244940 100644 (file)
@@ -33,6 +33,10 @@ typedef struct _mwdevice_t {
        void *mw_rlsrsp_data;
        void (*mw_status_change_event_cb) (struct _mwdevice_t *mwdevice, unsigned char *scrmode, unsigned char *status, void *user_data);
        void *mw_stchev_data;
+       void (*mw_low_battery_warning_message_cb) (struct _mwdevice_t *mwdevice, void *user_data);
+       void *mw_lbatwarnmsg_data;
+       void (*mw_low_battery_bt_off_message_cb) (struct _mwdevice_t *mwdevice, void *user_data);
+       void *mw_lbatbtoff_data;
 } mwdevice_t;
 
 void dump_frame(unsigned char *frame, int len);
@@ -85,12 +89,20 @@ void mw_set_read_light_sensor_response_cb(mwdevice_t *mwdevice, void (*mw_read_l
 int mw_status_change_event(mwdevice_t *mwdevice, unsigned char option, unsigned char *statrsp, int len);
 void mw_set_status_change_event_cb(mwdevice_t *mwdevice, void (*mw_status_change_event_cb) (mwdevice_t *mwdevice, unsigned char *scrmode, unsigned char *status, void *user_data), void *user_data);
 
+int mw_low_battery_warning_message(mwdevice_t *mwdevice);
+void mw_set_low_battery_warning_message_cb(mwdevice_t *mwdevice, void (*mw_low_battery_warning_message_cb) (mwdevice_t *mwdevice, void *user_data), void *user_data);
+
+int mw_low_battery_bt_off_message(mwdevice_t *mwdevice);
+void mw_set_low_battery_bt_off_message_cb(mwdevice_t *mwdevice, void (*mw_low_battery_bt_off_message_cb) (mwdevice_t *mwdevice, void *user_data), void *user_data);
+
 int mw_enable_button(mwdevice_t *mwdevice, unsigned char mode, unsigned char button_index, unsigned char press_type, unsigned char callback_type, unsigned char callback_option);
 
 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 mw_battery_configuration(mwdevice_t *mwdevice, unsigned char warn_lvl, unsigned char bt_off_lvl);
+
 int mw_decode_frame(mwdevice_t *mwdevice, unsigned char *buf, int len);
 
 int mw_feed_msg_buffer(mwdevice_t *mwdevice, unsigned char *buf, int len);