summaryrefslogtreecommitdiff
path: root/swig/zypp.i
blob: 0a7b7fb6b3a20bcdb6dc1141d9f5aed21d82301c (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
%module zypp

#ifdef SWIGPERL5
%{
   #undef NORMAL
   #undef readdir
   #undef Fflush
   #undef Mkdir
   #undef strerror
%}
#endif

%{
/* Includes the header in the wrapper code */
#ifdef SWIGRUBY
#define REG_EXTENDED 1
#define REG_ICASE (REG_EXTENDED << 1)
#define REG_NEWLINE (REG_ICASE << 1)
#define REG_NOSUB (REG_NEWLINE << 1)
#endif

#include <sstream>
#include "zypp/base/PtrTypes.h"
#include "zypp/base/ReferenceCounted.h"
#include "zypp/Edition.h"
#include "zypp/Pathname.h"
#include "zypp/ResTraits.h"
#include "zypp/ZYppFactory.h"
#include "zypp/ZYpp.h"

#include "zypp/ResObjects.h"
#include "zypp/Target.h"
#include "zypp/target/TargetImpl.h"
#include "zypp/MediaSetAccess.h"
#include "zypp/ResFilters.h"
#include "zypp/OnMediaLocation.h"
#include "zypp/Repository.h"
#include "zypp/ServiceInfo.h"
#include "zypp/RepoManager.h"
#include "zypp/repo/RepoType.h"
#include "zypp/TmpPath.h"
#include "zypp/Resolver.h"

#include "zypp/Product.h"
#include "zypp/ProductInfo.h"

using namespace boost;
using namespace zypp;
using namespace zypp::repo;
using namespace zypp::resfilter;
using namespace zypp::filesystem;

typedef std::set<Url> UrlSet;
typedef std::list<std::string> StringList;
%}

%nodefault ByKind;
%define DEFINE_PTR_TYPE(name)
%enddef

%rename("+") "operator+";
%rename("<<") "operator<<";
%rename("!=") "operator!=";
%rename("!") "operator!";
%rename("==") "operator==";

template < typename T >
class intrusive_ptr {
  public:
    T *operator->();
};

namespace zypp {
  namespace base {
    // silence 'Nothing known about class..' warning
    class  ReferenceCounted {};
  }
}

%include "std_string.i"
%include "stl.i"


#ifdef SWIGRUBY
%include "ruby/std_list.i"
%include "ruby/std_set.i"
%include "ruby/ruby.i"
#endif

#ifdef SWIGPYTHON
%include "std_list.i"
%include "std_set.i"
%include "python/python.i"
#endif

#ifdef SWIGPERL5
%include "std_list.i"
%include "perl5/perl.i"
#endif

%include "IdStringType.i"
%include "Pathname.i"
%include "ByteCount.i"
%include "Url.i"
%include "NeedAType.i"
%include "Arch.i"
%include "Edition.i"
%include "Kind.i"
%include "CheckSum.i"
%include "Date.i"
%include "Dep.i"
%include "Capability.i"
%include "Capabilities.i"
%include "CapMatch.i"
%include "ResTraits.i"
%include "ResStatus.i"
%include "Resolvable.i"
%include "ResObject.i"
%include "Package.i"
%include "Patch.i"
%include "Pattern.i"
%include "Product.i"

%include "SrcPackage.i"
%include "RepoType.i"


%include "Repository.i"
%include "RepoStatus.i"
%include "RepoManager.i"
%include "PublicKey.i"
%include "KeyRing.i"
%include "Target.i"
%include "MediaSetAccess.i"
%include "PoolItem.i"
%include "ResPool.i"
%include "ZYppCommitPolicy.i"
%include "ZYppCommitResult.i"
%include "TmpPath.i"
%include "Resolver.i"
#ifdef SWIGPYTHON
%include "python/callbacks.i"
#endif

%ignore zypp::ZYpp::setTextLocale;
%ignore zypp::ZYpp::getTextLocale;
%ignore zypp::ZYpp::setRequestedLocales;
%ignore zypp::ZYpp::getRequestedLocales;
%ignore zypp::ZYpp::getAvailableLocales;
%ignore zypp::ZYpp::architecture;
%ignore zypp::ZYpp::setArchitecture;
%ignore zypp::ZYpp::applyLocks;

%include <zypp/ZYpp.h>

%include "ZYppFactory.i"