read some more battery data using new bme.c file but not stable, crashes after 23...
[monky] / src / conky.h
index e192f41..3e96cb3 100644 (file)
@@ -10,7 +10,7 @@
  * Please see COPYING for details
  *
  * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
- * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al.
+ * Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al.
  *     (see AUTHORS)
  * All rights reserved.
  *
@@ -128,18 +128,27 @@ struct text_object;
 /* sony support */
 #include "sony.h"
 
+#include <dbus/dbus.h>
+#include <dbus/dbus-glib.h>
+#include <glib.h>
+#include <mce/mode-names.h>
+
+
+DBusConnection* conn;//session bus
+DBusConnection* conn2;//system bus
+DBusMessage* msg;
+DBusMessageIter args;
+DBusError err;
+int ret;
+
 /* A size for temporary, static buffers to use when
  * one doesn't know what to choose. Defaults to 256.  */
 extern unsigned int text_buffer_size;
 
-struct entropy_s {
-       unsigned int entropy_avail;
-       unsigned int poolsize;
-};
-
 struct usr_info {
        char *names;
        char *times;
+       char *ctime;
        char *terms;
        int number;
 };
@@ -201,11 +210,19 @@ extern struct conftree *currentconffile;
 #define MAX_TEMPLATES 10
 char **get_templates(void);
 
-/* get_battery_stuff() item selector
+/* get_xxxxx_stuff() item selector
  * needed by conky.c, linux.c and freebsd.c */
 enum {
        BATTERY_STATUS,
-       BATTERY_TIME
+       BATTERY_TIME,
+       BATTERY_VOLTS,
+       BATTERY_TEMP,
+        BATTERY_RATE,
+       DBUS_CELL_DBM,
+       DBUS_CELL_PERCENT,
+       DBUS_HAL_BATTERY_CHRG_STATUS,
+       DBUS_HAL_BATTERY_PERCENT,
+       DBUS_HAL_BATTERY_VOLTS_CURRENT
 };
 
 /* if_up strictness selector
@@ -232,6 +249,7 @@ struct information {
        unsigned short procs;
        unsigned short run_procs;
        unsigned short threads;
+       unsigned short run_threads;
 
        float *cpu_usage;
        /* struct cpu_stat cpu_summed; what the hell is this? */
@@ -262,7 +280,6 @@ struct information {
 #endif
        struct process *first_process;
        unsigned long looped;
-       struct entropy_s entropy;
        double music_player_interval;
 
 #ifdef X11
@@ -300,9 +317,7 @@ extern int top_cpu, top_mem, top_time;
 #ifdef IOSTATS
 extern int top_io;
 #endif
-#ifdef __linux__
 extern int top_running;
-#endif
 
 /* defined in conky.c, needed by top.c */
 extern int cpu_separate;
@@ -312,20 +327,21 @@ extern int cpu_separate;
 extern struct information info;
 
 /* defined in users.c */
-void update_users(void);
+int update_users(void);
+void update_user_time(char *tty);
 
 /* defined in conky.c */
 extern double current_update_time, last_update_time, update_interval;
-
+extern int update_heartbeat_min, update_heartbeat_max, update_heartbeat_battery_skip, update_skips_when_sleeping;
 /* defined in conky.c */
 int spaced_print(char *, int, const char *, int, ...)
        __attribute__((format(printf, 3, 5)));
 extern int inotify_fd;
 
 /* defined in conky.c
- * evaluates 'text' and places the result in 'buffer'
+ * evaluates 'text' and places the result in 'p' of max length 'p_max_size'
  */
-void evaluate(const char *text, char *buffer);
+void evaluate(const char *text, char *p, int p_max_size);
 
 /* maximum size of config TEXT buffer, i.e. below TEXT line. */
 extern unsigned int max_user_text;
@@ -362,7 +378,7 @@ void set_update_interval(double interval);
 #define UNUSED_ATTR __attribute__ ((unused))
 
 void parse_conky_vars(struct text_object *, const char *,
-                       char *, struct information *);
+                       char *, int, struct information *);
 
 void generate_text_internal(char *, int, struct text_object,
                                    struct information *);