#include "camel-sasl.h"
#include "camel-service.h"
+#define CAMEL_SASL_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), CAMEL_TYPE_SASL, CamelSaslPrivate))
+
#define w(x)
typedef struct _AsyncContext AsyncContext;
{
CamelSaslPrivate *priv;
- priv = CAMEL_SASL (object)->priv;
+ priv = CAMEL_SASL_GET_PRIVATE (object);
if (priv->service != NULL) {
g_object_unref (priv->service);
{
CamelSaslPrivate *priv;
- priv = CAMEL_SASL (object)->priv;
+ priv = CAMEL_SASL_GET_PRIVATE (object);
g_free (priv->mechanism);
g_free (priv->service_name);
static void
sasl_try_empty_password_thread (GSimpleAsyncResult *simple,
- GObject *object,
- GCancellable *cancellable)
+ GObject *object,
+ GCancellable *cancellable)
{
gboolean res;
GError *error = NULL;
- res = camel_sasl_try_empty_password_sync (CAMEL_SASL (object), cancellable, &error);
+ res = camel_sasl_try_empty_password_sync (
+ CAMEL_SASL (object), cancellable, &error);
g_simple_async_result_set_op_res_gboolean (simple, res);
if (error != NULL) {
static void
sasl_try_empty_password (CamelSasl *sasl,
- gint io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
+ gint io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GSimpleAsyncResult *simple;
G_OBJECT (sasl), callback, user_data, sasl_try_empty_password);
g_simple_async_result_run_in_thread (
- simple, sasl_try_empty_password_thread, io_priority, cancellable);
+ simple, sasl_try_empty_password_thread,
+ io_priority, cancellable);
g_object_unref (simple);
}
static gboolean
sasl_try_empty_password_finish (CamelSasl *sasl,
- GAsyncResult *result,
- GError **error)
+ GAsyncResult *result,
+ GError **error)
{
GSimpleAsyncResult *simple;
static void
camel_sasl_init (CamelSasl *sasl)
{
- sasl->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- sasl, CAMEL_TYPE_SASL, CamelSaslPrivate);
+ sasl->priv = CAMEL_SASL_GET_PRIVATE (sasl);
}
/**
* Since: 3.2
**/
gboolean
-camel_sasl_try_empty_password_sync (CamelSasl *sasl, GCancellable *cancellable,
- GError **error)
+camel_sasl_try_empty_password_sync (CamelSasl *sasl,
+ GCancellable *cancellable,
+ GError **error)
{
CamelSaslClass *class;
**/
void
camel_sasl_try_empty_password (CamelSasl *sasl,
- gint io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
+ gint io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
CamelSaslClass *class;
**/
gboolean
camel_sasl_try_empty_password_finish (CamelSasl *sasl,
- GAsyncResult *result,
- GError **error)
+ GAsyncResult *result,
+ GError **error)
{
CamelSaslClass *class;