1
/* Mission Control plugin API - ChannelRequest policy hook.
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_REQUEST_POLICY_H
22
#define MCP_REQUEST_POLICY_H
24
#ifndef _MCP_IN_MISSION_CONTROL_PLUGINS_H
25
#error Use <mission-control-plugins/mission-control-plugins.h> instead
28
#include <mission-control-plugins/request.h>
32
/* API for plugins to implement */
34
typedef struct _McpRequestPolicy McpRequestPolicy;
35
typedef struct _McpRequestPolicyIface McpRequestPolicyIface;
37
#define MCP_TYPE_REQUEST_POLICY \
38
(mcp_request_policy_get_type ())
39
#define MCP_REQUEST_POLICY(o) \
40
(G_TYPE_CHECK_INSTANCE_CAST ((o), MCP_TYPE_REQUEST_POLICY, McpRequestPolicy))
41
#define MCP_IS_REQUEST_POLICY(o) \
42
(G_TYPE_CHECK_INSTANCE_TYPE ((o), MCP_TYPE_REQUEST_POLICY))
43
#define MCP_REQUEST_POLICY_GET_IFACE(o) \
44
(G_TYPE_INSTANCE_GET_INTERFACE ((o), MCP_TYPE_REQUEST_POLICY, \
45
McpRequestPolicyIface))
47
GType mcp_request_policy_get_type (void) G_GNUC_CONST;
50
void mcp_request_policy_check (McpRequestPolicy *policy, McpRequest *request);
52
/* vtable manipulation - the vtable is private to allow for expansion */
53
void mcp_request_policy_iface_implement_check (McpRequestPolicyIface *iface,
54
void (*impl) (McpRequestPolicy *, McpRequest *));