00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef DBUS_API_SUBJECT_TO_CHANGE
00025 #define DBUS_API_SUBJECT_TO_CHANGE
00026 #endif
00027
00028 #ifndef HILDON_CONTROLPANEL_MAIN_H
00029 #define HILDON_CONTROLPANEL_MAIN_H
00030
00031
00032 #include <libintl.h>
00033 #include <strings.h>
00034
00035
00036 #include <libosso.h>
00037 #include <osso-helplib.h>
00038
00039
00040 #include <glib.h>
00041 #include <glib/gstdio.h>
00042
00043
00044 #include <gdk/gdkkeysyms.h>
00045
00046
00047 #include <gtk/gtk.h>
00048
00049
00050 #include <hildon-widgets/hildon-program.h>
00051 #include <hildon-widgets/hildon-note.h>
00052 #include <hildon-widgets/gtk-infoprint.h>
00053
00054 #include <hildon-base-lib/hildon-base-dnotify.h>
00055 #include <hildon-base-lib/hildon-base-types.h>
00056
00057
00058 #include "hildon-cp-applist.h"
00059 #include "hildon-cp-item.h"
00060 #include "cp-grid.h"
00061
00062
00063 G_BEGIN_DECLS
00064
00065
00066 #define _(a) gettext(a)
00067
00068 #define APP_NAME "controlpanel"
00069 #define APP_VERSION "0.1"
00070
00071 #define HILDON_CONTROL_PANEL_TITLE _("copa_ap_cp_name")
00072 #define HILDON_CONTROL_PANEL_MENU_OPEN _("copa_me_open")
00073 #define HILDON_CONTROL_PANEL_MENU_SUB_VIEW _("copa_me_view")
00074 #define HILDON_CONTROL_PANEL_MENU_SMALL_ITEMS _("copa_me_view_small")
00075 #define HILDON_CONTROL_PANEL_MENU_LARGE_ITEMS _("copa_me_view_large")
00076 #define HILDON_CONTROL_PANEL_MENU_SUB_TOOLS _("copa_me_tools")
00077 #define HILDON_CONTROL_PANEL_MENU_SETUP_WIZARD _("copa_me_tools_setup_wizard")
00078 #define HILDON_CONTROL_PANEL_MENU_RFS _("copa_me_tools_rfs")
00079 #define HILDON_CONTROL_PANEL_MENU_CUD _("copa_me_tools_cud")
00080 #define HILDON_CONTROL_PANEL_MENU_HELP _("copa_me_tools_help")
00081 #define HILDON_CONTROL_PANEL_MENU_CLOSE _("copa_me_close")
00082
00083 #define RESET_FACTORY_SETTINGS_INFOBANNER_OK _("rfs_bd_ok")
00084 #define RESET_FACTORY_SETTINGS_INFOBANNER_CANCEL _("rfs_bd_cancel")
00085 #define HILDON_CP_RFS_WARNING _("refs_ia_text")
00086 #define HILDON_CP_CUD_WARNING _("cud_ia_text")
00087
00088 #define HILDON_CP_RFS_WARNING_TITLE _("rfs_ti_restore")
00089 #define HILDON_CP_CUD_WARNING_TITLE _("cud_ti_clear")
00090
00091 #define HILDON_CP_RFS_HELP_TOPIC "Features_restorefactorysettings_closealldialog"
00092 #define HILDON_CP_CUD_HELP_TOPIC "Features_clearuserdata_dialog"
00093
00094 #define HILDON_CP_CODE_DIALOG_HELP_TOPIC "Features_restorefactorysettings_passwordquerydialog"
00095
00096 #define RESET_FACTORY_SETTINGS_IB_WRONG_LOCKCODE dgettext("hildon-libs", "secu_info_incorrectcode")
00097
00098 #define HILDON_CP_SYSTEM_DIR ".osso/hildon-cp"
00099 #define HILDON_CP_CONF_USER_FILENAME "hildon-cp.conf"
00100 #define HILDON_CP_SYSTEM_DIR_ACCESS 0755
00101 #define HILDON_ENVIRONMENT_USER_HOME_DIR "HOME"
00102 #define HILDON_CP_CONF_FILE_FORMAT \
00103 "iconsize=%20s\n"
00104 #define HILDON_CP_MAX_FILE_LENGTH 30
00105
00106
00107 #define HILDON_CP_DBUS_MCE_SERVICE "com.nokia.mce"
00108 #define HILDON_CP_DBUS_MCE_REQUEST_IF "com.nokia.mce.request"
00109 #define HILDON_CP_DBUS_MCE_REQUEST_PATH "/com/nokia/mce/request"
00110 #define HILDON_CP_MCE_PASSWORD_VALIDATE "validate_devicelock_code"
00111 #define HILDON_CP_DEFAULT_SALT "$1$JE5Gswee$"
00112
00113 #define HCP_GCONF_ICON_SIZE "/apps/osso/apps/controlpanel/icon_size"
00114
00115 #define HCP_STATE_GROUP "HildonControlPanel"
00116 #define HCP_STATE_FOCUSSED "Focussed"
00117 #define HCP_STATE_SCROLL_VALUE "ScrollValue"
00118 #define HCP_STATE_EXECUTE "Execute"
00119
00120
00121 #define OSSO_HELP_ID_CONTROL_PANEL "Utilities_controlpanel_mainview"
00122 #define HILDON_CP_ASSUMED_LOCKCODE_MAXLENGTH 5
00123
00124
00125
00126 #define HCP_RPC_SERVICE "com.nokia.controlpanel"
00127 #define HCP_RPC_PATH "/com/nokia/controlpanel/rpc"
00128 #define HCP_RPC_INTERFACE "com.nokia.controlpanel.rpc"
00129 #define HCP_RPC_METHOD_RUN_APPLET "run_applet"
00130 #define HCP_RPC_METHOD_SAVE_STATE_APPLET "save_state_applet"
00131 #define HCP_RPC_METHOD_TOP_APPLICATION "top_application"
00132 #define HCP_RPC_METHOD_IS_APPLET_RUNNING "is_applet_running"
00133
00134 typedef struct _HCP HCP;
00135
00136 struct _HCP {
00137 HildonProgram *program;
00138 HildonWindow *window;
00139 HCPAppList *al;
00140 HCPItem *focused_item;
00141 GtkWidget *view;
00142 GtkWidget *large_icons_menu_item;
00143 GtkWidget *small_icons_menu_item;
00144 GList *grids;
00145 osso_context_t *osso;
00146
00147
00148 gint icon_size;
00149 gchar *saved_focused_filename;
00150 gint scroll_value;
00151 gint execute;
00152 };
00153
00154 gboolean hcp_rfs (HCP *hcp,
00155 const char *warning,
00156 const char *title,
00157 const char *script,
00158 const char *help_topic);
00159
00160
00161 G_END_DECLS
00162
00163 #endif