annotate python/python-libpst.cpp @ 318:b08fd8813ffe

filter_provides is a regex, not a path, and is not available on el5
author Carl Byington <carl@five-ten-sg.com>
date Mon, 24 Dec 2012 18:49:59 -0800
parents 1ddc61fd6189
children 26c48ea9d896
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
1 #ifdef HAVE_CONFIG_H
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
2 #include "config.h"
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
3 #endif
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
4
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
5 #include <iostream>
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
6 #include <boost/python.hpp>
196
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
7 // #include <boost/python/docstring_options.hpp>
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
8 // #include <iostream>
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
9
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
10 extern "C" {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
11 #include "libpst.h"
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
12 #include "timeconv.h"
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
13 #include "libstrfunc.h"
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
14 #include "vbuf.h"
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
15 #include "lzfu.h"
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
16 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
17
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
18 using namespace std;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
19 using namespace boost::python;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
20
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
21
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
22 /** python version of pst_binary, where python is
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
23 responsible for freeing the underlying buffer */
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
24 struct ppst_binary : public pst_binary
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
25 {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
26 };
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
27
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
28 class pst {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
29 public:
298
201464dd356e add default character set for items where the pst file does not specify a character set
Carl Byington <carl@five-ten-sg.com>
parents: 297
diff changeset
30 pst(const string filename, const string charset);
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
31 virtual ~pst();
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
32 pst_desc_tree* pst_getTopOfFolders();
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
33 ppst_binary pst_attach_to_mem(pst_item_attach *attach);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
34 size_t pst_attach_to_file(pst_item_attach *attach, FILE* fp);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
35 size_t pst_attach_to_file_base64(pst_item_attach *attach, FILE* fp);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
36 pst_desc_tree* pst_getNextDptr(pst_desc_tree* d);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
37 pst_item* pst_parse_item(pst_desc_tree *d_ptr, pst_id2_tree *m_head);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
38 void pst_freeItem(pst_item *item);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
39 pst_index_ll* pst_getID(uint64_t i_id);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
40 size_t pst_ff_getIDblock_dec(uint64_t i_id, char **buf);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
41 string pst_rfc2426_escape(char *str);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
42 string pst_rfc2425_datetime_format(const FILETIME *ft);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
43 string pst_rfc2445_datetime_format(const FILETIME *ft);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
44 string pst_default_charset(pst_item *item);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
45 void pst_convert_utf8_null(pst_item *item, pst_string *str);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
46 void pst_convert_utf8(pst_item *item, pst_string *str);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
47 pst_recurrence* pst_convert_recurrence(pst_item_appointment *appt);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
48 void pst_free_recurrence(pst_recurrence* r);
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
49
196
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
50 /** helper for python access to fopen() */
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
51 FILE* ppst_open_file(string filename, string mode);
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
52 /** helper for python access to fclose() */
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
53 int ppst_close_file(FILE* fp);
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
54
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
55 private:
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
56 bool is_open;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
57 pst_file pf;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
58 pst_item* root;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
59 pst_desc_tree* topf;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
60
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
61 };
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
62
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
63
298
201464dd356e add default character set for items where the pst file does not specify a character set
Carl Byington <carl@five-ten-sg.com>
parents: 297
diff changeset
64 pst::pst(const string filename, const string charset) {
201464dd356e add default character set for items where the pst file does not specify a character set
Carl Byington <carl@five-ten-sg.com>
parents: 297
diff changeset
65 is_open = (::pst_open(&pf, filename.c_str(), charset.c_str()) == 0);
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
66 root = NULL;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
67 topf = NULL;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
68 if (is_open) {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
69 ::pst_load_index(&pf);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
70 ::pst_load_extended_attributes(&pf);
204
268458c79e9b more cleanup of the shared library interface, but still not fully thread safe
Carl Byington <carl@five-ten-sg.com>
parents: 201
diff changeset
71 if (pf.d_head) root = ::pst_parse_item(&pf, pf.d_head, NULL);
268458c79e9b more cleanup of the shared library interface, but still not fully thread safe
Carl Byington <carl@five-ten-sg.com>
parents: 201
diff changeset
72 if (root) topf = ::pst_getTopOfFolders(&pf, root)->child;
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
73 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
74 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
75
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
76 pst::~pst() {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
77 if (root) pst_freeItem(root);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
78 if (is_open) ::pst_close(&pf);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
79 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
80
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
81 pst_desc_tree* pst::pst_getTopOfFolders() {
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
82 return topf;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
83 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
84
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
85 ppst_binary pst::pst_attach_to_mem(pst_item_attach *attach) {
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
86 pst_binary r = ::pst_attach_to_mem(&pf, attach);
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
87 ppst_binary rc;
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
88 rc.size = r.size;
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
89 rc.data = r.data;
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
90 return rc;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
91 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
92
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
93 size_t pst::pst_attach_to_file(pst_item_attach *attach, FILE* fp) {
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
94 return ::pst_attach_to_file(&pf, attach, fp);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
95 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
96
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
97 size_t pst::pst_attach_to_file_base64(pst_item_attach *attach, FILE* fp) {
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
98 return ::pst_attach_to_file_base64(&pf, attach, fp);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
99 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
100
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
101 pst_desc_tree* pst::pst_getNextDptr(pst_desc_tree* d) {
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
102 return ::pst_getNextDptr(d);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
103 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
104
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
105 pst_item* pst::pst_parse_item (pst_desc_tree *d_ptr, pst_id2_tree *m_head) {
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
106 return ::pst_parse_item(&pf, d_ptr, m_head);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
107 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
108
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
109 void pst::pst_freeItem(pst_item *item) {
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
110 return ::pst_freeItem(item);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
111 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
112
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
113 pst_index_ll* pst::pst_getID(uint64_t i_id) {
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
114 return ::pst_getID(&pf, i_id);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
115 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
116
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
117 size_t pst::pst_ff_getIDblock_dec(uint64_t i_id, char **buf) {
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
118 return ::pst_ff_getIDblock_dec(&pf, i_id, buf);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
119 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
120
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
121 string pst::pst_rfc2426_escape(char *str) {
211
94bde95d7e18 the shared library interface should now be thread safe
Carl Byington <carl@five-ten-sg.com>
parents: 204
diff changeset
122 char *result = NULL;
94bde95d7e18 the shared library interface should now be thread safe
Carl Byington <carl@five-ten-sg.com>
parents: 204
diff changeset
123 size_t resultlen = 0;
94bde95d7e18 the shared library interface should now be thread safe
Carl Byington <carl@five-ten-sg.com>
parents: 204
diff changeset
124 char *rc = ::pst_rfc2426_escape(str, &result, &resultlen);
94bde95d7e18 the shared library interface should now be thread safe
Carl Byington <carl@five-ten-sg.com>
parents: 204
diff changeset
125 string rrc(rc);
94bde95d7e18 the shared library interface should now be thread safe
Carl Byington <carl@five-ten-sg.com>
parents: 204
diff changeset
126 if (result) free(result);
94bde95d7e18 the shared library interface should now be thread safe
Carl Byington <carl@five-ten-sg.com>
parents: 204
diff changeset
127 return rrc;
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
128 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
129
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
130 string pst::pst_rfc2425_datetime_format(const FILETIME *ft) {
199
e3a46f66332b more changes in recurrence decoding
Carl Byington <carl@five-ten-sg.com>
parents: 198
diff changeset
131 char buf[30];
e3a46f66332b more changes in recurrence decoding
Carl Byington <carl@five-ten-sg.com>
parents: 198
diff changeset
132 ::pst_rfc2425_datetime_format(ft, sizeof(buf), buf);
e3a46f66332b more changes in recurrence decoding
Carl Byington <carl@five-ten-sg.com>
parents: 198
diff changeset
133 return string(buf);
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
134 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
135
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
136 string pst::pst_rfc2445_datetime_format(const FILETIME *ft) {
199
e3a46f66332b more changes in recurrence decoding
Carl Byington <carl@five-ten-sg.com>
parents: 198
diff changeset
137 char buf[30];
e3a46f66332b more changes in recurrence decoding
Carl Byington <carl@five-ten-sg.com>
parents: 198
diff changeset
138 ::pst_rfc2445_datetime_format(ft, sizeof(buf), buf);
e3a46f66332b more changes in recurrence decoding
Carl Byington <carl@five-ten-sg.com>
parents: 198
diff changeset
139 return string(buf);
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
140 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
141
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
142 string pst::pst_default_charset(pst_item *item) {
211
94bde95d7e18 the shared library interface should now be thread safe
Carl Byington <carl@five-ten-sg.com>
parents: 204
diff changeset
143 char buf[30];
94bde95d7e18 the shared library interface should now be thread safe
Carl Byington <carl@five-ten-sg.com>
parents: 204
diff changeset
144 return string(::pst_default_charset(item, sizeof(buf), buf));
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
145 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
146
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
147 void pst::pst_convert_utf8_null(pst_item *item, pst_string *str) {
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
148 ::pst_convert_utf8_null(item, str);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
149 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
150
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
151 void pst::pst_convert_utf8(pst_item *item, pst_string *str) {
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
152 ::pst_convert_utf8(item, str);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
153 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
154
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
155 pst_recurrence* pst::pst_convert_recurrence(pst_item_appointment *appt)
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
156 {
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
157 return ::pst_convert_recurrence(appt);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
158 }
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
159
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
160 void pst::pst_free_recurrence(pst_recurrence* r)
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
161 {
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
162 ::pst_free_recurrence(r);
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
163 }
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
164
196
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
165 FILE* pst::ppst_open_file(string filename, string mode) {
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
166 return ::fopen(filename.c_str(), mode.c_str());
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
167 }
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
168
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
169 int pst::ppst_close_file(FILE* fp) {
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
170 return ::fclose(fp);
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
171 }
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
172
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
173 struct make_python_string {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
174 /* we make no distinction between empty and null strings */
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
175 static PyObject* convert(char* const &s) {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
176 string ss;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
177 if (s) ss = string(s);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
178 return boost::python::incref(boost::python::object(ss).ptr());
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
179 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
180 };
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
181
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
182 struct make_python_pst_binary {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
183 static PyObject* convert(pst_binary const &s) {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
184 if (s.data) {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
185 string ss;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
186 ss = string(s.data, s.size);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
187 return boost::python::incref(boost::python::object(ss).ptr());
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
188 }
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
189 return boost::python::incref(boost::python::object().ptr());
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
190 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
191 };
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
192
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
193 struct make_python_ppst_binary {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
194 static PyObject* convert(ppst_binary const &s) {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
195 if (s.data) {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
196 string ss;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
197 ss = string(s.data, s.size);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
198 free(s.data);
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
199 return boost::python::incref(boost::python::object(ss).ptr());
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
200 }
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
201 return boost::python::incref(boost::python::object().ptr());
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
202 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
203 };
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
204
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
205 struct make_python_pst_item_email {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
206 static PyObject* convert(pst_item_email* const &s) {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
207 if (s) return to_python_indirect<pst_item_email*, detail::make_reference_holder>()(s);
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
208 return boost::python::incref(boost::python::object().ptr());
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
209 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
210 };
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
211
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
212 struct make_python_pst_item_attach {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
213 static PyObject* convert(pst_item_attach* const &s) {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
214 if (s) return to_python_indirect<pst_item_attach*, detail::make_reference_holder>()(s);
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
215 return boost::python::incref(boost::python::object().ptr());
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
216 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
217 };
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
218
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
219 struct make_python_pst_desc_tree {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
220 static PyObject* convert(pst_desc_tree* const &s) {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
221 if (s) return to_python_indirect<pst_desc_tree*, detail::make_reference_holder>()(s);
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
222 return boost::python::incref(boost::python::object().ptr());
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
223 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
224 };
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
225
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
226 struct make_python_pst_index_ll {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
227 static PyObject* convert(pst_index_ll* const &s) {
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
228 if (s) return to_python_indirect<pst_index_ll*, detail::make_reference_holder>()(s);
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
229 return boost::python::incref(boost::python::object().ptr());
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
230 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
231 };
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
232
196
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
233 struct make_python_FILE {
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
234 static PyObject* convert(FILE* const &s) {
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
235 if (s) return to_python_indirect<FILE*, detail::make_reference_holder>()(s);
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
236 return boost::python::incref(boost::python::object().ptr());
196
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
237 }
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
238 };
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
239
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
240 BOOST_PYTHON_MODULE(_libpst)
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
241 {
196
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
242 //boost::python::docstring_options doc_options();
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
243
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
244 to_python_converter<pst_binary, make_python_pst_binary>();
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
245 to_python_converter<ppst_binary, make_python_ppst_binary>();
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
246 to_python_converter<char*, make_python_string>();
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
247 to_python_converter<pst_item_email*, make_python_pst_item_email>();
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
248 to_python_converter<pst_item_attach*, make_python_pst_item_attach>();
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
249 to_python_converter<pst_desc_tree*, make_python_pst_desc_tree>();
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
250 to_python_converter<pst_index_ll*, make_python_pst_index_ll>();
196
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
251 to_python_converter<FILE*, make_python_FILE>();
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
252
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
253 class_<FILE>("FILE")
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
254 ;
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
255
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
256 class_<FILETIME>("FILETIME")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
257 .def_readwrite("dwLowDateTime", &FILETIME::dwLowDateTime)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
258 .def_readwrite("dwHighDateTime", &FILETIME::dwHighDateTime)
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
259 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
260
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
261 class_<pst_entryid>("pst_entryid")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
262 .def_readonly("u1", &pst_entryid::u1)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
263 .def_readonly("entryid", &pst_entryid::entryid)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
264 .def_readonly("id", &pst_entryid::id)
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
265 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
266
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
267 class_<pst_index_ll>("pst_index_ll")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
268 .def_readonly("i_id", &pst_index_ll::i_id)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
269 .def_readonly("offset", &pst_index_ll::offset)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
270 .def_readonly("size", &pst_index_ll::size)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
271 .def_readonly("u1", &pst_index_ll::u1)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
272 .add_property("next", make_getter(&pst_index_ll::next, return_value_policy<reference_existing_object>()))
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
273 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
274
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
275 class_<pst_id2_tree>("pst_id2_tree")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
276 .def_readonly("id2", &pst_id2_tree::id2)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
277 .add_property("id", make_getter(&pst_id2_tree::id, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
278 .add_property("child", make_getter(&pst_id2_tree::child, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
279 .add_property("next", make_getter(&pst_id2_tree::next, return_value_policy<reference_existing_object>()))
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
280 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
281
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
282 class_<pst_desc_tree>("pst_desc_tree")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
283 .def_readonly("d_id", &pst_desc_tree::d_id)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
284 .def_readonly("parent_d_id", &pst_desc_tree::parent_d_id)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
285 .add_property("desc", make_getter(&pst_desc_tree::desc, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
286 .add_property("assoc_tree", make_getter(&pst_desc_tree::assoc_tree, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
287 .def_readonly("no_child", &pst_desc_tree::no_child)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
288 .add_property("prev", make_getter(&pst_desc_tree::prev, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
289 .add_property("next", make_getter(&pst_desc_tree::next, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
290 .add_property("parent", make_getter(&pst_desc_tree::parent, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
291 .add_property("child", make_getter(&pst_desc_tree::child, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
292 .add_property("child_tail", make_getter(&pst_desc_tree::child_tail, return_value_policy<reference_existing_object>()))
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
293 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
294
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
295 class_<pst_string>("pst_string")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
296 .def_readonly("is_utf8", &pst_string::is_utf8)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
297 .def_readonly("str", &pst_string::str)
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
298 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
299
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
300 class_<pst_item_email>("pst_item_email")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
301 .add_property("arrival_date", make_getter(&pst_item_email::arrival_date, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
302 .def_readonly("autoforward", &pst_item_email::autoforward)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
303 .def_readonly("cc_address", &pst_item_email::cc_address)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
304 .def_readonly("bcc_address", &pst_item_email::bcc_address)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
305 .add_property("conversation_index", make_getter(&pst_item_email::conversation_index, return_value_policy<return_by_value>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
306 .def_readonly("conversion_prohibited", &pst_item_email::conversion_prohibited)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
307 .def_readonly("delete_after_submit", &pst_item_email::delete_after_submit)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
308 .def_readonly("delivery_report", &pst_item_email::delivery_report)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
309 .add_property("encrypted_body", make_getter(&pst_item_email::encrypted_body, return_value_policy<return_by_value>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
310 .add_property("encrypted_htmlbody", make_getter(&pst_item_email::encrypted_htmlbody, return_value_policy<return_by_value>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
311 .def_readonly("header", &pst_item_email::header)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
312 .def_readonly("htmlbody", &pst_item_email::htmlbody)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
313 .def_readonly("importance", &pst_item_email::importance)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
314 .def_readonly("in_reply_to", &pst_item_email::in_reply_to)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
315 .def_readonly("message_cc_me", &pst_item_email::message_cc_me)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
316 .def_readonly("message_recip_me", &pst_item_email::message_recip_me)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
317 .def_readonly("message_to_me", &pst_item_email::message_to_me)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
318 .def_readonly("messageid", &pst_item_email::messageid)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
319 .def_readonly("original_sensitivity", &pst_item_email::original_sensitivity)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
320 .def_readonly("original_bcc", &pst_item_email::original_bcc)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
321 .def_readonly("original_cc", &pst_item_email::original_cc)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
322 .def_readonly("original_to", &pst_item_email::original_to)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
323 .def_readonly("outlook_recipient", &pst_item_email::outlook_recipient)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
324 .def_readonly("outlook_recipient_name", &pst_item_email::outlook_recipient_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
325 .def_readonly("outlook_recipient2", &pst_item_email::outlook_recipient2)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
326 .def_readonly("outlook_sender", &pst_item_email::outlook_sender)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
327 .def_readonly("outlook_sender_name", &pst_item_email::outlook_sender_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
328 .def_readonly("outlook_sender2", &pst_item_email::outlook_sender2)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
329 .def_readonly("priority", &pst_item_email::priority)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
330 .def_readonly("processed_subject", &pst_item_email::processed_subject)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
331 .def_readonly("read_receipt", &pst_item_email::read_receipt)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
332 .def_readonly("recip_access", &pst_item_email::recip_access)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
333 .def_readonly("recip_address", &pst_item_email::recip_address)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
334 .def_readonly("recip2_access", &pst_item_email::recip2_access)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
335 .def_readonly("recip2_address", &pst_item_email::recip2_address)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
336 .def_readonly("reply_requested", &pst_item_email::reply_requested)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
337 .def_readonly("reply_to", &pst_item_email::reply_to)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
338 .def_readonly("return_path_address", &pst_item_email::return_path_address)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
339 .def_readonly("rtf_body_char_count", &pst_item_email::rtf_body_char_count)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
340 .def_readonly("rtf_body_crc", &pst_item_email::rtf_body_crc)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
341 .def_readonly("rtf_body_tag", &pst_item_email::rtf_body_tag)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
342 .add_property("rtf_compressed", make_getter(&pst_item_email::rtf_compressed, return_value_policy<return_by_value>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
343 .def_readonly("rtf_in_sync", &pst_item_email::rtf_in_sync)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
344 .def_readonly("rtf_ws_prefix_count", &pst_item_email::rtf_ws_prefix_count)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
345 .def_readonly("rtf_ws_trailing_count", &pst_item_email::rtf_ws_trailing_count)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
346 .def_readonly("sender_access", &pst_item_email::sender_access)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
347 .def_readonly("sender_address", &pst_item_email::sender_address)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
348 .def_readonly("sender2_access", &pst_item_email::sender2_access)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
349 .def_readonly("sender2_address", &pst_item_email::sender2_address)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
350 .def_readonly("sensitivity", &pst_item_email::sensitivity)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
351 .add_property("sent_date", make_getter(&pst_item_email::sent_date, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
352 .add_property("sentmail_folder", make_getter(&pst_item_email::sentmail_folder, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
353 .def_readonly("sentto_address", &pst_item_email::sentto_address)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
354 .def_readonly("report_text", &pst_item_email::report_text)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
355 .add_property("report_time", make_getter(&pst_item_email::report_time, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
356 .def_readonly("ndr_reason_code", &pst_item_email::ndr_reason_code)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
357 .def_readonly("ndr_diag_code", &pst_item_email::ndr_diag_code)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
358 .def_readonly("supplementary_info", &pst_item_email::supplementary_info)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
359 .def_readonly("ndr_status_code", &pst_item_email::ndr_status_code)
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
360 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
361
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
362 class_<pst_item_folder>("pst_item_folder")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
363 .def_readonly("item_count", &pst_item_folder::item_count)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
364 .def_readonly("unseen_item_count", &pst_item_folder::unseen_item_count)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
365 .def_readonly("assoc_count", &pst_item_folder::assoc_count)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
366 .def_readonly("subfolder", &pst_item_folder::subfolder)
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
367 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
368
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
369 class_<pst_item_message_store>("pst_item_message_store")
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
370 .add_property("top_of_personal_folder", make_getter(&pst_item_message_store::top_of_personal_folder, return_value_policy<reference_existing_object>()))
196
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
371 .add_property("default_outbox_folder", make_getter(&pst_item_message_store::default_outbox_folder, return_value_policy<reference_existing_object>()))
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
372 .add_property("deleted_items_folder", make_getter(&pst_item_message_store::deleted_items_folder, return_value_policy<reference_existing_object>()))
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
373 .add_property("sent_items_folder", make_getter(&pst_item_message_store::sent_items_folder, return_value_policy<reference_existing_object>()))
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
374 .add_property("user_views_folder", make_getter(&pst_item_message_store::user_views_folder, return_value_policy<reference_existing_object>()))
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
375 .add_property("common_view_folder", make_getter(&pst_item_message_store::common_view_folder, return_value_policy<reference_existing_object>()))
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
376 .add_property("search_root_folder", make_getter(&pst_item_message_store::search_root_folder, return_value_policy<reference_existing_object>()))
ffd1503a7530 build proper python rpm subpackage
Carl Byington <carl@five-ten-sg.com>
parents: 195
diff changeset
377 .add_property("top_of_folder", make_getter(&pst_item_message_store::top_of_folder, return_value_policy<reference_existing_object>()))
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
378 .def_readonly("valid_mask", &pst_item_message_store::valid_mask)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
379 .def_readonly("pwd_chksum", &pst_item_message_store::pwd_chksum)
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
380 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
381
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
382 class_<pst_item_contact>("pst_item_contact")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
383 .def_readonly("account_name", &pst_item_contact::account_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
384 .def_readonly("address1", &pst_item_contact::address1)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
385 .def_readonly("address1a", &pst_item_contact::address1a)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
386 .def_readonly("address1_desc", &pst_item_contact::address1_desc)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
387 .def_readonly("address1_transport", &pst_item_contact::address1_transport)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
388 .def_readonly("address2", &pst_item_contact::address2)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
389 .def_readonly("address2a", &pst_item_contact::address2a)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
390 .def_readonly("address2_desc", &pst_item_contact::address2_desc)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
391 .def_readonly("address2_transport", &pst_item_contact::address2_transport)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
392 .def_readonly("address3", &pst_item_contact::address3)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
393 .def_readonly("address3a", &pst_item_contact::address3a)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
394 .def_readonly("address3_desc", &pst_item_contact::address3_desc)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
395 .def_readonly("address3_transport", &pst_item_contact::address3_transport)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
396 .def_readonly("assistant_name", &pst_item_contact::assistant_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
397 .def_readonly("assistant_phone", &pst_item_contact::assistant_phone)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
398 .def_readonly("billing_information", &pst_item_contact::billing_information)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
399 .add_property("birthday", make_getter(&pst_item_contact::birthday, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
400 .def_readonly("business_address", &pst_item_contact::business_address)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
401 .def_readonly("business_city", &pst_item_contact::business_city)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
402 .def_readonly("business_country", &pst_item_contact::business_country)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
403 .def_readonly("business_fax", &pst_item_contact::business_fax)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
404 .def_readonly("business_homepage", &pst_item_contact::business_homepage)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
405 .def_readonly("business_phone", &pst_item_contact::business_phone)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
406 .def_readonly("business_phone2", &pst_item_contact::business_phone2)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
407 .def_readonly("business_po_box", &pst_item_contact::business_po_box)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
408 .def_readonly("business_postal_code", &pst_item_contact::business_postal_code)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
409 .def_readonly("business_state", &pst_item_contact::business_state)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
410 .def_readonly("business_street", &pst_item_contact::business_street)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
411 .def_readonly("callback_phone", &pst_item_contact::callback_phone)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
412 .def_readonly("car_phone", &pst_item_contact::car_phone)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
413 .def_readonly("company_main_phone", &pst_item_contact::company_main_phone)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
414 .def_readonly("company_name", &pst_item_contact::company_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
415 .def_readonly("computer_name", &pst_item_contact::computer_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
416 .def_readonly("customer_id", &pst_item_contact::customer_id)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
417 .def_readonly("def_postal_address", &pst_item_contact::def_postal_address)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
418 .def_readonly("department", &pst_item_contact::department)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
419 .def_readonly("display_name_prefix", &pst_item_contact::display_name_prefix)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
420 .def_readonly("first_name", &pst_item_contact::first_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
421 .def_readonly("followup", &pst_item_contact::followup)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
422 .def_readonly("free_busy_address", &pst_item_contact::free_busy_address)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
423 .def_readonly("ftp_site", &pst_item_contact::ftp_site)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
424 .def_readonly("fullname", &pst_item_contact::fullname)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
425 .def_readonly("gender", &pst_item_contact::gender)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
426 .def_readonly("gov_id", &pst_item_contact::gov_id)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
427 .def_readonly("hobbies", &pst_item_contact::hobbies)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
428 .def_readonly("home_address", &pst_item_contact::home_address)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
429 .def_readonly("home_city", &pst_item_contact::home_city)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
430 .def_readonly("home_country", &pst_item_contact::home_country)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
431 .def_readonly("home_fax", &pst_item_contact::home_fax)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
432 .def_readonly("home_phone", &pst_item_contact::home_phone)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
433 .def_readonly("home_phone2", &pst_item_contact::home_phone2)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
434 .def_readonly("home_po_box", &pst_item_contact::home_po_box)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
435 .def_readonly("home_postal_code", &pst_item_contact::home_postal_code)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
436 .def_readonly("home_state", &pst_item_contact::home_state)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
437 .def_readonly("home_street", &pst_item_contact::home_street)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
438 .def_readonly("initials", &pst_item_contact::initials)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
439 .def_readonly("isdn_phone", &pst_item_contact::isdn_phone)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
440 .def_readonly("job_title", &pst_item_contact::job_title)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
441 .def_readonly("keyword", &pst_item_contact::keyword)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
442 .def_readonly("language", &pst_item_contact::language)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
443 .def_readonly("location", &pst_item_contact::location)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
444 .def_readonly("mail_permission", &pst_item_contact::mail_permission)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
445 .def_readonly("manager_name", &pst_item_contact::manager_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
446 .def_readonly("middle_name", &pst_item_contact::middle_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
447 .def_readonly("mileage", &pst_item_contact::mileage)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
448 .def_readonly("mobile_phone", &pst_item_contact::mobile_phone)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
449 .def_readonly("nickname", &pst_item_contact::nickname)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
450 .def_readonly("office_loc", &pst_item_contact::office_loc)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
451 .def_readonly("common_name", &pst_item_contact::common_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
452 .def_readonly("org_id", &pst_item_contact::org_id)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
453 .def_readonly("other_address", &pst_item_contact::other_address)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
454 .def_readonly("other_city", &pst_item_contact::other_city)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
455 .def_readonly("other_country", &pst_item_contact::other_country)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
456 .def_readonly("other_phone", &pst_item_contact::other_phone)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
457 .def_readonly("other_po_box", &pst_item_contact::other_po_box)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
458 .def_readonly("other_postal_code", &pst_item_contact::other_postal_code)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
459 .def_readonly("other_state", &pst_item_contact::other_state)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
460 .def_readonly("other_street", &pst_item_contact::other_street)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
461 .def_readonly("pager_phone", &pst_item_contact::pager_phone)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
462 .def_readonly("personal_homepage", &pst_item_contact::personal_homepage)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
463 .def_readonly("pref_name", &pst_item_contact::pref_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
464 .def_readonly("primary_fax", &pst_item_contact::primary_fax)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
465 .def_readonly("primary_phone", &pst_item_contact::primary_phone)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
466 .def_readonly("profession", &pst_item_contact::profession)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
467 .def_readonly("radio_phone", &pst_item_contact::radio_phone)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
468 .def_readonly("rich_text", &pst_item_contact::rich_text)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
469 .def_readonly("spouse_name", &pst_item_contact::spouse_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
470 .def_readonly("suffix", &pst_item_contact::suffix)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
471 .def_readonly("surname", &pst_item_contact::surname)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
472 .def_readonly("telex", &pst_item_contact::telex)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
473 .def_readonly("transmittable_display_name", &pst_item_contact::transmittable_display_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
474 .def_readonly("ttytdd_phone", &pst_item_contact::ttytdd_phone)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
475 .add_property("wedding_anniversary", make_getter(&pst_item_contact::wedding_anniversary, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
476 .def_readonly("work_address_street", &pst_item_contact::work_address_street)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
477 .def_readonly("work_address_city", &pst_item_contact::work_address_city)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
478 .def_readonly("work_address_state", &pst_item_contact::work_address_state)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
479 .def_readonly("work_address_postalcode", &pst_item_contact::work_address_postalcode)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
480 .def_readonly("work_address_country", &pst_item_contact::work_address_country)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
481 .def_readonly("work_address_postofficebox", &pst_item_contact::work_address_postofficebox)
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
482 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
483
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
484 class_<pst_item_attach>("pst_item_attach")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
485 .def_readonly("filename1", &pst_item_attach::filename1)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
486 .def_readonly("filename2", &pst_item_attach::filename2)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
487 .def_readonly("mimetype", &pst_item_attach::mimetype)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
488 .add_property("data", make_getter(&pst_item_attach::data, return_value_policy<return_by_value>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
489 .def_readonly("id2_val", &pst_item_attach::id2_val)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
490 .def_readonly("i_id", &pst_item_attach::i_id)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
491 .add_property("id2_head", make_getter(&pst_item_attach::id2_head, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
492 .def_readonly("method", &pst_item_attach::method)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
493 .def_readonly("position", &pst_item_attach::position)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
494 .def_readonly("sequence", &pst_item_attach::sequence)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
495 .add_property("next", make_getter(&pst_item_attach::next, return_value_policy<reference_existing_object>()))
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
496 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
497
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
498 class_<pst_item_extra_field>("pst_item_extra_field")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
499 .def_readonly("field_name", &pst_item_extra_field::field_name)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
500 .def_readonly("value", &pst_item_extra_field::value)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
501 .add_property("next", make_getter(&pst_item_extra_field::next, return_value_policy<reference_existing_object>()))
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
502 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
503
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
504 class_<pst_item_journal>("pst_item_journal")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
505 .add_property("start", make_getter(&pst_item_journal::start, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
506 .add_property("end", make_getter(&pst_item_journal::end, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
507 .def_readonly("type", &pst_item_journal::type)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
508 .def_readonly("description", &pst_item_journal::description)
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
509 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
510
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
511 class_<pst_recurrence>("pst_recurrence")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
512 .def_readonly("signature", &pst_recurrence::signature)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
513 .def_readonly("type", &pst_recurrence::type)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
514 .def_readonly("sub_type", &pst_recurrence::sub_type)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
515 .def_readonly("parm1", &pst_recurrence::parm1)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
516 .def_readonly("parm2", &pst_recurrence::parm2)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
517 .def_readonly("parm3", &pst_recurrence::parm3)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
518 .def_readonly("parm4", &pst_recurrence::parm4)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
519 .def_readonly("parm5", &pst_recurrence::parm5)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
520 .def_readonly("termination", &pst_recurrence::termination)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
521 .def_readonly("interval", &pst_recurrence::interval)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
522 .def_readonly("bydaymask", &pst_recurrence::bydaymask)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
523 .def_readonly("dayofmonth", &pst_recurrence::dayofmonth)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
524 .def_readonly("monthofyear", &pst_recurrence::monthofyear)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
525 .def_readonly("position", &pst_recurrence::position)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
526 .def_readonly("count", &pst_recurrence::count)
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
527 ;
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
528
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
529 class_<pst_item_appointment>("pst_item_appointment")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
530 .add_property("start", make_getter(&pst_item_appointment::start, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
531 .add_property("end", make_getter(&pst_item_appointment::end, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
532 .def_readonly("location", &pst_item_appointment::location)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
533 .def_readonly("alarm", &pst_item_appointment::alarm)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
534 .add_property("reminder", make_getter(&pst_item_appointment::reminder, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
535 .def_readonly("alarm_minutes", &pst_item_appointment::alarm_minutes)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
536 .def_readonly("alarm_filename", &pst_item_appointment::alarm_filename)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
537 .def_readonly("timezonestring", &pst_item_appointment::timezonestring)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
538 .def_readonly("showas", &pst_item_appointment::showas)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
539 .def_readonly("label", &pst_item_appointment::label)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
540 .def_readonly("all_day", &pst_item_appointment::all_day)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
541 .def_readonly("is_recurring", &pst_item_appointment::is_recurring)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
542 .def_readonly("recurrence_type", &pst_item_appointment::recurrence_type)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
543 .def_readonly("recurrence_description", &pst_item_appointment::recurrence_description)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
544 .add_property("recurrence_data", make_getter(&pst_item_appointment::recurrence_data, return_value_policy<return_by_value>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
545 .add_property("recurrence_start", make_getter(&pst_item_appointment::recurrence_start, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
546 .add_property("recurrence_end", make_getter(&pst_item_appointment::recurrence_end, return_value_policy<reference_existing_object>()))
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
547 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
548
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
549 class_<pst_item>("pst_item")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
550 .add_property("email", make_getter(&pst_item::email, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
551 .add_property("folder", make_getter(&pst_item::folder, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
552 .add_property("contact", make_getter(&pst_item::contact, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
553 .add_property("attach", make_getter(&pst_item::attach, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
554 .add_property("message_store", make_getter(&pst_item::message_store, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
555 .add_property("extra_fields", make_getter(&pst_item::extra_fields, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
556 .add_property("journal", make_getter(&pst_item::journal, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
557 .add_property("appointment", make_getter(&pst_item::appointment, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
558 .def_readonly("block_id", &pst_item::block_id)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
559 .def_readonly("type", &pst_item::type)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
560 .def_readonly("ascii_type", &pst_item::ascii_type)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
561 .def_readonly("flags", &pst_item::flags)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
562 .def_readonly("file_as", &pst_item::file_as)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
563 .def_readonly("comment", &pst_item::comment)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
564 .def_readonly("body_charset", &pst_item::body_charset)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
565 .def_readonly("body", &pst_item::body)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
566 .def_readonly("subject", &pst_item::subject)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
567 .def_readonly("internet_cpid", &pst_item::internet_cpid)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
568 .def_readonly("message_codepage", &pst_item::message_codepage)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
569 .def_readonly("message_size", &pst_item::message_size)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
570 .def_readonly("outlook_version", &pst_item::outlook_version)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
571 .add_property("record_key", make_getter(&pst_item::record_key, return_value_policy<return_by_value>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
572 .add_property("predecessor_change", make_getter(&pst_item::predecessor_change, return_value_policy<return_by_value>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
573 .def_readonly("response_requested", &pst_item::response_requested)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
574 .add_property("create_date", make_getter(&pst_item::create_date, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
575 .add_property("modify_date", make_getter(&pst_item::modify_date, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
576 .def_readonly("private_member", &pst_item::private_member)
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
577 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
578
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
579 class_<pst_x_attrib_ll>("pst_x_attrib_ll")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
580 .def_readonly("mytype", &pst_x_attrib_ll::mytype)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
581 .def_readonly("map", &pst_x_attrib_ll::map)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
582 .def_readonly("data", &pst_x_attrib_ll::data)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
583 .add_property("next", make_getter(&pst_x_attrib_ll::next, return_value_policy<reference_existing_object>()))
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
584 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
585
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
586 class_<pst_file>("pst_file")
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
587 .def_readonly("cwd", &pst_file::cwd)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
588 .def_readonly("fname", &pst_file::fname)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
589 .add_property("i_head", make_getter(&pst_file::i_head, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
590 .add_property("i_tail", make_getter(&pst_file::i_tail, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
591 .add_property("d_head", make_getter(&pst_file::d_head, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
592 .add_property("d_tail", make_getter(&pst_file::d_tail, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
593 .add_property("x_head", make_getter(&pst_file::x_head, return_value_policy<reference_existing_object>()))
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
594 .def_readonly("do_read64", &pst_file::do_read64)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
595 .def_readonly("index1", &pst_file::index1)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
596 .def_readonly("index1_back", &pst_file::index1_back)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
597 .def_readonly("index2", &pst_file::index2)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
598 .def_readonly("index2_back", &pst_file::index2_back)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
599 .def_readonly("size", &pst_file::size)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
600 .def_readonly("encryption", &pst_file::encryption)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
601 .def_readonly("ind_type", &pst_file::ind_type)
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
602 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
603
298
201464dd356e add default character set for items where the pst file does not specify a character set
Carl Byington <carl@five-ten-sg.com>
parents: 297
diff changeset
604 class_<pst>("pst", init<string,string>())
299
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
605 .def("pst_getTopOfFolders", &pst::pst_getTopOfFolders, return_value_policy<reference_existing_object>())
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
606 .def("pst_attach_to_mem", &pst::pst_attach_to_mem)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
607 .def("pst_attach_to_file", &pst::pst_attach_to_file)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
608 .def("pst_attach_to_file_base64", &pst::pst_attach_to_file_base64)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
609 .def("pst_getNextDptr", &pst::pst_getNextDptr, return_value_policy<reference_existing_object>())
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
610 .def("pst_parse_item", &pst::pst_parse_item, return_value_policy<reference_existing_object>())
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
611 .def("pst_freeItem", &pst::pst_freeItem)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
612 .def("pst_getID", &pst::pst_getID, return_value_policy<reference_existing_object>())
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
613 .def("pst_ff_getIDblock_dec", &pst::pst_ff_getIDblock_dec)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
614 .def("pst_rfc2426_escape", &pst::pst_rfc2426_escape)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
615 .def("pst_rfc2425_datetime_format", &pst::pst_rfc2425_datetime_format)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
616 .def("pst_rfc2445_datetime_format", &pst::pst_rfc2445_datetime_format)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
617 .def("pst_default_charset", &pst::pst_default_charset)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
618 .def("pst_convert_utf8_null", &pst::pst_convert_utf8_null)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
619 .def("pst_convert_utf8", &pst::pst_convert_utf8)
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
620 .def("ppst_open_file", &pst::ppst_open_file, return_value_policy<reference_existing_object>())
1ddc61fd6189 fix pst_binary in python interface
Carl Byington <carl@five-ten-sg.com>
parents: 298
diff changeset
621 .def("ppst_close_file", &pst::ppst_close_file)
195
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
622 ;
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
623 }
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
624
320cfcba8058 add python module interface to the shared library for easy scripting.
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
625