#include "system.h"
Go to the source code of this file.
Functions | |
G_BEGIN_DECLS gboolean | is_busy_foreground (void) |
gboolean | is_busy_background (void) |
gboolean | busy_add_foreground (gint sender, enum busy_dialog dialog_mode, const char *message) |
gboolean | busy_add_background (gint sender) |
gboolean | busy_remove_foreground (gint sender) |
gboolean | busy_remove_background (gint sender) |
void | busy_set_pid (gint sender, unsigned int pid) |
void | busy_reset_pid (unsigned int pid) |
gboolean busy_add_background | ( | gint | sender | ) |
Definition at line 100 of file busy.c.
References BACKGROUND, and count_ref().
Referenced by cb_sys_set_bg_busy(), start_phase_2(), sys_standby(), update_usb_state(), and usb_connect().
00101 { 00102 // LOGPRINTF("entry"); 00103 00104 count_ref(sender, BACKGROUND); 00105 00106 return TRUE; 00107 }
gboolean busy_add_foreground | ( | gint | sender, | |
enum busy_dialog | dialog_mode, | |||
const char * | message | |||
) |
Definition at line 120 of file busy.c.
References BUSY_DIALOG_DELAYED, BUSY_DIALOG_DIRECT, count_ref(), delay_dialog_cb(), dialog_delay, FOREGROUND, g_dialog_source, g_message, LOGPRINTF, and show_dialog().
Referenced by cb_sys_set_busy_led(), cb_sys_set_fg_busy(), child_new(), conn_connect(), do_poweroff(), do_unmount(), main(), on_phase_2_complete(), sys_restart(), and sys_set_card().
00121 { 00122 LOGPRINTF("entry"); 00123 00124 count_ref(sender, FOREGROUND); 00125 00126 // replace message 00127 if (g_message) 00128 { 00129 g_free(g_message); 00130 } 00131 00132 if (message) 00133 { 00134 g_message = g_strdup(message); 00135 } 00136 else 00137 { 00138 g_message = NULL; 00139 } 00140 00141 if (dialog_mode == BUSY_DIALOG_DIRECT) 00142 { 00143 show_dialog(TRUE); 00144 } 00145 else if (dialog_mode == BUSY_DIALOG_DELAYED) 00146 { 00147 if (g_dialog_source == 0) 00148 { 00149 LOGPRINTF("delay %d ms before show busy DIALOG", dialog_delay); 00150 g_dialog_source = g_timeout_add(dialog_delay, delay_dialog_cb, NULL); 00151 } 00152 else 00153 { 00154 LOGPRINTF("already waiting for busy DIALOG"); 00155 } 00156 } 00157 00158 return TRUE; 00159 }
gboolean busy_remove_background | ( | gint | sender | ) |
Definition at line 110 of file busy.c.
References BACKGROUND, and count_unref().
Referenced by cb_sys_reset_bg_busy(), on_usb_read_device_state(), on_usb_read_online(), and start_phase_2().
00111 { 00112 // LOGPRINTF("entry"); 00113 00114 count_unref(sender, BACKGROUND); 00115 00116 return TRUE; 00117 }
gboolean busy_remove_foreground | ( | gint | sender | ) |
Definition at line 162 of file busy.c.
References count_unref(), and FOREGROUND.
Referenced by cb_sys_reset_fg_busy(), cb_sys_set_busy_led(), conn_set_initialising(), conn_stop(), on_card_indexed(), on_check_child_window(), on_child_new_timeout(), on_eject_continue(), on_phase_3_complete(), on_usb_connected(), and start_phase_2().
00163 { 00164 // LOGPRINTF("entry"); 00165 00166 count_unref(sender, FOREGROUND); 00167 00168 return TRUE; 00169 }
void busy_reset_pid | ( | unsigned int | pid | ) |
void busy_set_pid | ( | gint | sender, | |
unsigned int | pid | |||
) |
gboolean is_busy_background | ( | void | ) |
Definition at line 182 of file busy.c.
References g_background_count.
Referenced by on_idle_timeout().
00183 { 00184 if (g_background_count > 0) 00185 { 00186 return TRUE; 00187 } 00188 return FALSE; 00189 }
G_BEGIN_DECLS gboolean is_busy_foreground | ( | void | ) |
Description: Busy functions Copyright (C) 2009 iRex Technologies B.V. All rights reserved.
Definition at line 172 of file busy.c.
References g_foreground_count.
Referenced by sys_update_rgb_led().
00173 { 00174 if (g_foreground_count > 0) 00175 { 00176 return TRUE; 00177 } 00178 return FALSE; 00179 }