~ubuntu-branches/ubuntu/precise/telepathy-mission-control-5/precise

« back to all changes in this revision

Viewing changes to mission-control-plugins/dispatch-operation.h

Tags: upstream-5.5.2
ImportĀ upstreamĀ versionĀ 5.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Mission Control plugin API - representation of a ChannelDispatchOperation
 
2
 *
 
3
 * Copyright (C) 2009 Nokia Corporation
 
4
 * Copyright (C) 2009 Collabora Ltd.
 
5
 *
 
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.
 
10
 *
 
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.
 
15
 *
 
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
 
19
 */
 
20
 
 
21
#ifndef MCP_DISPATCH_OPERATION_H
 
22
#define MCP_DISPATCH_OPERATION_H
 
23
 
 
24
#ifndef _MCP_IN_MISSION_CONTROL_PLUGINS_H
 
25
#error Use <mission-control-plugins/mission-control-plugins.h> instead
 
26
#endif
 
27
 
 
28
#include <telepathy-glib/channel.h>
 
29
 
 
30
G_BEGIN_DECLS
 
31
 
 
32
typedef struct _McpDispatchOperation McpDispatchOperation;
 
33
typedef struct _McpDispatchOperationIface McpDispatchOperationIface;
 
34
 
 
35
/* Opaque token representing a DO being stalled until an asynchronous
 
36
 * policy action */
 
37
typedef struct _McpDispatchOperationDelay McpDispatchOperationDelay;
 
38
 
 
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))
 
49
 
 
50
GType mcp_dispatch_operation_get_type (void) G_GNUC_CONST;
 
51
 
 
52
/* utility functions which will work on any implementation of this interface */
 
53
 
 
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);
 
59
 
 
60
TpConnection *mcp_dispatch_operation_ref_connection (
 
61
    McpDispatchOperation *self);
 
62
TpChannel *mcp_dispatch_operation_ref_nth_channel (McpDispatchOperation *self,
 
63
    guint n);
 
64
 
 
65
/* virtual methods */
 
66
 
 
67
const gchar *mcp_dispatch_operation_get_account_path (
 
68
    McpDispatchOperation *self);
 
69
 
 
70
const gchar *mcp_dispatch_operation_get_connection_path (
 
71
    McpDispatchOperation *self);
 
72
 
 
73
const gchar *mcp_dispatch_operation_get_protocol (McpDispatchOperation *self);
 
74
 
 
75
const gchar *mcp_dispatch_operation_get_cm_name (McpDispatchOperation *self);
 
76
 
 
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);
 
82
 
 
83
McpDispatchOperationDelay *mcp_dispatch_operation_start_delay (
 
84
    McpDispatchOperation *self);
 
85
void mcp_dispatch_operation_end_delay (McpDispatchOperation *self,
 
86
    McpDispatchOperationDelay *delay);
 
87
 
 
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);
 
95
 
 
96
G_END_DECLS
 
97
 
 
98
#endif