gchar *user_data_dir;
gchar *user_cache_dir;
gchar *uid;
+ gchar *password;
GCancellable *connect_op;
CamelServiceConnectionStatus status;
enum {
PROP_0,
PROP_DISPLAY_NAME,
+ PROP_PASSWORD,
PROP_PROVIDER,
PROP_SESSION,
PROP_SETTINGS,
g_value_get_string (value));
return;
+ case PROP_PASSWORD:
+ camel_service_set_password (
+ CAMEL_SERVICE (object),
+ g_value_get_string (value));
+ return;
+
case PROP_PROVIDER:
service_set_provider (
CAMEL_SERVICE (object),
CAMEL_SERVICE (object)));
return;
+ case PROP_PASSWORD:
+ g_value_set_string (
+ value, camel_service_get_password (
+ CAMEL_SERVICE (object)));
+ return;
+
case PROP_PROVIDER:
g_value_set_pointer (
value, camel_service_get_provider (
g_free (priv->user_data_dir);
g_free (priv->user_cache_dir);
g_free (priv->uid);
+ g_free (priv->password);
g_static_rec_mutex_free (&priv->connect_lock);
g_static_mutex_free (&priv->connect_op_lock);
g_object_class_install_property (
object_class,
+ PROP_PASSWORD,
+ g_param_spec_string (
+ "password",
+ "Password",
+ "The password for the service",
+ NULL,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_property (
+ object_class,
PROP_PROVIDER,
g_param_spec_pointer (
"provider",
}
/**
+ * camel_service_get_password:
+ * @service: a #CamelService
+ *
+ * Returns the password for @service. Some SASL mechanisms use this
+ * when attempting to authenticate.
+ *
+ * Returns: the password for @service
+ *
+ * Since: 3.4
+ **/
+const gchar *
+camel_service_get_password (CamelService *service)
+{
+ g_return_val_if_fail (CAMEL_IS_SERVICE (service), NULL);
+
+ return service->priv->password;
+}
+
+/**
+ * camel_service_set_password:
+ * @service: a #CamelService
+ * @password: the password for @service
+ *
+ * Sets the password for @service. Use this function to cache the password
+ * in memory after obtaining it through camel_session_get_password(). Some
+ * SASL mechanisms use this when attempting to authenticate.
+ *
+ * Since: 3.4
+ **/
+void
+camel_service_set_password (CamelService *service,
+ const gchar *password)
+{
+ g_return_if_fail (CAMEL_IS_SERVICE (service));
+
+ g_free (service->priv->password);
+ service->priv->password = g_strdup (password);
+
+ g_object_notify (G_OBJECT (service), "password");
+}
+
+/**
* camel_service_get_user_data_dir:
* @service: a #CamelService
*
const gchar * camel_service_get_display_name (CamelService *service);
void camel_service_set_display_name (CamelService *service,
const gchar *display_name);
+const gchar * camel_service_get_password (CamelService *service);
+void camel_service_set_password (CamelService *service,
+ const gchar *password);
const gchar * camel_service_get_user_data_dir (CamelService *service);
const gchar * camel_service_get_user_cache_dir
(CamelService *service);
CamelServiceAuthType
camel_service_get_display_name
camel_service_set_display_name
+camel_service_get_password
+camel_service_set_password
camel_service_get_user_data_dir
camel_service_get_name
camel_service_get_provider
CamelStoreSummaryFlags
camel_store_summary_new
camel_store_summary_set_filename
-camel_store_summary_set_uri_base
camel_store_summary_load
camel_store_summary_save
camel_store_summary_header_load