~oif-team/geis/trunk

« back to all changes in this revision

Viewing changes to libutouch-geis/geis_backend.h

  • Committer: Stephen M. Webb
  • Date: 2010-12-06 12:10:40 UTC
  • mfrom: (87.1.25 geis2)
  • Revision ID: stephen.webb@canonical.com-20101206121040-y9dnfcl89kdot63t
Added a back end base and test fixture.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @file geis_backend.h
 
3
 * @brief internal GEIS back end base class public 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_BACKEND_H_
 
22
#define GEIS_BACKEND_H_
 
23
 
 
24
#include "geis/geis.h"
 
25
 
 
26
/**
 
27
 * Provides a virtual "base class" for various GEIS back ends.
 
28
 *
 
29
 * The GEIS is an API that implements the facade pattern over some number of
 
30
 * actual "back end" implementations.  Most internal operations of the API are
 
31
 * performed through this "virtual base class" interface rather than through the
 
32
 * concrete back ends (isn't object-oriented programming great?).
 
33
 */
 
34
typedef struct _GeisBackend *GeisBackend;
 
35
 
 
36
 
 
37
/**
 
38
 * Destroys the back end.
 
39
 *
 
40
 * @parameter[in] be  The back end.
 
41
 *
 
42
 * This function behaves like a virtual destructor and chains through to the
 
43
 * concrete destructor call.
 
44
 */
 
45
void geis_backend_delete(GeisBackend be);
 
46
 
 
47
/**
 
48
 * Gets the name of the back end.
 
49
 *
 
50
 * @parameter[in] be  The back end.
 
51
 *
 
52
 * This accessor is useful for diagnostics.
 
53
 */
 
54
GeisString geis_backend_name(GeisBackend be);
 
55
 
 
56
#endif /* GEIS_BACKEND_H_ */