#define __MODEST_TNY_ACCOUNT_STORE_H__
#include <glib-object.h>
+#include <tny-account-store.h>
+#include <tny-session-camel.h>
+
/* other include files */
G_BEGIN_DECLS
/* convenience macros */
#define MODEST_TYPE_TNY_ACCOUNT_STORE (modest_tny_account_store_get_type())
#define MODEST_TNY_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_TNY_ACCOUNT_STORE,ModestTnyAccountStore))
-#define MODEST_TNY_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_TNY_ACCOUNT_STORE,GObject))
+#define MODEST_TNY_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_TNY_ACCOUNT_STORE,ModestTnyAccountStoreClass))
#define MODEST_IS_TNY_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_TNY_ACCOUNT_STORE))
#define MODEST_IS_TNY_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_TNY_ACCOUNT_STORE))
#define MODEST_TNY_ACCOUNT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_TNY_ACCOUNT_STORE,ModestTnyAccountStoreClass))
typedef struct _ModestTnyAccountStoreClass ModestTnyAccountStoreClass;
struct _ModestTnyAccountStore {
- GObject parent;
- /* insert public members, if any */
+ //TnyAccountStore parent;
+ GObject parent;
};
struct _ModestTnyAccountStoreClass {
+ //TnyAccountStoreClass parent_class;
GObjectClass parent_class;
- /* insert signal callback declarations, eg. */
- /* void (* my_event) (ModestTnyAccountStore* obj); */
+
+ void (*password_requested) (ModestTnyAccountStore *self,
+ const gchar *account_name,
+ gpointer user_data);
};
/* member functions */
+
+/**
+ * modest_tny_account_store_get_type:
+ *
+ * Returns: GType of account store
+ */
GType modest_tny_account_store_get_type (void) G_GNUC_CONST;
-/* typical parameter-less _new function */
-/* if this is a kind of GtkWidget, it should probably return at GtkWidget*, */
-/* otherwise probably a GObject*. */
+/**
+ * modest_tny_account_store_new:
+ * @modest_acc_mgr: account manager to use for new account store
+ *
+ * creates new (tinymail) account store for account manager modest_acc_mgr
+ *
+ * Returns: GObject of newly created account store
+ */
GObject* modest_tny_account_store_new (ModestAccountMgr *modest_acc_mgr);
-/* fill in other public functions, eg.: */
-/* void modest_tny_account_store_do_something (ModestTnyAccountStore *self, const gchar* param); */
-/* gboolean modest_tny_account_store_has_foo (ModestTnyAccountStore *self, gint value); */
+/**
+ * modest_tny_account_store_get_account_mgr:
+ * @self: a TnyAccountStore instance
+ *
+ * retrieve the account manager associated with this account store.
+ *
+ * Returns: the account manager for @self.
+ */
+ModestAccountMgr *modest_tny_account_store_get_accout_mgr(ModestTnyAccountStore *self);
+
+/**
+ * tny_account_store_get_session:
+ * @self: a TnyAccountStore instance
+ *
+ * retrieve current tinymail camel session
+ *
+ * Returns: current tinymail camel session
+ */
+TnySessionCamel* tny_account_store_get_session (TnyAccountStore *self);
G_END_DECLS