summaryrefslogtreecommitdiff
path: root/swig/zypp.i
blob: d84417071aa986f7577163017d59ad77c7f2d3c4 (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
%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/Edition.h"
#include "zypp/ResTraits.h"
#include "zypp/ZYppFactory.h"
#include "zypp/ZYpp.h"
#include "zypp/Pathname.h"
#include "zypp/base/ReferenceCounted.h"
#include "zypp/ResObject.h"
#include "zypp/Target.h"
#include "zypp/target/TargetImpl.h"
#include "zypp/MediaSetAccess.h"
#include "zypp/TranslatedText.h"
#include "zypp/Package.h"
#include "zypp/Patch.h"
#include "zypp/SrcPackage.h"
#include "zypp/Pattern.h"
#include "zypp/Product.h"
#include "zypp/ResFilters.h"
#include "zypp/OnMediaLocation.h"
#include "zypp/Repository.h"
#include "zypp/RepoManager.h"
#include "zypp/Service.h"
#include "zypp/repo/RepoType.h"
#include "zypp/TmpPath.h"
#include "zypp/Resolver.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 "Url.i"
%include "ResStatus.i"
%include "NeedAType.i"
%include "Arch.i"
%include "Edition.i"
%include "Kind.i"
%include "ResTraits.i"
%include "Date.i"
%include "Capability.i"
%include "Capabilities.i"
%include "Dep.i"
%include "Resolvable.i"
%include "ByteCount.i"
%include "RepoType.i"
%include "Repository.i"
%include "RepoInfo.i"
%include "RepoManager.i"
%include "RepoStatus.i"
%include "ResObject.i"
%include "TranslatedText.i"
%include "CheckSum.i"
%include "CapMatch.i"
%include "Package.i"
%include "Patch.i"
%include "SrcPackage.i"
%include "Pattern.i"
%include "Product.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

%include <zypp/ZYpp.h>
%include "ZYppFactory.i"