summaryrefslogtreecommitdiff
path: root/src/kolabformat.i
blob: da41b081a8ad31886e4d389d178809ac3832c525 (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
/* kolabformat.i */
%module kolabformat
%{

    /* This macro ensures that return vectors remain a vector also in python and are not converted to tuples */
    #define SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS 

    #include "global_definitions.h"
    #include "kolabformat.h"
    #include "containers/kolabcontainers.h"
    #include "containers/kolabevent.h"
    #include "containers/kolabtodo.h"
    #include "containers/kolabjournal.h"
    #include "containers/kolabcontact.h"
    #include "containers/kolabnote.h"
    #include "containers/kolabconfiguration.h"
    #include "containers/kolabfile.h"
    #include "containers/kolabfreebusy.h"
%}

%include "std_string.i"
%include "std_vector.i"

/* Avoid warnings about not generated operators */
%ignore *::operator=;
%ignore *::operator==;

namespace std {
    %template(vectori) vector<int>;
    %template(vectors) vector<string>;
    %template(vectordaypos) vector<Kolab::DayPos>;
    %template(vectorcs) vector<Kolab::CustomProperty>;
    %template(vectoraddress) vector<Kolab::Address>;
    %template(vectoraffiliation) vector<Kolab::Affiliation>;
    %template(vectoralarm) vector<Kolab::Alarm>;
    %template(vectorattachment) vector<Kolab::Attachment>;
    %template(vectorattendee) vector<Kolab::Attendee>;
    %template(vectorcontactref) vector<Kolab::ContactReference>;
    %template(vectorgeo) vector<Kolab::Geo>;
    %template(vectorevent) vector<Kolab::Event>;
    %template(vectorrelated) vector<Kolab::Related>;
    %template(vectortelephone) vector<Kolab::Telephone>;
    %template(vectortodo) vector<Kolab::Todo>;
    %template(vectoremail) vector<Kolab::Email>;
    %template(vectordatetime) vector<Kolab::cDateTime>;
    %template(vectorurl) vector<Kolab::Url>;
    %template(vectorkey) vector<Kolab::Key>;
    %template(vectorcategorycolor) vector<Kolab::CategoryColor>;
    %template(vectorsnippet) vector<Kolab::Snippet>;
    %template(vectorfreebusyperiod) vector<Kolab::FreebusyPeriod>;
    %template(vectorperiod) vector<Kolab::Period>;
};

%rename(readKolabFile) Kolab::readFile;
%rename(writeKolabFile) Kolab::writeFile;

%include "global_definitions.h"
%include "kolabformat.h"
%include "containers/kolabcontainers.h"
%include "containers/kolabevent.h"
%include "containers/kolabtodo.h"
%include "containers/kolabjournal.h"
%include "containers/kolabcontact.h"
%include "containers/kolabnote.h"
%include "containers/kolabconfiguration.h"
%include "containers/kolabfile.h"
%include "containers/kolabfreebusy.h"