From d0f7048e94abe3371aeeba6f5cd115959e332b09 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Sun, 1 Mar 2009 15:00:15 +0100 Subject: Imported Upstream version 0.8+svn128 --- src/krb5-auth-applet.h | 59 +++++++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 22 deletions(-) (limited to 'src/krb5-auth-applet.h') diff --git a/src/krb5-auth-applet.h b/src/krb5-auth-applet.h index e137794..a33be55 100644 --- a/src/krb5-auth-applet.h +++ b/src/krb5-auth-applet.h @@ -22,6 +22,7 @@ #define KRB5_AUTH_APPLET_H #include +#include #include #include #include @@ -32,32 +33,46 @@ #include "config.h" -typedef struct { - GtkStatusIcon* tray_icon; /* the tray icon */ - GtkWidget* context_menu; /* the tray icon's context menu */ - const char* icons[3]; /* for invalid, expiring and valid tickts */ - gboolean show_trayicon; /* show the trayicon */ +G_BEGIN_DECLS - /* The password dialog */ - GtkWidget* pw_dialog; /* the password dialog itself */ - GladeXML* pw_xml; /* the dialog's glade xml */ - GtkWidget* pw_wrong_label; /* the wrong password/timeout label */ - int pw_prompt_secs; /* when to start prompting for a password */ - gboolean pw_dialog_persist; /* don't hide the dialog when creds are still valid */ +#define KA_TYPE_APPLET (ka_applet_get_type ()) +#define KA_APPLET(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), KA_TYPE_APPLET, KaApplet)) +#define KA_APPLET_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), KA_TYPE_APPLET, KaAppletClass)) +#define KA_IS_APPLET(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), KA_TYPE_APPLET)) +#define KA_IS_APPLET_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), KA_TYPE_APPLET)) +#define KA_APPLET_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), KA_TYPE_APPLET, KaAppletClass)) -#ifdef HAVE_LIBNOTIFY - NotifyNotification* notification;/* notification messages */ -#endif /* HAVE_LIBNOTIFY */ - char* principal; /* the principal to request */ - gboolean renewable; /* credentials renewable? */ - char* pk_userid; /* "userid" for pkint */ -} Krb5AuthApplet; +typedef struct _KaApplet KaApplet; +typedef struct _KaAppletClass KaAppletClass; +typedef struct _KaAppletPrivate KaAppletPrivate; + +GType ka_applet_get_type (void); +KaApplet* ka_applet_new(void) G_GNUC_MALLOC; + +/* public functions */ +gboolean ka_applet_get_show_trayicon(const KaApplet* applet); +void ka_applet_set_tgt_renewable(KaApplet* applet, gboolean renewable); +gboolean ka_applet_get_tgt_renewable(const KaApplet* applet); +guint ka_applet_get_pw_prompt_secs(const KaApplet* applet); + +/* password dialog */ +gint ka_applet_run_pw_dialog(const KaApplet* applet); +GladeXML* ka_applet_get_pwdialog_xml(const KaApplet* applet); +void ka_applet_hide_pw_dialog(KaApplet* applet, gboolean force); +GtkWidget* ka_applet_get_pw_label(const KaApplet* applet); +void ka_applet_set_pw_dialog_persist(KaApplet* applet, gboolean persist); + +G_END_DECLS -Krb5AuthApplet* ka_create_applet(); +/* create the applet */ +KaApplet* ka_applet_create(); /* update tooltip and icon */ -int ka_update_status(Krb5AuthApplet* applet, krb5_timestamp expiry); -/* show or hide the tray icon */ -gboolean ka_show_tray_icon(Krb5AuthApplet* applet); +int ka_applet_update_status(KaApplet* applet, krb5_timestamp expiry); #ifdef ENABLE_DEBUG #define KA_DEBUG(fmt,...) \ -- cgit