1
/* Mission Control plugin API - representation of a ChannelDispatchOperation
3
* Copyright (C) 2009 Nokia Corporation
4
* Copyright (C) 2009 Collabora Ltd.
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
#ifndef MCP_DISPATCH_OPERATION_H
22
#define MCP_DISPATCH_OPERATION_H
24
#ifndef _MCP_IN_MISSION_CONTROL_PLUGINS_H
25
#error Use <mission-control-plugins/mission-control-plugins.h> instead
28
#include <telepathy-glib/channel.h>
32
typedef struct _McpDispatchOperation McpDispatchOperation;
33
typedef struct _McpDispatchOperationIface McpDispatchOperationIface;
35
/* Opaque token representing a DO being stalled until an asynchronous
37
typedef struct _McpDispatchOperationDelay McpDispatchOperationDelay;
39
#define MCP_TYPE_DISPATCH_OPERATION \
40
(mcp_dispatch_operation_get_type ())
41
#define MCP_DISPATCH_OPERATION(o) \
42
(G_TYPE_CHECK_INSTANCE_CAST ((o), MCP_TYPE_DISPATCH_OPERATION, \
43
McpDispatchOperation))
44
#define MCP_IS_DISPATCH_OPERATION(o) \
45
(G_TYPE_CHECK_INSTANCE_TYPE ((o), MCP_TYPE_DISPATCH_OPERATION))
46
#define MCP_DISPATCH_OPERATION_GET_IFACE(o) \
47
(G_TYPE_INSTANCE_GET_INTERFACE ((o), MCP_TYPE_DISPATCH_OPERATION, \
48
McpDispatchOperationIface))
50
GType mcp_dispatch_operation_get_type (void) G_GNUC_CONST;
52
/* utility functions which will work on any implementation of this interface */
54
gboolean mcp_dispatch_operation_find_channel_by_type (
55
McpDispatchOperation *self,
56
guint start_from, TpHandleType handle_type, GQuark channel_type,
57
guint *ret_index, gchar **ret_dup_path,
58
GHashTable **ret_ref_immutable_properties, TpChannel **ret_ref_channel);
60
TpConnection *mcp_dispatch_operation_ref_connection (
61
McpDispatchOperation *self);
62
TpChannel *mcp_dispatch_operation_ref_nth_channel (McpDispatchOperation *self,
67
const gchar *mcp_dispatch_operation_get_account_path (
68
McpDispatchOperation *self);
70
const gchar *mcp_dispatch_operation_get_connection_path (
71
McpDispatchOperation *self);
73
const gchar *mcp_dispatch_operation_get_protocol (McpDispatchOperation *self);
75
const gchar *mcp_dispatch_operation_get_cm_name (McpDispatchOperation *self);
77
guint mcp_dispatch_operation_get_n_channels (McpDispatchOperation *self);
78
const gchar *mcp_dispatch_operation_get_nth_channel_path (
79
McpDispatchOperation *self, guint n);
80
GHashTable *mcp_dispatch_operation_ref_nth_channel_properties (
81
McpDispatchOperation *self, guint n);
83
McpDispatchOperationDelay *mcp_dispatch_operation_start_delay (
84
McpDispatchOperation *self);
85
void mcp_dispatch_operation_end_delay (McpDispatchOperation *self,
86
McpDispatchOperationDelay *delay);
88
void mcp_dispatch_operation_leave_channels (McpDispatchOperation *self,
89
gboolean wait_for_observers, TpChannelGroupChangeReason reason,
90
const gchar *message);
91
void mcp_dispatch_operation_close_channels (McpDispatchOperation *self,
92
gboolean wait_for_observers);
93
void mcp_dispatch_operation_destroy_channels (McpDispatchOperation *self,
94
gboolean wait_for_observers);