~ubuntu-branches/ubuntu/trusty/geis/trusty

« back to all changes in this revision

Viewing changes to libgeis/geis_device.h

  • Committer: Package Import Robot
  • Author(s): Chase Douglas
  • Date: 2012-07-30 08:51:42 UTC
  • Revision ID: package-import@ubuntu.com-20120730085142-jrc33ygjvt0ob1wl
Tags: upstream-2.2.11
ImportĀ upstreamĀ versionĀ 2.2.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @file geis_device.h
 
3
 * @brief internal Geis Input Device module private interface
 
4
 *
 
5
 * Copyright 2010 Canonical Ltd.
 
6
 *
 
7
 * This library is free software; you can redistribute it and/or modify it under
 
8
 * the terms of the GNU Lesser General Public License as published by the Free
 
9
 * Software Foundation; either version 3 of the License, or (at your option) any
 
10
 * later version.
 
11
 *
 
12
 * This library is distributed in the hope that it will be useful, but WITHOUT
 
13
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
14
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 
15
 * details.
 
16
 *
 
17
 * You should have received a copy of the GNU Lesser General Public License
 
18
 * along with this program; if not, write to the Free Software Foundation, Inc.,
 
19
 * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
20
 */
 
21
#ifndef GEIS_DEVICE_H_
 
22
#define GEIS_DEVICE_H_
 
23
 
 
24
#include "geis/geis.h"
 
25
 
 
26
/**
 
27
 * @defgroup geis_device_container A Device Container
 
28
 * @{
 
29
 */
 
30
 
 
31
/**
 
32
 * An unsorted container for holding devices.
 
33
 */
 
34
typedef struct _GeisDeviceBag *GeisDeviceBag;
 
35
 
 
36
/**
 
37
 * Creates a new device bag,
 
38
 */
 
39
GeisDeviceBag geis_device_bag_new();
 
40
 
 
41
/**
 
42
 * Destroys a device bag.
 
43
 *
 
44
 * @param[in] bag The device bag,
 
45
 */
 
46
void geis_device_bag_delete(GeisDeviceBag bag);
 
47
 
 
48
/**
 
49
 * Gets the number of devices in the bag.
 
50
 *
 
51
 * @param[in] bag The device bag,
 
52
 */
 
53
GeisSize geis_device_bag_count(GeisDeviceBag bag);
 
54
 
 
55
/**
 
56
 * Gets an indicated device from a bag.
 
57
 *
 
58
 * @param[in] bag   The device bag.
 
59
 * @param[in] index The index.
 
60
 */
 
61
GeisDevice geis_device_bag_device(GeisDeviceBag bag, GeisSize index);
 
62
 
 
63
/**
 
64
 * Inserts a device in the bag.
 
65
 *
 
66
 * @param[in] bag    The device bag.
 
67
 * @param[in] device The device to insert.
 
68
 */
 
69
GeisStatus geis_device_bag_insert(GeisDeviceBag bag, GeisDevice device);
 
70
 
 
71
/**
 
72
 * Remoes a device from the bag.
 
73
 *
 
74
 * @param[in] bag    The device bag.
 
75
 * @param[in] device The device to remove.
 
76
 */
 
77
GeisStatus geis_device_bag_remove(GeisDeviceBag bag, GeisDevice device);
 
78
 
 
79
/** @} */
 
80
 
 
81
/**
 
82
 * @defgroup geis_device Internal Device Functions
 
83
 * @{
 
84
 */
 
85
 
 
86
/**
 
87
 * Creates a new device.
 
88
 *
 
89
 * @param[in] name A system-specific device name.
 
90
 * @param[in] id   A system-specific device identifier.
 
91
 */
 
92
GeisDevice geis_device_new(GeisString name, GeisInteger id);
 
93
 
 
94
/**
 
95
 * Inserts an attr into a device.
 
96
 *
 
97
 * @param[in] device  A device.
 
98
 * @param[in] attr    An attr.
 
99
 */
 
100
void geis_device_add_attr(GeisDevice device, GeisAttr attr);
 
101
 
 
102
/* @} */
 
103
 
 
104
#endif /* GEIS_DEVICE_H_ */