blob: 47481d620631e7b31d8154da114aa1f7735a9686 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/* -*- Mode: C++; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* Tartan
* Copyright © 2013 Collabora Ltd.
*
* Tartan is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tartan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tartan. If not, see <http://www.gnu.org/licenses/>.
*
* Authors:
* Philip Withnall <philip.withnall@collabora.co.uk>
*/
#ifndef TARTAN_GIR_MANAGER_H
#define TARTAN_GIR_MANAGER_H
#include <string>
#include <vector>
#include <girepository.h>
class GirManager {
private:
struct Nspace {
/* All non-NULL. */
std::string nspace;
std::string version;
std::string c_prefix_lower;
std::string c_prefix;
GITypelib* typelib; /* unowned */
};
GIRepository* _repo; /* unowned */
std::vector<Nspace> _typelibs;
public:
GirManager ();
void load_namespace (const std::string& gi_namespace,
const std::string& gi_version,
GError** error);
GIBaseInfo* find_function_info (const std::string& func_name) const;
GIBaseInfo* find_object_info (const std::string& type_name) const;
std::string get_c_name_for_type (GIBaseInfo *base_info) const;
};
#endif /* !TARTAN_GIR_MANAGER_H */
|