summaryrefslogtreecommitdiff
path: root/telepathy-glib/simple-approver.h
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-05-04 12:10:49 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-05-07 15:34:03 +0200
commit037a5723f9d927601f967b43708047ee230b1717 (patch)
tree115933b5603b7413dbddc56e36244d98cf52e36a /telepathy-glib/simple-approver.h
parentb4b633c1bccb75f68cb867a0bb7a8388d3b3feb8 (diff)
downloadtelepathy-glib-037a5723f9d927601f967b43708047ee230b1717.tar.gz
add simple-approver (fdo #27875)
Diffstat (limited to 'telepathy-glib/simple-approver.h')
-rw-r--r--telepathy-glib/simple-approver.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/telepathy-glib/simple-approver.h b/telepathy-glib/simple-approver.h
new file mode 100644
index 000000000..7fd180275
--- /dev/null
+++ b/telepathy-glib/simple-approver.h
@@ -0,0 +1,83 @@
+/*
+ * Simple implementation of an Approver
+ *
+ * Copyright © 2010 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __TP_SIMPLE_APPROVER_H__
+#define __TP_SIMPLE_APPROVER_H__
+
+#include <dbus/dbus-glib.h>
+#include <glib-object.h>
+
+#include <telepathy-glib/base-client.h>
+
+G_BEGIN_DECLS
+
+typedef struct _TpSimpleApprover TpSimpleApprover;
+typedef struct _TpSimpleApproverClass TpSimpleApproverClass;
+typedef struct _TpSimpleApproverPrivate TpSimpleApproverPrivate;
+
+struct _TpSimpleApproverClass {
+ /*<private>*/
+ TpBaseClientClass parent_class;
+ GCallback _padding[7];
+};
+
+struct _TpSimpleApprover {
+ /*<private>*/
+ TpBaseClient parent;
+ TpSimpleApproverPrivate *priv;
+};
+
+GType tp_simple_approver_get_type (void);
+
+#define TP_TYPE_SIMPLE_APPROVER \
+ (tp_simple_approver_get_type ())
+#define TP_SIMPLE_APPROVER(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TP_TYPE_SIMPLE_APPROVER, \
+ TpSimpleApprover))
+#define TP_SIMPLE_APPROVER_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), TP_TYPE_SIMPLE_APPROVER, \
+ TpSimpleApproverClass))
+#define TP_IS_SIMPLE_APPROVER(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TP_TYPE_SIMPLE_APPROVER))
+#define TP_IS_SIMPLE_APPROVER_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), TP_TYPE_SIMPLE_APPROVER))
+#define TP_SIMPLE_APPROVER_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_SIMPLE_APPROVER, \
+ TpSimpleApproverClass))
+
+typedef void (*TpSimpleApproverAddDispatchOperationImpl) (
+ TpSimpleApprover *self,
+ TpAccount *account,
+ TpConnection *connection,
+ GList *channels,
+ TpChannelDispatchOperation *dispatch_operation,
+ TpAddDispatchOperationContext *context,
+ gpointer user_data);
+
+TpBaseClient * tp_simple_approver_new (TpDBusDaemon *dbus,
+ const gchar *name,
+ gboolean unique,
+ TpSimpleApproverAddDispatchOperationImpl callback,
+ gpointer user_data,
+ GDestroyNotify destroy);
+
+G_END_DECLS
+
+#endif