Compare commits
903
Commits
SOGo-3.0.1
...
SOGo-3.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a0ce5339c | ||
|
|
9a1e2804de | ||
|
|
69c7102ee0 | ||
|
|
2a59a117a2 | ||
|
|
030dabdcb2 | ||
|
|
1bd4fe5010 | ||
|
|
5c8568f14e | ||
|
|
b4676ce439 | ||
|
|
f0a368e42c | ||
|
|
23fa9c0ea1 | ||
|
|
92a81f8c1b | ||
|
|
a6b2202576 | ||
|
|
f5cc2d7c27 | ||
|
|
508550d677 | ||
|
|
c845d021ea | ||
|
|
268b8ea1c3 | ||
|
|
f233b2a9a7 | ||
|
|
9046bae712 | ||
|
|
4d7242bfc6 | ||
|
|
66267b17f2 | ||
|
|
77e3d7ca0c | ||
|
|
c80ee886b3 | ||
|
|
5db9f40f6a | ||
|
|
c317ae964d | ||
|
|
aef0609032 | ||
|
|
a299ed2f26 | ||
|
|
ef21630441 | ||
|
|
ee66383f09 | ||
|
|
c1733221ba | ||
|
|
9623604aac | ||
|
|
3d30345fb5 | ||
|
|
af9e0f4853 | ||
|
|
5e76627641 | ||
|
|
3a61903e7f | ||
|
|
f0a0da28ae | ||
|
|
b7abbeb045 | ||
|
|
c328ea1823 | ||
|
|
81643c1c60 | ||
|
|
b55d5e9f54 | ||
|
|
8ec73590d7 | ||
|
|
e4efff6bc1 | ||
|
|
57a735753f | ||
|
|
13dd21bebb | ||
|
|
008b38ab7d | ||
|
|
44aa1352e4 | ||
|
|
5cb85c4f4f | ||
|
|
c1326dc20e | ||
|
|
ae58c771b6 | ||
|
|
3c924e30ea | ||
|
|
bb3d24c696 | ||
|
|
a2e3807a3a | ||
|
|
93de7b9ab3 | ||
|
|
d81a663fd1 | ||
|
|
dde4fc829f | ||
|
|
9bbffe48e4 | ||
|
|
300a893957 | ||
|
|
1c8f309c33 | ||
|
|
0c9a301f25 | ||
|
|
fcd61abc41 | ||
|
|
56e8883a94 | ||
|
|
a768620747 | ||
|
|
a9c29c65b3 | ||
|
|
8bbfc4155b | ||
|
|
6a75834988 | ||
|
|
0504769cd2 | ||
|
|
908c29d67c | ||
|
|
1e2238534b | ||
|
|
30bcae5acb | ||
|
|
9d5c3a707a | ||
|
|
ecfe532397 | ||
|
|
ab3d59f5fc | ||
|
|
98c9364712 | ||
|
|
b985d0770d | ||
|
|
2c4b11230c | ||
|
|
a402272f9d | ||
|
|
2b9cbb4696 | ||
|
|
d7b3a8176d | ||
|
|
8bf452992e | ||
|
|
0856d56a70 | ||
|
|
42127c51ab | ||
|
|
49d58b436e | ||
|
|
6d8f7c9a44 | ||
|
|
a50c45ff12 | ||
|
|
557936f7fd | ||
|
|
b626fbf178 | ||
|
|
1a027134c5 | ||
|
|
53e2a2dacc | ||
|
|
4c23f21ae1 | ||
|
|
195d477149 | ||
|
|
6dc2078c38 | ||
|
|
2040706432 | ||
|
|
ffc5a23e39 | ||
|
|
67258fe337 | ||
|
|
1041d8f259 | ||
|
|
42858b997c | ||
|
|
ab4118fb29 | ||
|
|
c2a0994aed | ||
|
|
89329a0c78 | ||
|
|
53f97af814 | ||
|
|
015f389f7c | ||
|
|
8486448843 | ||
|
|
ed7537d430 | ||
|
|
0c814e5050 | ||
|
|
81a124acc3 | ||
|
|
7572098f01 | ||
|
|
c31230ce19 | ||
|
|
098713537e | ||
|
|
2cc388bb1f | ||
|
|
28ee04b68b | ||
|
|
07c66563e8 | ||
|
|
ce5cc6843e | ||
|
|
d2f69077b7 | ||
|
|
8b9ceb3273 | ||
|
|
9eab774c5e | ||
|
|
84e8ece31f | ||
|
|
372158a3e9 | ||
|
|
0d021724f7 | ||
|
|
155d15e80c | ||
|
|
287c57c994 | ||
|
|
3d281c2f39 | ||
|
|
e4ef3f73cb | ||
|
|
261a17c83b | ||
|
|
cc4a4f1770 | ||
|
|
01fe6f1d4b | ||
|
|
e526d9e567 | ||
|
|
503de64379 | ||
|
|
0fd8c791c4 | ||
|
|
3cbe098b17 | ||
|
|
746cb3e7dd | ||
|
|
b58dc7a813 | ||
|
|
cf73eab325 | ||
|
|
8be6c4d74d | ||
|
|
4ffc291617 | ||
|
|
7b5cc03747 | ||
|
|
1cd6697b5b | ||
|
|
0d1f7a90ce | ||
|
|
ae89c397c9 | ||
|
|
6b54d6608d | ||
|
|
db5b27cb89 | ||
|
|
bc332bc980 | ||
|
|
eb9006e527 | ||
|
|
0e2336cc4e | ||
|
|
e876c9d68e | ||
|
|
0fee8ad691 | ||
|
|
4c9060abaa | ||
|
|
a6a43b989a | ||
|
|
decfc0c49c | ||
|
|
932ac03a4e | ||
|
|
829c8fee68 | ||
|
|
907024d2c4 | ||
|
|
e963981460 | ||
|
|
b7496a5d6b | ||
|
|
d2b20c88c3 | ||
|
|
53c0e34abe | ||
|
|
5909810b1f | ||
|
|
84a2c70c87 | ||
|
|
1e26b3e61d | ||
|
|
fea6978b63 | ||
|
|
7f5e06c020 | ||
|
|
23185273a6 | ||
|
|
21e0cd8711 | ||
|
|
f03cdaf4b7 | ||
|
|
38028e7b41 | ||
|
|
ef251e8206 | ||
|
|
6ebf834729 | ||
|
|
8946880c84 | ||
|
|
279dc5a513 | ||
|
|
6426dc1206 | ||
|
|
25d420141f | ||
|
|
0d9ec64fa0 | ||
|
|
6011b7aede | ||
|
|
9d65d7c3a8 | ||
|
|
6071375c29 | ||
|
|
431db5495e | ||
|
|
8389ec5f40 | ||
|
|
0ec79e0411 | ||
|
|
54318a2432 | ||
|
|
c23a9f955a | ||
|
|
1738ac87d8 | ||
|
|
80338daf91 | ||
|
|
f1d2bcffc8 | ||
|
|
197e237a66 | ||
|
|
6a608425f2 | ||
|
|
d045f4a958 | ||
|
|
4ed1063296 | ||
|
|
63bdf77847 | ||
|
|
83bffdc468 | ||
|
|
106d8ba807 | ||
|
|
f6a919f070 | ||
|
|
cf856a64ad | ||
|
|
e804e5b7c0 | ||
|
|
5ad962d7b2 | ||
|
|
aaa256f321 | ||
|
|
440acec143 | ||
|
|
8dfe399c02 | ||
|
|
370631817d | ||
|
|
793be51d14 | ||
|
|
4a6bdffc5b | ||
|
|
ffa1920122 | ||
|
|
e742916084 | ||
|
|
596f991460 | ||
|
|
ef10920f57 | ||
|
|
c9703c0f74 | ||
|
|
88a0dfdac3 | ||
|
|
f18a0373d8 | ||
|
|
deaec0bd7b | ||
|
|
0cf0c25399 | ||
|
|
1a3fc0a1d2 | ||
|
|
f9cebd975a | ||
|
|
6bbb56c386 | ||
|
|
0fe472b5e9 | ||
|
|
3a2d01188c | ||
|
|
9abc6ab579 | ||
|
|
4f5de1b3a1 | ||
|
|
24c7c10992 | ||
|
|
aea4ee72c9 | ||
|
|
a6ae11c2e0 | ||
|
|
e9926c9b7d | ||
|
|
a3181e1165 | ||
|
|
4150126db8 | ||
|
|
1d8bfba3e2 | ||
|
|
7e950896ba | ||
|
|
8f382192ee | ||
|
|
bc419202ee | ||
|
|
080c4f27e6 | ||
|
|
49dfbb0d9a | ||
|
|
9d2647d857 | ||
|
|
d10a386fb0 | ||
|
|
93e77d49e9 | ||
|
|
61215792ab | ||
|
|
bfd3508949 | ||
|
|
0e8637ec9f | ||
|
|
749c77ce05 | ||
|
|
197123143b | ||
|
|
ccc8f4cb9d | ||
|
|
200ab42ba8 | ||
|
|
1918bde4d0 | ||
|
|
0d1ac2e6b3 | ||
|
|
cccdeee707 | ||
|
|
da0a099638 | ||
|
|
f7afab5f37 | ||
|
|
6ba6dcbf09 | ||
|
|
ce6e321f2d | ||
|
|
e29d14de96 | ||
|
|
4bfb7ca0bf | ||
|
|
7a09bbf498 | ||
|
|
d47dcd1133 | ||
|
|
4bc262503a | ||
|
|
4a0f97c778 | ||
|
|
323f5d03bf | ||
|
|
4e61a9d3fe | ||
|
|
e8f7f6055b | ||
|
|
13e826b6f2 | ||
|
|
cf3a9b89b6 | ||
|
|
74efb6a0b1 | ||
|
|
19f3a10397 | ||
|
|
02459e1eb5 | ||
|
|
546a71d9f4 | ||
|
|
0089f1dfdc | ||
|
|
7cf0aaa2f7 | ||
|
|
3597c2eef1 | ||
|
|
79ec4a02fe | ||
|
|
030bdb4bc7 | ||
|
|
fa91a07cb7 | ||
|
|
e02b975bb5 | ||
|
|
bd75eaf878 | ||
|
|
4a74f00adb | ||
|
|
bd0ff6043c | ||
|
|
1e458a922b | ||
|
|
bfab819a7e | ||
|
|
4419a192c1 | ||
|
|
0629d9ac62 | ||
|
|
7d02dda18c | ||
|
|
cd3e7426cc | ||
|
|
d8dc443fa9 | ||
|
|
6e0c347f39 | ||
|
|
2638af1a8d | ||
|
|
551405fac6 | ||
|
|
62b0dcc889 | ||
|
|
3e0ba60c84 | ||
|
|
dfc904f4f3 | ||
|
|
9dbb360ef7 | ||
|
|
1efeca72c5 | ||
|
|
b72b52f052 | ||
|
|
083b770e41 | ||
|
|
0462530fbd | ||
|
|
66e1fbd556 | ||
|
|
6b5571ea2c | ||
|
|
6538f6d047 | ||
|
|
61381225d9 | ||
|
|
75dfebe9ae | ||
|
|
5ee5ccd078 | ||
|
|
c5ada373c1 | ||
|
|
2caa6754cf | ||
|
|
8cc0b946e7 | ||
|
|
20001b7e14 | ||
|
|
c8c8d12d1f | ||
|
|
d2b44b6b50 | ||
|
|
aeaa017406 | ||
|
|
af136eec6c | ||
|
|
429aa1a91d | ||
|
|
734d680708 | ||
|
|
af8f939559 | ||
|
|
15188a4997 | ||
|
|
7305fb83f7 | ||
|
|
29672b57da | ||
|
|
aadc1681bd | ||
|
|
c1bbc1720d | ||
|
|
d8fc40217d | ||
|
|
49ed5bb462 | ||
|
|
c69e84650d | ||
|
|
85b764c179 | ||
|
|
4744170628 | ||
|
|
7f4474f47c | ||
|
|
d9f499ff52 | ||
|
|
35c0436bf6 | ||
|
|
e24ee771e2 | ||
|
|
ff65ba88ad | ||
|
|
72731e84f1 | ||
|
|
a3d64d05f6 | ||
|
|
91bd493b82 | ||
|
|
73c400c407 | ||
|
|
9a32d82963 | ||
|
|
5eb4557ac9 | ||
|
|
ae7fefb487 | ||
|
|
4f64994f7b | ||
|
|
d2869bed7f | ||
|
|
e4c6b83c33 | ||
|
|
da5fa9e850 | ||
|
|
ff4e50d904 | ||
|
|
d9d8a72651 | ||
|
|
6c2052ab6f | ||
|
|
684c32ee95 | ||
|
|
ccbce4fa1d | ||
|
|
c3bcfe0f07 | ||
|
|
f607cb03c5 | ||
|
|
658cb956d9 | ||
|
|
7dbbd66640 | ||
|
|
fa78566d72 | ||
|
|
0b1e7ad8e0 | ||
|
|
d6d3e49158 | ||
|
|
ff711e60b2 | ||
|
|
215f04667c | ||
|
|
1db09de2a8 | ||
|
|
64ce3c9c22 | ||
|
|
97e6385f4c | ||
|
|
076b6b6ad5 | ||
|
|
44d184b1cf | ||
|
|
77ce13967c | ||
|
|
cebd79a66e | ||
|
|
79085d6ddd | ||
|
|
bba673e0ef | ||
|
|
c6f6f7896c | ||
|
|
a3989926e3 | ||
|
|
f753ed9680 | ||
|
|
e227ffa8d3 | ||
|
|
f0f9ca9ff0 | ||
|
|
ec61fd10fc | ||
|
|
e54d5c1b06 | ||
|
|
b4a79db603 | ||
|
|
a69e99b4c8 | ||
|
|
2a053400d7 | ||
|
|
5983c5cf4d | ||
|
|
e7114277fd | ||
|
|
9dcc25abc5 | ||
|
|
568e438069 | ||
|
|
ab74ef0c41 | ||
|
|
717bab718c | ||
|
|
8395a78f6d | ||
|
|
8f417cb10b | ||
|
|
93f0678a5e | ||
|
|
8225480029 | ||
|
|
12eb839d73 | ||
|
|
87283acd86 | ||
|
|
d287024d37 | ||
|
|
d28625ae6a | ||
|
|
d03e03e3ea | ||
|
|
9b9d214760 | ||
|
|
ff0c815c08 | ||
|
|
b6037e4842 | ||
|
|
04d12f52f8 | ||
|
|
80d9463e86 | ||
|
|
6d8dc29f28 | ||
|
|
6b2ae87010 | ||
|
|
fd8494be95 | ||
|
|
e7668e0ef2 | ||
|
|
0a2b1c3b00 | ||
|
|
bfda86e31c | ||
|
|
e07a5f75ec | ||
|
|
b008e220fe | ||
|
|
99e8c42a87 | ||
|
|
59bf86fe86 | ||
|
|
21054ea3d6 | ||
|
|
9a38db1667 | ||
|
|
74e639bf5d | ||
|
|
5ab405efcc | ||
|
|
b71fb2e525 | ||
|
|
c11839cd5e | ||
|
|
1dca078c56 | ||
|
|
ac229bacf6 | ||
|
|
0d507ff038 | ||
|
|
1b8bc408d1 | ||
|
|
98970712fd | ||
|
|
2e38215988 | ||
|
|
5c2aedb3c9 | ||
|
|
c46a5f8df7 | ||
|
|
f623de931a | ||
|
|
d9b5728585 | ||
|
|
ec8dfdfd05 | ||
|
|
1ba8ba9e58 | ||
|
|
f4d83bfa19 | ||
|
|
45290c6414 | ||
|
|
875a4aca32 | ||
|
|
604705960e | ||
|
|
ac33bb62d5 | ||
|
|
06f596f821 | ||
|
|
4b29b5302e | ||
|
|
8bee076135 | ||
|
|
39ba7fc7f8 | ||
|
|
c9f63a7ce2 | ||
|
|
7c4b1b36cf | ||
|
|
d61a9d0b80 | ||
|
|
6ff125c679 | ||
|
|
a9ee261eff | ||
|
|
9fc22f2689 | ||
|
|
c9346e4f24 | ||
|
|
fd4b09428f | ||
|
|
6dc80e1159 | ||
|
|
968a5bd5fb | ||
|
|
d2a4ddd3df | ||
|
|
0773dec6b8 | ||
|
|
e3a9ba910c | ||
|
|
8225a4ccb0 | ||
|
|
9f28872671 | ||
|
|
0306aa07a9 | ||
|
|
321b92fd15 | ||
|
|
0e57e3b571 | ||
|
|
0e2c6dc5cd | ||
|
|
03bbe63cdc | ||
|
|
ac13ef0005 | ||
|
|
cc28357553 | ||
|
|
fdc82913ef | ||
|
|
35d549121d | ||
|
|
0c02712b35 | ||
|
|
44696896f2 | ||
|
|
335621ba42 | ||
|
|
3ed32cc4c1 | ||
|
|
9db6e2c411 | ||
|
|
ee8f199603 | ||
|
|
d3fa7cb9c7 | ||
|
|
56a470314d | ||
|
|
abb26dfd22 | ||
|
|
ce1fb708a0 | ||
|
|
045013bc74 | ||
|
|
33ca545f8b | ||
|
|
32ed6a14d5 | ||
|
|
7fe576f277 | ||
|
|
4b0fadbe22 | ||
|
|
669eee301b | ||
|
|
69c526eb67 | ||
|
|
ddbb05fd30 | ||
|
|
d17944091a | ||
|
|
87fbedb89d | ||
|
|
8c4d4e0e2d | ||
|
|
00e0aa7ab4 | ||
|
|
877165f4ed | ||
|
|
60f8641d27 | ||
|
|
bce14b0912 | ||
|
|
7f867f9410 | ||
|
|
bcff953726 | ||
|
|
c8f8b505cb | ||
|
|
9375d756c6 | ||
|
|
0aed09b517 | ||
|
|
446531085b | ||
|
|
3ee3ae24b0 | ||
|
|
c14f6e56fe | ||
|
|
0b062e1832 | ||
|
|
e396e29430 | ||
|
|
199a5f5215 | ||
|
|
32c6fa9757 | ||
|
|
0bcfadc780 | ||
|
|
49a6d58a07 | ||
|
|
ca53e4b225 | ||
|
|
26c1f26881 | ||
|
|
55367cdc97 | ||
|
|
dc868e412e | ||
|
|
f4a95edc75 | ||
|
|
cba3819e47 | ||
|
|
2163aa99cf | ||
|
|
92b180b1e3 | ||
|
|
eeff287e35 | ||
|
|
b5b9d596f0 | ||
|
|
a30d620502 | ||
|
|
d802a7d5e4 | ||
|
|
68381b31d8 | ||
|
|
42bdfbcf7b | ||
|
|
315117b029 | ||
|
|
557797d634 | ||
|
|
a1e0f2767f | ||
|
|
7d5255f762 | ||
|
|
9acebbb6d5 | ||
|
|
ad67239cda | ||
|
|
9e82affac1 | ||
|
|
8334c975e4 | ||
|
|
6aae6357c4 | ||
|
|
9ad983e0cb | ||
|
|
29e0799b11 | ||
|
|
8cf8ce86d7 | ||
|
|
d8ebd0bccf | ||
|
|
4a0d4eb343 | ||
|
|
554ae9ac32 | ||
|
|
68799755be | ||
|
|
8789db67b3 | ||
|
|
bf5bee87e6 | ||
|
|
f2903db43c | ||
|
|
c5eeadf041 | ||
|
|
3c6da09ff8 | ||
|
|
74602de1db | ||
|
|
8aa452539a | ||
|
|
7bd7272bd1 | ||
|
|
d3ba62854c | ||
|
|
761029f5c5 | ||
|
|
4e3baf9813 | ||
|
|
f3f1f6dcb4 | ||
|
|
5f2a862bc8 | ||
|
|
d4fc1775b2 | ||
|
|
de0540c784 | ||
|
|
993ff15e7f | ||
|
|
e1ced4ac65 | ||
|
|
54b114712f | ||
|
|
031e2d4836 | ||
|
|
d5f7b3fe8e | ||
|
|
3157fa022e | ||
|
|
924886e448 | ||
|
|
64ce63d812 | ||
|
|
7bf7a34a78 | ||
|
|
27eac2500b | ||
|
|
bb34a22578 | ||
|
|
8853bc4977 | ||
|
|
03c7604f3e | ||
|
|
3212e978b3 | ||
|
|
ed15e13100 | ||
|
|
9255775ca1 | ||
|
|
cd89b46c01 | ||
|
|
2a3a575e72 | ||
|
|
f190ad1c3c | ||
|
|
6c84a7b7cc | ||
|
|
b8dd73c32b | ||
|
|
ecf58246d7 | ||
|
|
d1c13da924 | ||
|
|
965e01e36c | ||
|
|
f2fc7abb25 | ||
|
|
2963654800 | ||
|
|
6cb513f30b | ||
|
|
d19f1572ae | ||
|
|
5454690c38 | ||
|
|
712e5dc2ef | ||
|
|
48e58164f7 | ||
|
|
582baf2960 | ||
|
|
2da7a04bac | ||
|
|
ae2982e2bc | ||
|
|
9ecb5b5690 | ||
|
|
5e8f65738a | ||
|
|
42e73d5edf | ||
|
|
0f86d78f22 | ||
|
|
b0ab9ab1b8 | ||
|
|
7ea3608dab | ||
|
|
09d04984a5 | ||
|
|
1a30df03c8 | ||
|
|
0bc7e5f5bd | ||
|
|
267551cc41 | ||
|
|
0b7485228c | ||
|
|
6e1369e6b1 | ||
|
|
9a4d3251a1 | ||
|
|
fba40c43d6 | ||
|
|
6a139b81c1 | ||
|
|
0d11f93250 | ||
|
|
e08d915770 | ||
|
|
4d5adab28b | ||
|
|
2fcb11901b | ||
|
|
d84a8d143f | ||
|
|
3ac6a1f810 | ||
|
|
1401aba041 | ||
|
|
4ec0615bcd | ||
|
|
4d52b7d2b5 | ||
|
|
8dca36097a | ||
|
|
f36570fb90 | ||
|
|
fed87ed818 | ||
|
|
5dad2b4d16 | ||
|
|
34eac1525e | ||
|
|
2774878fa2 | ||
|
|
117af61609 | ||
|
|
02bb9ba9d0 | ||
|
|
3b5e27a2c3 | ||
|
|
c9fea41995 | ||
|
|
9d7a21883a | ||
|
|
1e8a565224 | ||
|
|
adc227a7eb | ||
|
|
e88ce682f3 | ||
|
|
1f029c9c70 | ||
|
|
5f46df39cd | ||
|
|
29f6ffb04c | ||
|
|
aa6a102132 | ||
|
|
5d26175d56 | ||
|
|
dd5b815cd3 | ||
|
|
2404f4bbfb | ||
|
|
d027f59619 | ||
|
|
35d1cab856 | ||
|
|
17ebfce2c7 | ||
|
|
0c6beb3fd7 | ||
|
|
59dadfd6a4 | ||
|
|
42c780dd5d | ||
|
|
bfd69d3f28 | ||
|
|
af4aae2019 | ||
|
|
66c429740f | ||
|
|
852d3db491 | ||
|
|
d697c34b6b | ||
|
|
665accb432 | ||
|
|
f4a537d811 | ||
|
|
3da59cbc7e | ||
|
|
d4c58f4f23 | ||
|
|
51d1830dd2 | ||
|
|
7ce7d1194a | ||
|
|
0a417f4adb | ||
|
|
a6e883c43b | ||
|
|
bd1fae0baf | ||
|
|
2844732b6f | ||
|
|
a304dec489 | ||
|
|
80d29f2887 | ||
|
|
f113f86c42 | ||
|
|
d80b32a25f | ||
|
|
25a1430e6e | ||
|
|
3c1113cab1 | ||
|
|
401bea2133 | ||
|
|
eb14676489 | ||
|
|
2e9a7c17f5 | ||
|
|
7dc267c96b | ||
|
|
fd388e2373 | ||
|
|
0cce8f6053 | ||
|
|
87653c3144 | ||
|
|
632ecfce2c | ||
|
|
65f56f47b5 | ||
|
|
29ec1a8ba0 | ||
|
|
eb989fdd1b | ||
|
|
48dfcb2e13 | ||
|
|
d03afba739 | ||
|
|
65d6aa82e8 | ||
|
|
01c796cd67 | ||
|
|
5a342f2fed | ||
|
|
f3a8c30c17 | ||
|
|
c5b7a91603 | ||
|
|
1216464f28 | ||
|
|
4eda59b3e7 | ||
|
|
506b8ceac7 | ||
|
|
f6f5613be5 | ||
|
|
94d13b3295 | ||
|
|
0c0505468b | ||
|
|
49f1c30e77 | ||
|
|
01f9f68d88 | ||
|
|
3a9c28f0ea | ||
|
|
0291b49fd1 | ||
|
|
573e63d3e0 | ||
|
|
9542f7444b | ||
|
|
744a95b1ba | ||
|
|
9975ce8986 | ||
|
|
5cbb43871f | ||
|
|
d87569be8f | ||
|
|
916806cc2c | ||
|
|
72e0e0ad2e | ||
|
|
fee310908b | ||
|
|
2c038d641a | ||
|
|
3dd5ca772b | ||
|
|
318fff70b0 | ||
|
|
f737c9a219 | ||
|
|
a2f1561e44 | ||
|
|
79037fc9ab | ||
|
|
b9ef3db5e9 | ||
|
|
d7adb1b802 | ||
|
|
0afc6d2307 | ||
|
|
284c45f111 | ||
|
|
bc0eba3504 | ||
|
|
638dbc904c | ||
|
|
f08c718c00 | ||
|
|
510d568cb1 | ||
|
|
00777fa7f3 | ||
|
|
e786dd8f2b | ||
|
|
9d6ab2df33 | ||
|
|
bb04ce39d6 | ||
|
|
edd075c88a | ||
|
|
69b6f7878f | ||
|
|
e9da4ca4f7 | ||
|
|
cd6c56953b | ||
|
|
422d586035 | ||
|
|
68689b7e99 | ||
|
|
ed9a51c153 | ||
|
|
dec3f94392 | ||
|
|
0af364d076 | ||
|
|
6d18db5499 | ||
|
|
9878569478 | ||
|
|
e7b0119ab1 | ||
|
|
08a94fa539 | ||
|
|
dd3361bad3 | ||
|
|
9a4d2c6b1c | ||
|
|
beb4af9f9f | ||
|
|
85cacd97de | ||
|
|
5a7652de87 | ||
|
|
6d77de4e9a | ||
|
|
dd183d039f | ||
|
|
8b7dd58e3f | ||
|
|
f3f165d0fd | ||
|
|
e855422891 | ||
|
|
ce5ccbb3b8 | ||
|
|
4dcf5792c7 | ||
|
|
4296c86230 | ||
|
|
4ac41dace7 | ||
|
|
819851bb92 | ||
|
|
c8634c8596 | ||
|
|
efc34658ec | ||
|
|
9d5de9afb7 | ||
|
|
4026c4e2d9 | ||
|
|
ef00885941 | ||
|
|
be7ee69f0f | ||
|
|
d75479f835 | ||
|
|
16f2b8a533 | ||
|
|
45e1f184d3 | ||
|
|
19d22cdcfb | ||
|
|
bd81a56e58 | ||
|
|
81daade9ec | ||
|
|
255e21795e | ||
|
|
990a5f4823 | ||
|
|
c3f69416be | ||
|
|
4210131e12 | ||
|
|
ce38a9c606 | ||
|
|
a813e38897 | ||
|
|
fc9dde885b | ||
|
|
281062a1a1 | ||
|
|
f55391b7d0 | ||
|
|
c1095a5ea9 | ||
|
|
022fd81474 | ||
|
|
478b313122 | ||
|
|
3ba0e9f82f | ||
|
|
0b1cf9faaf | ||
|
|
986665f011 | ||
|
|
5b71ed319a | ||
|
|
ddade629fd | ||
|
|
5e9d0ce95a | ||
|
|
50eae4c656 | ||
|
|
b57dd57c53 | ||
|
|
2102385f08 | ||
|
|
c0e528a2fb | ||
|
|
240557a5c5 | ||
|
|
ebd0b9e188 | ||
|
|
eefb9056ca | ||
|
|
cb03a1d97e | ||
|
|
9dd5dc4c47 | ||
|
|
aedb66f972 | ||
|
|
b808067cf7 | ||
|
|
f19b213c02 | ||
|
|
5aa19ebfb7 | ||
|
|
9e152adc7d | ||
|
|
fd8d7bb6ed | ||
|
|
72a38c51b4 | ||
|
|
599264b3d9 | ||
|
|
d4745ef598 | ||
|
|
fadf52b01e | ||
|
|
4e83dce4a6 | ||
|
|
540ed1f63b | ||
|
|
44f748659e | ||
|
|
9dd444e668 | ||
|
|
73decf2df9 | ||
|
|
f63ae5c3bb | ||
|
|
d60f49d8fa | ||
|
|
68cb3d091c | ||
|
|
9b58693873 | ||
|
|
0b7824a8b7 | ||
|
|
0a78b65cdc | ||
|
|
c34603b3eb | ||
|
|
d92bf122ed | ||
|
|
03ddcfd07a | ||
|
|
1d25944c43 | ||
|
|
da2067dd86 | ||
|
|
3529d52c3b | ||
|
|
30f23ba07a | ||
|
|
a93874b6fe | ||
|
|
12f4f236e8 | ||
|
|
699399f339 | ||
|
|
dc338e2062 | ||
|
|
163e4637aa | ||
|
|
ea91767410 | ||
|
|
a668d89ef9 | ||
|
|
50c790c846 | ||
|
|
de13f49bd3 | ||
|
|
044e426d22 | ||
|
|
a2e300fec5 | ||
|
|
07d47829ab | ||
|
|
4755358685 | ||
|
|
e27cdff8cc | ||
|
|
4526227b1c | ||
|
|
aeba0aaf2f | ||
|
|
795ec46c81 | ||
|
|
b294c5381a | ||
|
|
e5fe211dcd | ||
|
|
1016f6d8b8 | ||
|
|
70fbeab27a | ||
|
|
4b816677b0 | ||
|
|
5387b5d5a3 | ||
|
|
e51a37c37a | ||
|
|
58cb40caa7 | ||
|
|
9705fd7086 | ||
|
|
a8ccaac1fa | ||
|
|
42acf8974c | ||
|
|
a838871361 | ||
|
|
696aff84cb | ||
|
|
f143048217 | ||
|
|
e328d43403 | ||
|
|
aae02741f9 | ||
|
|
276588a548 | ||
|
|
31a51ccc83 | ||
|
|
aab87212d0 | ||
|
|
4030cf86fd | ||
|
|
1b5970b9bc | ||
|
|
ed4e70faab | ||
|
|
ef601c0409 | ||
|
|
21dcb57ca9 | ||
|
|
485a9d4462 | ||
|
|
7c00ad7110 | ||
|
|
95d0a18c08 | ||
|
|
10729b9a5f | ||
|
|
2de72e5070 | ||
|
|
4cd0c501bd | ||
|
|
1f71cff18d | ||
|
|
e47bc8cb1b | ||
|
|
6bb2065f46 | ||
|
|
1aab0595a1 | ||
|
|
9cb1b899b0 | ||
|
|
4c01417690 | ||
|
|
3d7192ffef | ||
|
|
2d3a5b4243 | ||
|
|
2edacc94ce | ||
|
|
e51f8625d6 | ||
|
|
635c647f48 | ||
|
|
929915542c | ||
|
|
42131c564a | ||
|
|
d56d9f8b08 | ||
|
|
a5cc2bb5d5 | ||
|
|
9e83ff9f04 | ||
|
|
f2ffb52318 | ||
|
|
5bd2f558bf | ||
|
|
520b1094be | ||
|
|
bd56f4cf9f | ||
|
|
7c25b53fdf | ||
|
|
e1b8d80420 | ||
|
|
132234cc19 | ||
|
|
4c6a0e6936 | ||
|
|
d5f95c6b30 | ||
|
|
5d28d81c1e | ||
|
|
5039a30405 | ||
|
|
256a64172e | ||
|
|
e897bb0399 | ||
|
|
4f1ce3f2df | ||
|
|
9d6e779bb0 | ||
|
|
c9e7eac3fd | ||
|
|
fbdcfd49fc | ||
|
|
297eefd58f | ||
|
|
decda96697 | ||
|
|
c8ea2000d8 | ||
|
|
d7b010526b | ||
|
|
9cc4bfd9be | ||
|
|
f70c0fa6e6 | ||
|
|
dfc0d23fa7 | ||
|
|
eb11e2e672 | ||
|
|
8d9ba7c04b | ||
|
|
fed57435d4 | ||
|
|
35af07fef1 | ||
|
|
99e5c1b93c | ||
|
|
31f0472db4 | ||
|
|
93158f5121 | ||
|
|
fec263a3d6 | ||
|
|
8c99fdc99a | ||
|
|
296d510572 | ||
|
|
51cbb980ad | ||
|
|
e6d1cb9231 | ||
|
|
6876ba8709 | ||
|
|
d2695bab82 | ||
|
|
37f4b11834 | ||
|
|
693f80dc9a | ||
|
|
f5b28b0274 | ||
|
|
1f3149fa63 | ||
|
|
cd181c3503 | ||
|
|
aa663fd03e | ||
|
|
2380890428 | ||
|
|
3e76de1e6e | ||
|
|
eff8ab3e0e | ||
|
|
187cd5e4ae | ||
|
|
4d702c2be9 | ||
|
|
5539b7a823 | ||
|
|
1c52093537 | ||
|
|
5a408bf14b | ||
|
|
ee3276f01d | ||
|
|
ace7e0771f | ||
|
|
1d2763af3c | ||
|
|
d63e277fc6 | ||
|
|
9e905b43ff |
No files matched your search
+33
@@ -19,6 +19,7 @@ trans.hr_HR = UI/MailerUI/Croatian.lproj/Localizable.strings
|
||||
trans.hu = UI/MailerUI/Hungarian.lproj/Localizable.strings
|
||||
trans.is = UI/MailerUI/Icelandic.lproj/Localizable.strings
|
||||
trans.it = UI/MailerUI/Italian.lproj/Localizable.strings
|
||||
trans.lt = UI/MailerUI/Lithuanian.lproj/Localizable.strings
|
||||
trans.mk_MK = UI/MailerUI/Macedonian.lproj/Localizable.strings
|
||||
trans.nb_NO = UI/MailerUI/NorwegianBokmal.lproj/Localizable.strings
|
||||
trans.nl = UI/MailerUI/Dutch.lproj/Localizable.strings
|
||||
@@ -29,7 +30,9 @@ trans.pt_BR = UI/MailerUI/BrazilianPortuguese.lproj/Localizable.strings
|
||||
trans.ru = UI/MailerUI/Russian.lproj/Localizable.strings
|
||||
trans.sk = UI/MailerUI/Slovak.lproj/Localizable.strings
|
||||
trans.sl_SI = UI/MailerUI/Slovenian.lproj/Localizable.strings
|
||||
trans.sr = UI/MailerUI/Serbian.lproj/Localizable.strings
|
||||
trans.sv = UI/MailerUI/Swedish.lproj/Localizable.strings
|
||||
trans.tr_TR = UI/MailerUI/TurkishTurkey.lproj/Localizable.strings
|
||||
trans.uk = UI/MailerUI/Ukrainian.lproj/Localizable.strings
|
||||
trans.zh_TW = UI/MailerUI/ChineseTaiwan.lproj/Localizable.strings
|
||||
|
||||
@@ -51,6 +54,7 @@ trans.hr_HR = UI/PreferencesUI/Croatian.lproj/Localizable.strings
|
||||
trans.hu = UI/PreferencesUI/Hungarian.lproj/Localizable.strings
|
||||
trans.is = UI/PreferencesUI/Icelandic.lproj/Localizable.strings
|
||||
trans.it = UI/PreferencesUI/Italian.lproj/Localizable.strings
|
||||
trans.lt = UI/PreferencesUI/Lithuanian.lproj/Localizable.strings
|
||||
trans.mk_MK = UI/PreferencesUI/Macedonian.lproj/Localizable.strings
|
||||
trans.nb_NO = UI/PreferencesUI/NorwegianBokmal.lproj/Localizable.strings
|
||||
trans.nl = UI/PreferencesUI/Dutch.lproj/Localizable.strings
|
||||
@@ -61,7 +65,9 @@ trans.pt_BR = UI/PreferencesUI/BrazilianPortuguese.lproj/Localizable.strings
|
||||
trans.ru = UI/PreferencesUI/Russian.lproj/Localizable.strings
|
||||
trans.sk = UI/PreferencesUI/Slovak.lproj/Localizable.strings
|
||||
trans.sl_SI = UI/PreferencesUI/Slovenian.lproj/Localizable.strings
|
||||
trans.sr = UI/PreferencesUI/Serbian.lproj/Localizable.strings
|
||||
trans.sv = UI/PreferencesUI/Swedish.lproj/Localizable.strings
|
||||
trans.tr_TR = UI/PreferencesUI/TurkishTurkey.lproj/Localizable.strings
|
||||
trans.uk = UI/PreferencesUI/Ukrainian.lproj/Localizable.strings
|
||||
trans.zh_TW = UI/PreferencesUI/ChineseTaiwan.lproj/Localizable.strings
|
||||
|
||||
@@ -83,6 +89,7 @@ trans.hr_HR = UI/Scheduler/Croatian.lproj/Localizable.strings
|
||||
trans.hu = UI/Scheduler/Hungarian.lproj/Localizable.strings
|
||||
trans.is = UI/Scheduler/Icelandic.lproj/Localizable.strings
|
||||
trans.it = UI/Scheduler/Italian.lproj/Localizable.strings
|
||||
trans.lt = UI/Scheduler/Lithuanian.lproj/Localizable.strings
|
||||
trans.mk_MK = UI/Scheduler/Macedonian.lproj/Localizable.strings
|
||||
trans.nb_NO = UI/Scheduler/NorwegianBokmal.lproj/Localizable.strings
|
||||
trans.nl = UI/Scheduler/Dutch.lproj/Localizable.strings
|
||||
@@ -93,7 +100,9 @@ trans.pt_BR = UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings
|
||||
trans.ru = UI/Scheduler/Russian.lproj/Localizable.strings
|
||||
trans.sk = UI/Scheduler/Slovak.lproj/Localizable.strings
|
||||
trans.sl_SI = UI/Scheduler/Slovenian.lproj/Localizable.strings
|
||||
trans.sr = UI/Scheduler/Serbian.lproj/Localizable.strings
|
||||
trans.sv = UI/Scheduler/Swedish.lproj/Localizable.strings
|
||||
trans.tr_TR = UI/Scheduler/TurkishTurkey.lproj/Localizable.strings
|
||||
trans.uk = UI/Scheduler/Ukrainian.lproj/Localizable.strings
|
||||
trans.zh_TW = UI/Scheduler/ChineseTaiwan.lproj/Localizable.strings
|
||||
|
||||
@@ -115,6 +124,7 @@ trans.hr_HR = UI/Contacts/Croatian.lproj/Localizable.strings
|
||||
trans.hu = UI/Contacts/Hungarian.lproj/Localizable.strings
|
||||
trans.is = UI/Contacts/Icelandic.lproj/Localizable.strings
|
||||
trans.it = UI/Contacts/Italian.lproj/Localizable.strings
|
||||
trans.lt = UI/Contacts/Lithuanian.lproj/Localizable.strings
|
||||
trans.mk_MK = UI/Contacts/Macedonian.lproj/Localizable.strings
|
||||
trans.nb_NO = UI/Contacts/NorwegianBokmal.lproj/Localizable.strings
|
||||
trans.nl = UI/Contacts/Dutch.lproj/Localizable.strings
|
||||
@@ -125,7 +135,9 @@ trans.pt_BR = UI/Contacts/BrazilianPortuguese.lproj/Localizable.strings
|
||||
trans.ru = UI/Contacts/Russian.lproj/Localizable.strings
|
||||
trans.sk = UI/Contacts/Slovak.lproj/Localizable.strings
|
||||
trans.sl_SI = UI/Contacts/Slovenian.lproj/Localizable.strings
|
||||
trans.sr = UI/Contacts/Serbian.lproj/Localizable.strings
|
||||
trans.sv = UI/Contacts/Swedish.lproj/Localizable.strings
|
||||
trans.tr_TR = UI/Contacts/TurkishTurkey.lproj/Localizable.strings
|
||||
trans.uk = UI/Contacts/Ukrainian.lproj/Localizable.strings
|
||||
trans.zh_TW = UI/Contacts/ChineseTaiwan.lproj/Localizable.strings
|
||||
|
||||
@@ -147,6 +159,7 @@ trans.hr_HR = UI/MainUI/Croatian.lproj/Localizable.strings
|
||||
trans.hu = UI/MainUI/Hungarian.lproj/Localizable.strings
|
||||
trans.is = UI/MainUI/Icelandic.lproj/Localizable.strings
|
||||
trans.it = UI/MainUI/Italian.lproj/Localizable.strings
|
||||
trans.lt = UI/MainUI/Lithuanian.lproj/Localizable.strings
|
||||
trans.mk_MK = UI/MainUI/Macedonian.lproj/Localizable.strings
|
||||
trans.nb_NO = UI/MainUI/NorwegianBokmal.lproj/Localizable.strings
|
||||
trans.nl = UI/MainUI/Dutch.lproj/Localizable.strings
|
||||
@@ -157,7 +170,9 @@ trans.pt_BR = UI/MainUI/BrazilianPortuguese.lproj/Localizable.strings
|
||||
trans.ru = UI/MainUI/Russian.lproj/Localizable.strings
|
||||
trans.sk = UI/MainUI/Slovak.lproj/Localizable.strings
|
||||
trans.sl_SI = UI/MainUI/Slovenian.lproj/Localizable.strings
|
||||
trans.sr = UI/MainUI/Serbian.lproj/Localizable.strings
|
||||
trans.sv = UI/MainUI/Swedish.lproj/Localizable.strings
|
||||
trans.tr_TR = UI/MainUI/TurkishTurkey.lproj/Localizable.strings
|
||||
trans.uk = UI/MainUI/Ukrainian.lproj/Localizable.strings
|
||||
trans.zh_TW = UI/MainUI/ChineseTaiwan.lproj/Localizable.strings
|
||||
|
||||
@@ -179,6 +194,7 @@ trans.hr_HR = UI/Common/Croatian.lproj/Localizable.strings
|
||||
trans.hu = UI/Common/Hungarian.lproj/Localizable.strings
|
||||
trans.is = UI/Common/Icelandic.lproj/Localizable.strings
|
||||
trans.it = UI/Common/Italian.lproj/Localizable.strings
|
||||
trans.lt = UI/Common/Lithuanian.lproj/Localizable.strings
|
||||
trans.mk_MK = UI/Common/Macedonian.lproj/Localizable.strings
|
||||
trans.nb_NO = UI/Common/NorwegianBokmal.lproj/Localizable.strings
|
||||
trans.nl = UI/Common/Dutch.lproj/Localizable.strings
|
||||
@@ -189,7 +205,9 @@ trans.pt_BR = UI/Common/BrazilianPortuguese.lproj/Localizable.strings
|
||||
trans.ru = UI/Common/Russian.lproj/Localizable.strings
|
||||
trans.sk = UI/Common/Slovak.lproj/Localizable.strings
|
||||
trans.sl_SI = UI/Common/Slovenian.lproj/Localizable.strings
|
||||
trans.sr = UI/Common/Serbian.lproj/Localizable.strings
|
||||
trans.sv = UI/Common/Swedish.lproj/Localizable.strings
|
||||
trans.tr_TR = UI/Common/TurkishTurkey.lproj/Localizable.strings
|
||||
trans.uk = UI/Common/Ukrainian.lproj/Localizable.strings
|
||||
trans.zh_TW = UI/Common/ChineseTaiwan.lproj/Localizable.strings
|
||||
|
||||
@@ -211,6 +229,7 @@ trans.hr_HR = UI/AdministrationUI/Croatian.lproj/Localizable.strings
|
||||
trans.hu = UI/AdministrationUI/Hungarian.lproj/Localizable.strings
|
||||
trans.is = UI/AdministrationUI/Icelandic.lproj/Localizable.strings
|
||||
trans.it = UI/AdministrationUI/Italian.lproj/Localizable.strings
|
||||
trans.lt = UI/AdministrationUI/Lithuanian.lproj/Localizable.strings
|
||||
trans.mk_MK = UI/AdministrationUI/Macedonian.lproj/Localizable.strings
|
||||
trans.nb_NO = UI/AdministrationUI/NorwegianBokmal.lproj/Localizable.strings
|
||||
trans.nl = UI/AdministrationUI/Dutch.lproj/Localizable.strings
|
||||
@@ -221,7 +240,9 @@ trans.pt_BR = UI/AdministrationUI/BrazilianPortuguese.lproj/Localizable.strings
|
||||
trans.ru = UI/AdministrationUI/Russian.lproj/Localizable.strings
|
||||
trans.sk = UI/AdministrationUI/Slovak.lproj/Localizable.strings
|
||||
trans.sl_SI = UI/AdministrationUI/Slovenian.lproj/Localizable.strings
|
||||
trans.sr = UI/AdministrationUI/Serbian.lproj/Localizable.strings
|
||||
trans.sv = UI/AdministrationUI/Swedish.lproj/Localizable.strings
|
||||
trans.tr_TR = UI/AdministrationUI/TurkishTurkey.lproj/Localizable.strings
|
||||
trans.uk = UI/AdministrationUI/Ukrainian.lproj/Localizable.strings
|
||||
trans.zh_TW = UI/AdministrationUI/ChineseTaiwan.lproj/Localizable.strings
|
||||
|
||||
@@ -243,6 +264,7 @@ trans.hr_HR = SoObjects/Appointments/Croatian.lproj/Localizable.strings
|
||||
trans.hu = SoObjects/Appointments/Hungarian.lproj/Localizable.strings
|
||||
trans.is = SoObjects/Appointments/Icelandic.lproj/Localizable.strings
|
||||
trans.it = SoObjects/Appointments/Italian.lproj/Localizable.strings
|
||||
trans.lt = SoObjects/Appointments/Lithuanian.lproj/Localizable.strings
|
||||
trans.mk_MK = SoObjects/Appointments/Macedonian.lproj/Localizable.strings
|
||||
trans.nb_NO = SoObjects/Appointments/NorwegianBokmal.lproj/Localizable.strings
|
||||
trans.nl = SoObjects/Appointments/Dutch.lproj/Localizable.strings
|
||||
@@ -253,7 +275,9 @@ trans.pt_BR = SoObjects/Appointments/BrazilianPortuguese.lproj/Localizable.strin
|
||||
trans.ru = SoObjects/Appointments/Russian.lproj/Localizable.strings
|
||||
trans.sk = SoObjects/Appointments/Slovak.lproj/Localizable.strings
|
||||
trans.sl_SI = SoObjects/Appointments/Slovenian.lproj/Localizable.strings
|
||||
trans.sr = SoObjects/Appointments/Serbian.lproj/Localizable.strings
|
||||
trans.sv = SoObjects/Appointments/Swedish.lproj/Localizable.strings
|
||||
trans.tr_TR = SoObjects/Appointments/TurkishTurkey.lproj/Localizable.strings
|
||||
trans.uk = SoObjects/Appointments/Ukrainian.lproj/Localizable.strings
|
||||
trans.zh_TW = SoObjects/Appointments/ChineseTaiwan.lproj/Localizable.strings
|
||||
|
||||
@@ -275,6 +299,7 @@ trans.hr_HR = SoObjects/Contacts/Croatian.lproj/Localizable.strings
|
||||
trans.hu = SoObjects/Contacts/Hungarian.lproj/Localizable.strings
|
||||
trans.is = SoObjects/Contacts/Icelandic.lproj/Localizable.strings
|
||||
trans.it = SoObjects/Contacts/Italian.lproj/Localizable.strings
|
||||
trans.lt = SoObjects/Contacts/Lithuanian.lproj/Localizable.strings
|
||||
trans.mk_MK = SoObjects/Contacts/Macedonian.lproj/Localizable.strings
|
||||
trans.nb_NO = SoObjects/Contacts/NorwegianBokmal.lproj/Localizable.strings
|
||||
trans.nl = SoObjects/Contacts/Dutch.lproj/Localizable.strings
|
||||
@@ -285,7 +310,9 @@ trans.pt_BR = SoObjects/Contacts/BrazilianPortuguese.lproj/Localizable.strings
|
||||
trans.ru = SoObjects/Contacts/Russian.lproj/Localizable.strings
|
||||
trans.sk = SoObjects/Contacts/Slovak.lproj/Localizable.strings
|
||||
trans.sl_SI = SoObjects/Contacts/Slovenian.lproj/Localizable.strings
|
||||
trans.sr = SoObjects/Contacts/Serbian.lproj/Localizable.strings
|
||||
trans.sv = SoObjects/Contacts/Swedish.lproj/Localizable.strings
|
||||
trans.tr_TR = SoObjects/Contacts/TurkishTurkey.lproj/Localizable.strings
|
||||
trans.uk = SoObjects/Contacts/Ukrainian.lproj/Localizable.strings
|
||||
trans.zh_TW = SoObjects/Contacts/ChineseTaiwan.lproj/Localizable.strings
|
||||
|
||||
@@ -307,6 +334,7 @@ trans.hr_HR = SoObjects/Mailer/Croatian.lproj/Localizable.strings
|
||||
trans.hu = SoObjects/Mailer/Hungarian.lproj/Localizable.strings
|
||||
trans.is = SoObjects/Mailer/Icelandic.lproj/Localizable.strings
|
||||
trans.it = SoObjects/Mailer/Italian.lproj/Localizable.strings
|
||||
trans.lt = SoObjects/Mailer/Lithuanian.lproj/Localizable.strings
|
||||
trans.mk_MK = SoObjects/Mailer/Macedonian.lproj/Localizable.strings
|
||||
trans.nb_NO = SoObjects/Mailer/NorwegianBokmal.lproj/Localizable.strings
|
||||
trans.nl = SoObjects/Mailer/Dutch.lproj/Localizable.strings
|
||||
@@ -317,7 +345,9 @@ trans.pt_BR = SoObjects/Mailer/BrazilianPortuguese.lproj/Localizable.strings
|
||||
trans.ru = SoObjects/Mailer/Russian.lproj/Localizable.strings
|
||||
trans.sk = SoObjects/Mailer/Slovak.lproj/Localizable.strings
|
||||
trans.sl_SI = SoObjects/Mailer/Slovenian.lproj/Localizable.strings
|
||||
trans.sr = SoObjects/Mailer/Serbian.lproj/Localizable.strings
|
||||
trans.sv = SoObjects/Mailer/Swedish.lproj/Localizable.strings
|
||||
trans.tr_TR = SoObjects/Mailer/TurkishTurkey.lproj/Localizable.strings
|
||||
trans.uk = SoObjects/Mailer/Ukrainian.lproj/Localizable.strings
|
||||
trans.zh_TW = SoObjects/Mailer/ChineseTaiwan.lproj/Localizable.strings
|
||||
|
||||
@@ -339,6 +369,7 @@ trans.hr_HR = UI/MailPartViewers/Croatian.lproj/Localizable.strings
|
||||
trans.hu = UI/MailPartViewers/Hungarian.lproj/Localizable.strings
|
||||
trans.is = UI/MailPartViewers/Icelandic.lproj/Localizable.strings
|
||||
trans.it = UI/MailPartViewers/Italian.lproj/Localizable.strings
|
||||
trans.lt = UI/MailPartViewers/Lithuanian.lproj/Localizable.strings
|
||||
trans.mk_MK = UI/MailPartViewers/Macedonian.lproj/Localizable.strings
|
||||
trans.nb_NO = UI/MailPartViewers/NorwegianBokmal.lproj/Localizable.strings
|
||||
trans.nl = UI/MailPartViewers/Dutch.lproj/Localizable.strings
|
||||
@@ -349,6 +380,8 @@ trans.pt_BR = UI/MailPartViewers/BrazilianPortuguese.lproj/Localizable.strings
|
||||
trans.ru = UI/MailPartViewers/Russian.lproj/Localizable.strings
|
||||
trans.sk = UI/MailPartViewers/Slovak.lproj/Localizable.strings
|
||||
trans.sl_SI = UI/MailPartViewers/Slovenian.lproj/Localizable.strings
|
||||
trans.sr = UI/MailPartViewers/Serbian.lproj/Localizable.strings
|
||||
trans.sv = UI/MailPartViewers/Swedish.lproj/Localizable.strings
|
||||
trans.tr_TR = UI/MailPartViewers/TurkishTurkey.lproj/Localizable.strings
|
||||
trans.uk = UI/MailPartViewers/Ukrainian.lproj/Localizable.strings
|
||||
trans.zh_TW = UI/MailPartViewers/ChineseTaiwan.lproj/Localizable.strings
|
||||
@@ -31,7 +31,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define __NGDOMELEMENTACTIVESYNC_H__
|
||||
|
||||
#import <DOM/DOMElement.h>
|
||||
#import <DOM/DOMProtocols.h>
|
||||
|
||||
@class NSDictionary;
|
||||
|
||||
|
||||
@@ -30,8 +30,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#import "NGMimeMessage+ActiveSync.h"
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <NGMail/NGMailAddress.h>
|
||||
#import <NGMail/NGMailAddressParser.h>
|
||||
|
||||
@@ -29,16 +29,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#import "NGVCard+ActiveSync.h"
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSTimeZone.h>
|
||||
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
|
||||
#import <NGCards/CardElement.h>
|
||||
|
||||
#import <Contacts/NGVCard+SOGo.h>
|
||||
|
||||
#import <SOGo/NSString+Utilities.h>
|
||||
@@ -46,6 +42,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "NSDate+ActiveSync.h"
|
||||
#include "NSString+ActiveSync.h"
|
||||
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
|
||||
@implementation NGVCard (ActiveSync)
|
||||
|
||||
//
|
||||
@@ -137,7 +138,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
[s appendFormat: @"<JobTitle xmlns=\"Contacts:\">%@</JobTitle>", [o activeSyncRepresentationInContext: context]];
|
||||
|
||||
if ((o = [self preferredEMail]))
|
||||
[s appendFormat: @"<Email1Address xmlns=\"Contacts:\">%@</Email1Address>", o];
|
||||
[s appendFormat: @"<Email1Address xmlns=\"Contacts:\">%@</Email1Address>", [o activeSyncRepresentationInContext: context]];
|
||||
|
||||
|
||||
// Secondary email addresses (2 and 3)
|
||||
@@ -147,7 +148,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
{
|
||||
o = [[emails objectAtIndex: i] flattenedValuesForKey: @""];
|
||||
|
||||
[s appendFormat: @"<Email%dAddress xmlns=\"Contacts:\">%@</Email%dAddress>", i+2, o, i+2];
|
||||
[s appendFormat: @"<Email%dAddress xmlns=\"Contacts:\">%@</Email%dAddress>", i+2, [o activeSyncRepresentationInContext: context], i+2];
|
||||
|
||||
if (i == 1)
|
||||
break;
|
||||
@@ -180,10 +181,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
a = [NSMutableString string];
|
||||
|
||||
if ((o = [homeAdr flattenedValueAtIndex: 2 forKey: @""]))
|
||||
[a appendString: o];
|
||||
[a appendString: [o activeSyncRepresentationInContext: context]];
|
||||
|
||||
if ((o = [homeAdr flattenedValueAtIndex: 1 forKey: @""]) && [o length])
|
||||
[a appendFormat: @"\n%@", o];
|
||||
[a appendFormat: @"\n%@", [o activeSyncRepresentationInContext: context]];
|
||||
|
||||
[s appendFormat: @"<HomeStreet xmlns=\"Contacts:\">%@</HomeStreet>", [a activeSyncRepresentationInContext: context]];
|
||||
|
||||
@@ -211,10 +212,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
a = [NSMutableString string];
|
||||
|
||||
if ((o = [workAdr flattenedValueAtIndex: 2 forKey: @""]))
|
||||
[a appendString: o];
|
||||
[a appendString: [o activeSyncRepresentationInContext: context]];
|
||||
|
||||
if ((o = [workAdr flattenedValueAtIndex: 1 forKey: @""]) && [o length])
|
||||
[a appendFormat: @"\n%@", o];
|
||||
[a appendFormat: @"\n%@", [o activeSyncRepresentationInContext: context]];
|
||||
|
||||
[s appendFormat: @"<BusinessStreet xmlns=\"Contacts:\">%@</BusinessStreet>", [a activeSyncRepresentationInContext: context]];
|
||||
|
||||
@@ -233,7 +234,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Other, less important fields
|
||||
if ((o = [self birthday]))
|
||||
[s appendFormat: @"<Birthday xmlns=\"Contacts:\">%@</Birthday>", [o activeSyncRepresentationInContext: context]];
|
||||
{
|
||||
[s appendFormat: @"<Birthday xmlns=\"Contacts:\">%@</Birthday>",
|
||||
[[o dateByAddingYears: 0 months: 0 days: 0
|
||||
hours: -12 minutes: 0
|
||||
seconds: 0]
|
||||
activeSyncRepresentationInContext: context]];
|
||||
}
|
||||
|
||||
if ((o = [self note]))
|
||||
{
|
||||
|
||||
@@ -30,7 +30,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#import "NSCalendarDate+ActiveSync.h"
|
||||
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSTimeZone.h>
|
||||
|
||||
#define ONE_DAY 86400
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#import "NSData+ActiveSync.h"
|
||||
|
||||
#import <Foundation/NSProcessInfo.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <SOGo/SOGoSystemDefaults.h>
|
||||
|
||||
@@ -38,8 +37,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
||||
#include <wbxml/wbxml.h>
|
||||
#include <wbxml/wbxml_conv.h>
|
||||
#include <wbxml/wbxml_errors.h>
|
||||
|
||||
#define WBXMLDEBUG 0
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define __NSSTRINGACTIVESYNC_H__
|
||||
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#include "SOGoActiveSyncConstants.h"
|
||||
|
||||
@class NSCalendarDate;
|
||||
@@ -53,6 +52,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
- (NSString *) itemid;
|
||||
- (BOOL) acceptsMultiPart;
|
||||
- (NSData *) convertHexStringToBytes;
|
||||
- (NSString *) protocolVersion;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -31,9 +31,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSCalendarDate.h>
|
||||
#include <Foundation/NSData.h>
|
||||
#include <Foundation/NSDate.h>
|
||||
#include <Foundation/NSTimeZone.h>
|
||||
|
||||
#include <SOGo/NSString+Utilities.h>
|
||||
#include <SOGo/NSData+Crypto.h>
|
||||
@@ -46,99 +43,6 @@ static NSArray *easCommandParameters = nil;
|
||||
|
||||
@implementation NSString (ActiveSync)
|
||||
|
||||
//
|
||||
// This is a copy from NSString+XMLEscaping.m from SOPE.
|
||||
// The difference here is that we use wchar_t instead of unichar.
|
||||
// This is needed to get the rigth numeric character reference.
|
||||
// e.g. SMILING FACE WITH OPEN MOUTH
|
||||
// ok: wchar_t -> 😃 wrong: unichar -> � �
|
||||
//
|
||||
// We avoir naming it like the one in SOPE since if the ActiveSync
|
||||
// bundle is loaded, it'll overwrite the one provided by SOPE.
|
||||
//
|
||||
- (NSString *) _stringByEscapingXMLStringUsingCharacters {
|
||||
register unsigned i, len, j;
|
||||
register wchar_t *buf;
|
||||
const wchar_t *chars;
|
||||
unsigned escapeCount;
|
||||
|
||||
if ([self length] == 0) return @"";
|
||||
|
||||
NSData *data = [self dataUsingEncoding:NSUTF32StringEncoding];
|
||||
chars = [data bytes];
|
||||
len = [data length]/4;
|
||||
|
||||
/* check for characters to escape ... */
|
||||
for (i = 0, escapeCount = 0; i < len; i++) {
|
||||
switch (chars[i]) {
|
||||
case '&': case '"': case '<': case '>': case '\r':
|
||||
escapeCount++;
|
||||
break;
|
||||
default:
|
||||
if (chars[i] < 0x20 || chars[i] > 127)
|
||||
escapeCount++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (escapeCount == 0 ) {
|
||||
/* nothing to escape ... */
|
||||
return [[self copy] autorelease];
|
||||
}
|
||||
|
||||
buf = calloc((len + 5) + (escapeCount * 16), sizeof(wchar_t));
|
||||
for (i = 0, j = 0; i < len; i++) {
|
||||
switch (chars[i]) {
|
||||
/* escape special chars */
|
||||
case '\r':
|
||||
buf[j] = '&'; j++; buf[j] = '#'; j++; buf[j] = '1'; j++;
|
||||
buf[j] = '3'; j++; buf[j] = ';'; j++;
|
||||
break;
|
||||
case '&':
|
||||
buf[j] = '&'; j++; buf[j] = 'a'; j++; buf[j] = 'm'; j++;
|
||||
buf[j] = 'p'; j++; buf[j] = ';'; j++;
|
||||
break;
|
||||
case '"':
|
||||
buf[j] = '&'; j++; buf[j] = 'q'; j++; buf[j] = 'u'; j++;
|
||||
buf[j] = 'o'; j++; buf[j] = 't'; j++; buf[j] = ';'; j++;
|
||||
break;
|
||||
case '<':
|
||||
buf[j] = '&'; j++; buf[j] = 'l'; j++; buf[j] = 't'; j++;
|
||||
buf[j] = ';'; j++;
|
||||
break;
|
||||
case '>':
|
||||
buf[j] = '&'; j++; buf[j] = 'g'; j++; buf[j] = 't'; j++;
|
||||
buf[j] = ';'; j++;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* escape big chars */
|
||||
if (chars[i] > 127) {
|
||||
unsigned char nbuf[32];
|
||||
unsigned int k;
|
||||
|
||||
sprintf((char *)nbuf, "&#%i;", (int)chars[i]);
|
||||
for (k = 0; nbuf[k] != '\0'; k++) {
|
||||
buf[j] = nbuf[k];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
else if (chars[i] == 0x9 || chars[i] == 0xA || chars[i] == 0xD || chars[i] >= 0x20) { // ignore any unsupported control character
|
||||
/* nothing to escape */
|
||||
buf[j] = chars[i];
|
||||
j++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
self = [[NSString alloc] initWithBytesNoCopy: buf
|
||||
length: (j*sizeof(wchar_t))
|
||||
encoding: NSUTF32StringEncoding
|
||||
freeWhenDone: YES];
|
||||
|
||||
return [self autorelease];
|
||||
}
|
||||
|
||||
- (NSString *) sanitizedServerIdWithType: (SOGoMicrosoftActiveSyncFolderType) folderType
|
||||
{
|
||||
if (folderType == ActiveSyncEventFolder)
|
||||
@@ -158,7 +62,7 @@ static NSArray *easCommandParameters = nil;
|
||||
|
||||
- (NSString *) activeSyncRepresentationInContext: (WOContext *) context
|
||||
{
|
||||
return [self _stringByEscapingXMLStringUsingCharacters];
|
||||
return [self safeStringByEscapingXMLString: YES];
|
||||
}
|
||||
|
||||
- (int) activeSyncFolderType
|
||||
@@ -231,6 +135,27 @@ static NSArray *easCommandParameters = nil;
|
||||
return o;
|
||||
}
|
||||
|
||||
- (NSString *) protocolVersion
|
||||
{
|
||||
NSMutableArray *components;
|
||||
|
||||
components = [NSMutableArray arrayWithArray: [[[self componentsSeparatedByString: @"?"] lastObject] componentsSeparatedByString: @"&"]];
|
||||
|
||||
// We handle BASE64 encoded queryStrings. See http://msdn.microsoft.com/en-us/library/ee160227%28v=exchg.80%29.aspx for details.
|
||||
if ([components count] == 1)
|
||||
{
|
||||
NSData *queryString;
|
||||
const char* qs_bytes;
|
||||
|
||||
queryString = [[components objectAtIndex: 0] dataByDecodingBase64];
|
||||
qs_bytes = (const char*)[queryString bytes];
|
||||
|
||||
return [NSString stringWithFormat:@"%.1f", (float)((uint8_t)qs_bytes[0]/10)];
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *) _valueForParameter: (NSString *) theParameter
|
||||
{
|
||||
NSMutableArray *components;
|
||||
|
||||
@@ -33,7 +33,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#import "SOGoActiveSyncDispatcher.h"
|
||||
|
||||
#import <DOM/DOMElement.h>
|
||||
#import <DOM/DOMProtocols.h>
|
||||
|
||||
@class WOResponse;
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -27,6 +27,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#include "SOGoActiveSyncConstants.h"
|
||||
@@ -37,6 +38,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@class NSURL;
|
||||
@class NSNumber;
|
||||
|
||||
static volatile BOOL easShouldTerminate = NO;
|
||||
|
||||
@interface SOGoActiveSyncDispatcher : NSObject
|
||||
{
|
||||
NSURL *folderTableURL;
|
||||
@@ -44,7 +47,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
id context;
|
||||
|
||||
NSNumber *syncRequest;
|
||||
|
||||
BOOL debugOn;
|
||||
}
|
||||
|
||||
@@ -62,5 +64,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
- (NSURL *) folderTableURL;
|
||||
- (void) ensureFolderTableExists;
|
||||
- (BOOL) easShouldTerminate;
|
||||
|
||||
@end
|
||||
File diff suppressed because it is too large.
Load diff
@@ -29,20 +29,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "SOGoMailObject+ActiveSync.h"
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSException.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSCharacterSet.h>
|
||||
|
||||
#import <NGCards/iCalCalendar.h>
|
||||
#import <NGCards/iCalDateTime.h>
|
||||
#import <NGCards/iCalEvent.h>
|
||||
#import <NGCards/iCalPerson.h>
|
||||
#import <NGCards/iCalTimeZone.h>
|
||||
|
||||
#import <NGExtensions/NGBase64Coding.h>
|
||||
#import <NGExtensions/NGQuotedPrintableCoding.h>
|
||||
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
#import <NGExtensions/NSString+Encoding.h>
|
||||
#import <NGImap4/NGImap4Envelope.h>
|
||||
@@ -50,6 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#import <NGImap4/NSString+Imap4.h>
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
#import <NGObjWeb/WOApplication.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
|
||||
#import <NGMime/NGMimeBodyPart.h>
|
||||
#import <NGMime/NGMimeFileData.h>
|
||||
@@ -59,8 +59,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#import <NGMail/NGMimeMessage.h>
|
||||
#import <NGMail/NGMimeMessageGenerator.h>
|
||||
|
||||
#import <Mailer/SOGoMailLabel.h>
|
||||
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
|
||||
#include "iCalTimeZone+ActiveSync.h"
|
||||
@@ -70,13 +68,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <Appointments/iCalEntityObject+SOGo.h>
|
||||
#include <Appointments/iCalPerson+SOGo.h>
|
||||
#include <Mailer/NSString+Mail.h>
|
||||
#include <Mailer/SOGoMailBodyPart.h>
|
||||
#include <Mailer/NSString+Mail.h>
|
||||
|
||||
#include <SOGo/SOGoUser.h>
|
||||
#include <SOGo/NSString+Utilities.h>
|
||||
|
||||
#import <Appointments/SOGoAptMailNotification.h>
|
||||
|
||||
|
||||
|
||||
unsigned char strToChar(char a, char b) {
|
||||
char encoder[3] = {'\0','\0','\0'};
|
||||
encoder[0] = a;
|
||||
@@ -423,7 +424,7 @@ struct GlobalObjectId {
|
||||
mimeType = [NGMimeType mimeType: [[thePart contentType] type]
|
||||
subType: [[thePart contentType] subType]
|
||||
parameters: [NSDictionary dictionaryWithObject: @"utf-8" forKey: @"charset"]];
|
||||
[thePart setHeader: mimeType forKey: @"content-type"];
|
||||
[(NGMimeBodyPart *)thePart setHeader: mimeType forKey: @"content-type"];
|
||||
|
||||
fdata = [[NGMimeFileData alloc] initWithBytes: [body bytes]
|
||||
length: [body length]];
|
||||
@@ -484,7 +485,7 @@ struct GlobalObjectId {
|
||||
{
|
||||
encoding = [[theParts objectAtIndex: i ] objectForKey: @"encoding"];
|
||||
charset = [[[theParts objectAtIndex: i ] objectForKey: @"parameterList"] objectForKey: @"charset"];
|
||||
if (encoding && [encoding caseInsensitiveCompare: @"8bit"] == NSOrderedSame &&
|
||||
if (encoding && ([encoding caseInsensitiveCompare: @"7bit"] == NSOrderedSame || [encoding caseInsensitiveCompare: @"8bit"] == NSOrderedSame) &&
|
||||
charset && ![charset caseInsensitiveCompare: @"utf-8"] == NSOrderedSame
|
||||
&& ![charset caseInsensitiveCompare: @"us-ascii"] == NSOrderedSame)
|
||||
{
|
||||
@@ -498,6 +499,91 @@ struct GlobalObjectId {
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
- (BOOL) _isSigned: (NSDictionary *) thePart
|
||||
{
|
||||
NSMutableDictionary *currentPart;
|
||||
NSArray *subparts;
|
||||
NSString *type, *subtype;
|
||||
NSUInteger i;
|
||||
|
||||
type = [[thePart objectForKey: @"type"] lowercaseString];
|
||||
subtype = [[thePart objectForKey: @"subtype"] lowercaseString];
|
||||
|
||||
if ([type isEqualToString: @"multipart"])
|
||||
{
|
||||
if ([subtype isEqualToString: @"signed"])
|
||||
return YES;
|
||||
|
||||
subparts = [thePart objectForKey: @"parts"];
|
||||
for (i = 0; i < [subparts count]; i++)
|
||||
{
|
||||
currentPart = [subparts objectAtIndex: i];
|
||||
if ([self _isSigned: currentPart])
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL) _isSmimeEncrypted: (NSDictionary *) thePart
|
||||
{
|
||||
NSMutableDictionary *currentPart;
|
||||
NSArray *subparts;
|
||||
NSString *type, *subtype;
|
||||
NSUInteger i;
|
||||
|
||||
type = [[thePart objectForKey: @"type"] lowercaseString];
|
||||
subtype = [[thePart objectForKey: @"subtype"] lowercaseString];
|
||||
|
||||
if ([type isEqualToString: @"multipart"])
|
||||
{
|
||||
subparts = [thePart objectForKey: @"parts"];
|
||||
for (i = 0; i < [subparts count]; i++)
|
||||
{
|
||||
currentPart = [subparts objectAtIndex: i];
|
||||
if ([self _isSmimeEncrypted: currentPart])
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
else if ([type isEqualToString: @"application"] && ([subtype isEqualToString: @"pkcs7-mime"] ||
|
||||
[subtype isEqualToString: @"x-pkcs7-mime"]))
|
||||
return YES;
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL) _isPGP: (NSDictionary *) thePart
|
||||
{
|
||||
NSMutableDictionary *currentPart;
|
||||
NSArray *subparts;
|
||||
NSString *type, *subtype, *protocol;
|
||||
NSUInteger i;
|
||||
|
||||
type = [[thePart objectForKey: @"type"] lowercaseString];
|
||||
subtype = [[thePart objectForKey: @"subtype"] lowercaseString];
|
||||
protocol = [[[thePart objectForKey: @"parameterList"] objectForKey: @"protocol"] lowercaseString];
|
||||
|
||||
if ([type isEqualToString: @"multipart"])
|
||||
{
|
||||
if (([protocol isEqualToString: @"application/pgp-signature"] || [protocol isEqualToString: @"application/pgp-encrypted"]))
|
||||
return YES;
|
||||
|
||||
subparts = [thePart objectForKey: @"parts"];
|
||||
for (i = 0; i < [subparts count]; i++)
|
||||
{
|
||||
currentPart = [subparts objectAtIndex: i];
|
||||
if ([self _isPGP: currentPart])
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
else if ([type isEqualToString: @"application"] && [subtype isEqualToString: @"pgp-encrypted"])
|
||||
return YES;
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -522,7 +608,9 @@ struct GlobalObjectId {
|
||||
else if ([type isEqualToString: @"multipart"])
|
||||
*theNativeType = 4;
|
||||
|
||||
if (([subtype isEqualToString: @"signed"] || [subtype isEqualToString: @"pkcs7-mime"] ) && theMimeSupport > 0)
|
||||
if (([self _isSigned: [self bodyStructure]] ||
|
||||
[self _isSmimeEncrypted: [self bodyStructure]] ||
|
||||
[self _isPGP: [self bodyStructure]]) && theMimeSupport > 0)
|
||||
{
|
||||
*theNativeType = 4;
|
||||
isSMIME = YES;
|
||||
@@ -606,6 +694,35 @@ struct GlobalObjectId {
|
||||
}
|
||||
|
||||
|
||||
- (NSString *) _truncateContent: (NSString *) theContent
|
||||
limit: (int) theLimit
|
||||
truncated: (int *) wasTruncated
|
||||
{
|
||||
if ([theContent length] > theLimit)
|
||||
{
|
||||
int i, len;
|
||||
|
||||
theContent = [theContent substringToIndex: theLimit];
|
||||
*wasTruncated = 1;
|
||||
|
||||
// We search for the first "space" character starting from the
|
||||
// end and we truncate the string once more. We do this to avoid
|
||||
// truncating the content in the middle of a XML entity
|
||||
len = theLimit-1;
|
||||
|
||||
for (i = len; i >= 0; i--)
|
||||
{
|
||||
if (isspace([theContent characterAtIndex: i]))
|
||||
break;
|
||||
}
|
||||
|
||||
return [theContent substringToIndex: i];
|
||||
}
|
||||
|
||||
*wasTruncated = 0;
|
||||
return theContent;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -665,7 +782,7 @@ struct GlobalObjectId {
|
||||
iCalCalendar *calendar;
|
||||
NSData *calendarData;
|
||||
|
||||
calendarData = [bodyPart fetchBLOB];
|
||||
calendarData = [bodyPart fetchBLOBWithPeek: YES];
|
||||
calendar = nil;
|
||||
|
||||
NS_DURING
|
||||
@@ -691,17 +808,16 @@ struct GlobalObjectId {
|
||||
NSData *d, *globalObjId;
|
||||
NSArray *attachmentKeys;
|
||||
iCalCalendar *calendar;
|
||||
NSString *p, *subtype;
|
||||
NSString *p;
|
||||
NSMutableString *s;
|
||||
id value;
|
||||
|
||||
int preferredBodyType, mimeSupport, nativeBodyType;
|
||||
int preferredBodyType, mimeSupport, mimeTruncation, nativeBodyType;
|
||||
uint32_t v;
|
||||
|
||||
subtype = [[[self bodyStructure] valueForKey: @"subtype"] lowercaseString];
|
||||
|
||||
preferredBodyType = [[context objectForKey: @"BodyPreferenceType"] intValue];
|
||||
mimeSupport = [[context objectForKey: @"MIMESupport"] intValue];
|
||||
mimeTruncation = [[context objectForKey: @"MIMETruncation"] intValue];
|
||||
|
||||
s = [NSMutableString string];
|
||||
|
||||
@@ -887,7 +1003,7 @@ struct GlobalObjectId {
|
||||
[s appendFormat: @"<GlobalObjId xmlns=\"Email:\">%@</GlobalObjId>", [globalObjId activeSyncRepresentationInContext: context]];
|
||||
|
||||
// We set the right message type - we must set AS version to 14.1 for this
|
||||
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"14.1"])
|
||||
if ([[context objectForKey: @"ASProtocolVersion"] floatValue] >= 14.1)
|
||||
[s appendFormat: @"<MeetingMessageType xmlns=\"Email2:\">%d</MeetingMessageType>", 1];
|
||||
|
||||
[s appendString: @"</MeetingRequest>"];
|
||||
@@ -898,12 +1014,13 @@ struct GlobalObjectId {
|
||||
else
|
||||
{
|
||||
// MesssageClass and ContentClass
|
||||
if ([subtype isEqualToString: @"signed"])
|
||||
if ([self _isSigned: [self bodyStructure]])
|
||||
[s appendFormat: @"<MessageClass xmlns=\"Email:\">%@</MessageClass>", @"IPM.Note.SMIME.MultipartSigned"];
|
||||
else if ([subtype isEqualToString: @"pkcs7-mime"])
|
||||
else if ([self _isSmimeEncrypted: [self bodyStructure]])
|
||||
[s appendFormat: @"<MessageClass xmlns=\"Email:\">%@</MessageClass>", @"IPM.Note.SMIME"];
|
||||
else
|
||||
[s appendFormat: @"<MessageClass xmlns=\"Email:\">%@</MessageClass>", @"IPM.Note"];
|
||||
|
||||
[s appendFormat: @"<ContentClass xmlns=\"Email:\">%@</ContentClass>", @"urn:content-classes:message"];
|
||||
}
|
||||
|
||||
@@ -1007,48 +1124,87 @@ struct GlobalObjectId {
|
||||
AUTORELEASE(content);
|
||||
|
||||
content = [content activeSyncRepresentationInContext: context];
|
||||
len = [content length];
|
||||
truncated = 0;
|
||||
|
||||
len = [content length];
|
||||
// We handle MIMETruncation
|
||||
switch (mimeTruncation)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
content = @"";
|
||||
len = 0; truncated = 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
content = [self _truncateContent: content limit: 4096 truncated: &truncated];
|
||||
len = [content length];
|
||||
break;
|
||||
case 2:
|
||||
content = [self _truncateContent: content limit: 5120 truncated: &truncated];
|
||||
len = [content length];
|
||||
break;
|
||||
case 3:
|
||||
content = [self _truncateContent: content limit: 7168 truncated: &truncated];
|
||||
len = [content length];
|
||||
break;
|
||||
case 4:
|
||||
content = [self _truncateContent: content limit: 10240 truncated: &truncated];
|
||||
len = [content length];
|
||||
break;
|
||||
case 5:
|
||||
content = [self _truncateContent: content limit: 20480 truncated: &truncated];
|
||||
len = [content length];
|
||||
break;
|
||||
case 6:
|
||||
content = [self _truncateContent: content limit: 51200 truncated: &truncated];
|
||||
len = [content length];
|
||||
break;
|
||||
case 7:
|
||||
content = [self _truncateContent: content limit: 102400 truncated: &truncated];
|
||||
len = [content length];
|
||||
break;
|
||||
case 8:
|
||||
default:
|
||||
truncated = 0;
|
||||
}
|
||||
|
||||
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
{
|
||||
[s appendFormat: @"<Body xmlns=\"Email:\">%@</Body>", content];
|
||||
[s appendFormat: @"<BodyTruncated xmlns=\"Email:\">%d</BodyTruncated>", truncated];
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
[s appendString: @"<Body xmlns=\"AirSyncBase:\">"];
|
||||
|
||||
// Set the correct type if client requested text/html but we got text/plain.
|
||||
// For s/mime mails type is always 4 if mimeSupport is 1 or 2.
|
||||
if (preferredBodyType == 2 && nativeBodyType == 1)
|
||||
[s appendString: @"<Type>1</Type>"];
|
||||
else if (([subtype isEqualToString: @"signed"] || [subtype isEqualToString: @"pkcs7-mime"] ) && mimeSupport > 0)
|
||||
else if (([self _isSigned: [self bodyStructure]] ||
|
||||
[self _isSmimeEncrypted: [self bodyStructure]] ||
|
||||
[self _isPGP: [self bodyStructure]]) && mimeSupport > 0)
|
||||
[s appendString: @"<Type>4</Type>"];
|
||||
else
|
||||
[s appendFormat: @"<Type>%d</Type>", preferredBodyType];
|
||||
|
||||
[s appendFormat: @"<Truncated>%d</Truncated>", truncated];
|
||||
[s appendFormat: @"<Preview></Preview>"];
|
||||
|
||||
if (!truncated)
|
||||
{
|
||||
[s appendFormat: @"<Data>%@</Data>", content];
|
||||
[s appendFormat: @"<EstimatedDataSize>%d</EstimatedDataSize>", len];
|
||||
}
|
||||
[s appendFormat: @"<Data>%@</Data>", content];
|
||||
[s appendFormat: @"<EstimatedDataSize>%d</EstimatedDataSize>", len];
|
||||
[s appendString: @"</Body>"];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Attachments -namespace 16
|
||||
attachmentKeys = [self fetchFileAttachmentKeys];
|
||||
|
||||
if ([attachmentKeys count] && !([subtype isEqualToString: @"signed"]))
|
||||
if ([attachmentKeys count] && !([self _isSigned: [self bodyStructure]]))
|
||||
{
|
||||
int i;
|
||||
|
||||
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
[s appendString: @"<Attachments xmlns=\"Email:\">"];
|
||||
else
|
||||
[s appendString: @"<Attachments xmlns=\"AirSyncBase:\">"];
|
||||
@@ -1063,18 +1219,24 @@ struct GlobalObjectId {
|
||||
// FileReference must be a unique identifier across the whole store. We use the following structure:
|
||||
// mail/<foldername>/<message UID/<pathofpart>
|
||||
// mail/INBOX/2
|
||||
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
[s appendFormat: @"<AttName>mail/%@/%@/%@</AttName>", [[[self container] relativeImap4Name] stringByEscapingURL], [self nameInContainer], [value objectForKey: @"path"]];
|
||||
else
|
||||
[s appendFormat: @"<FileReference>mail/%@/%@/%@</FileReference>", [[[self container] relativeImap4Name] stringByEscapingURL], [self nameInContainer], [value objectForKey: @"path"]];
|
||||
|
||||
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
{
|
||||
[s appendFormat: @"<AttMethod>%d</AttMethod>", 1];
|
||||
[s appendFormat: @"<AttSize>%d</AttSize>", [[value objectForKey: @"size"] intValue]];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([[value objectForKey: @"bodyId"] length])
|
||||
{
|
||||
[s appendFormat: @"<ContentId>%@</ContentId>", [[value objectForKey: @"bodyId"] activeSyncRepresentationInContext: context]];
|
||||
[s appendFormat: @"<IsInline>%d</IsInline>", 1];
|
||||
}
|
||||
|
||||
[s appendFormat: @"<Method>%d</Method>", 1]; // See: http://msdn.microsoft.com/en-us/library/ee160322(v=exchg.80).aspx
|
||||
[s appendFormat: @"<EstimatedDataSize>%d</EstimatedDataSize>", [[value objectForKey: @"size"] intValue]];
|
||||
//[s appendFormat: @"<IsInline>%d</IsInline>", 1];
|
||||
@@ -1111,8 +1273,7 @@ struct GlobalObjectId {
|
||||
[s appendFormat: @"</Categories>"];
|
||||
}
|
||||
|
||||
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"14.0"] ||
|
||||
[[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"14.1"])
|
||||
if ([[context objectForKey: @"ASProtocolVersion"] floatValue] >= 14.0)
|
||||
{
|
||||
id value;
|
||||
NSString *reference;
|
||||
@@ -1120,9 +1281,9 @@ struct GlobalObjectId {
|
||||
value = [[self mailHeaders] objectForKey: @"references"];
|
||||
|
||||
if ([value isKindOfClass: [NSArray class]])
|
||||
reference = [[[value objectAtIndex: 0] componentsSeparatedByString: @" "] objectAtIndex: 0];
|
||||
reference = [[[value objectAtIndex: 0] componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] objectAtIndex: 0];
|
||||
else
|
||||
reference = [[value componentsSeparatedByString: @" "] objectAtIndex: 0];
|
||||
reference = [[value componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] objectAtIndex: 0];
|
||||
|
||||
if ([reference length] > 0)
|
||||
[s appendFormat: @"<ConversationId xmlns=\"Email2:\">%@</ConversationId>", [[reference dataUsingEncoding: NSUTF8StringEncoding] activeSyncRepresentationInContext: context]];
|
||||
|
||||
@@ -27,9 +27,11 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#import <NGObjWeb/SoObjectWebDAVDispatcher.h>
|
||||
|
||||
#include <NGObjWeb/SoObject+SoDAV.h>
|
||||
|
||||
#include <NGObjWeb/WEClientCapabilities.h>
|
||||
#include <NGObjWeb/WOContext.h>
|
||||
#include <NGObjWeb/WORequest.h>
|
||||
@@ -37,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
|
||||
|
||||
@interface SoObjectWebDAVDispatcher (ActiveSync)
|
||||
|
||||
- (id)_callObjectMethod:(NSString *)_method inContext:(WOContext *)_ctx;
|
||||
|
||||
@@ -30,12 +30,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#import "iCalAlarm+ActiveSync.h"
|
||||
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <NGExtensions/NSCalendarDate+misc.h>
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
|
||||
#import <NGCards/iCalAlarm.h>
|
||||
#import <NGCards/iCalEvent.h>
|
||||
#import <NGCards/iCalTrigger.h>
|
||||
|
||||
@@ -30,26 +30,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#import "iCalEvent+ActiveSync.h"
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSDate.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSTimeZone.h>
|
||||
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
#import <NGExtensions/NSCalendarDate+misc.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
|
||||
#import <NGCards/iCalCalendar.h>
|
||||
#import <NGCards/iCalDateTime.h>
|
||||
#import <NGCards/iCalPerson.h>
|
||||
#import <NGCards/NSCalendarDate+NGCards.h>
|
||||
#import <NGCards/NSString+NGCards.h>
|
||||
#import <NGCards/iCalCalendar.h>
|
||||
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
@@ -70,7 +63,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
- (int) _attendeeStatus: (iCalPerson *) attendee
|
||||
{
|
||||
int attendee_status;
|
||||
|
||||
|
||||
attendee_status = 5;
|
||||
if ([[attendee partStat] caseInsensitiveCompare: @"ACCEPTED"] == NSOrderedSame)
|
||||
attendee_status = 3;
|
||||
@@ -82,6 +75,29 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
return attendee_status;
|
||||
}
|
||||
|
||||
//
|
||||
// Possible values are:
|
||||
// 0 Free
|
||||
// 1 Tentative
|
||||
// 2 Busy
|
||||
// 3 Out of Office
|
||||
// 4 Working elsewhere
|
||||
//
|
||||
- (int) _busyStatus: (iCalPerson *) attendee
|
||||
{
|
||||
int attendee_status;
|
||||
|
||||
attendee_status = 2;
|
||||
|
||||
if ([[attendee partStat] caseInsensitiveCompare: @"DECLINED"] == NSOrderedSame)
|
||||
attendee_status = 0;
|
||||
else if ([[attendee partStat] caseInsensitiveCompare: @"TENTATIVE"] == NSOrderedSame)
|
||||
attendee_status = 1;
|
||||
|
||||
return attendee_status;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *) activeSyncRepresentationInContext: (WOContext *) context
|
||||
{
|
||||
NSMutableString *s;
|
||||
@@ -152,7 +168,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
o = [organizer cn];
|
||||
if ([o length])
|
||||
[s appendFormat: @"<Organizer_Name xmlns=\"Calendar:\">%@</Organizer_Name>", o];
|
||||
[s appendFormat: @"<Organizer_Name xmlns=\"Calendar:\">%@</Organizer_Name>", [o activeSyncRepresentationInContext: context]];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,7 +206,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
}
|
||||
else
|
||||
{
|
||||
meetingStatus = 0; // appointment
|
||||
meetingStatus = 0; // The event is an appointment, which has no attendees.
|
||||
}
|
||||
|
||||
// This depends on the 'NEEDS-ACTION' parameter.
|
||||
@@ -211,6 +227,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
[s appendFormat: @"<DisallowNewTimeProposal xmlns=\"Calendar:\">%d</DisallowNewTimeProposal>", 1];
|
||||
|
||||
// BusyStatus -- http://msdn.microsoft.com/en-us/library/ee202290(v=exchg.80).aspx
|
||||
[s appendFormat: @"<BusyStatus xmlns=\"Calendar:\">%d</BusyStatus>", [self _busyStatus: attendee]];
|
||||
}
|
||||
else
|
||||
{
|
||||
// If it's a normal event (ie, with no organizer/attendee) or we are the organizer to an event
|
||||
// invitation, we set the busy status to 2 (Busy)
|
||||
[s appendFormat: @"<BusyStatus xmlns=\"Calendar:\">%d</BusyStatus>", 2];
|
||||
}
|
||||
|
||||
@@ -251,7 +273,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// otherwise it'll prevent WP8 phones from sync'ing. See #3028 for details.
|
||||
o = [o activeSyncRepresentationInContext: context];
|
||||
|
||||
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
{
|
||||
[s appendFormat: @"<Body xmlns=\"Calendar:\">%@</Body>", o];
|
||||
[s appendString: @"<BodyTruncated xmlns=\"Calendar:\">0</BodyTruncated>"];
|
||||
@@ -494,7 +516,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
}
|
||||
|
||||
// FIXME: merge with iCalToDo
|
||||
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
{
|
||||
if ((o = [theValues objectForKey: @"Body"]))
|
||||
[self setComment: o];
|
||||
@@ -508,6 +530,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
if ((o = [theValues objectForKey: @"Location"]))
|
||||
[self setLocation: o];
|
||||
|
||||
deltasecs = 0;
|
||||
start = nil;
|
||||
|
||||
if ((o = [theValues objectForKey: @"StartTime"]))
|
||||
{
|
||||
o = [o calendarDate];
|
||||
@@ -515,8 +540,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
oldstart = [start dateTime];
|
||||
[start setTimeZone: tz];
|
||||
|
||||
if (isAllDay)
|
||||
{
|
||||
if (isAllDay)
|
||||
{
|
||||
[start setDate: o];
|
||||
[start setTimeZone: nil];
|
||||
}
|
||||
@@ -527,9 +552,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Calculate delta if start date has been changed.
|
||||
if (oldstart)
|
||||
deltasecs = [[start dateTime ] timeIntervalSinceDate: oldstart] * -1;
|
||||
else
|
||||
deltasecs = 0;
|
||||
deltasecs = [[start dateTime ] timeIntervalSinceDate: oldstart] * -1;
|
||||
}
|
||||
|
||||
if ((o = [theValues objectForKey: @"EndTime"]))
|
||||
|
||||
@@ -37,11 +37,25 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#import <NGCards/iCalEvent.h>
|
||||
#import <NGCards/iCalByDayMask.h>
|
||||
|
||||
#import <NGCards/iCalDateTime.h>
|
||||
#import <NGCards/iCalTimeZone.h>
|
||||
|
||||
#import "NSCalendarDate+ActiveSync.h"
|
||||
#import "NSDate+ActiveSync.h"
|
||||
|
||||
@implementation iCalRecurrenceRule (ActiveSync)
|
||||
|
||||
- (NSCalendarDate *) _adjustedStartDate
|
||||
{
|
||||
iCalTimeZone *timeZone;
|
||||
|
||||
timeZone = [(iCalDateTime *)[[self parent] firstChildWithTag: @"dtstart"] timeZone];
|
||||
if (timeZone)
|
||||
return [timeZone computedDateForDate: [[self parent] startDate]];
|
||||
else
|
||||
return [[self parent] startDate];
|
||||
}
|
||||
|
||||
- (NSString *) activeSyncRepresentationInContext: (WOContext *) context
|
||||
{
|
||||
NSMutableString *s;
|
||||
@@ -90,7 +104,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
{
|
||||
// No byDayMask, we take the event's start date to compute the DayOfWeek
|
||||
// 0 == Sunday, 6 == Saturday
|
||||
v = (1 << [[[self parent] startDate] dayOfWeek]);
|
||||
v = (1 << [[self _adjustedStartDate] dayOfWeek]);
|
||||
}
|
||||
|
||||
[s appendFormat: @"<Recurrence_DayOfWeek xmlns=\"Calendar:\">%d</Recurrence_DayOfWeek>", v];
|
||||
@@ -139,8 +153,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
{
|
||||
// Simple reccurrence rule of type "Monthly"
|
||||
type = 2;
|
||||
[s appendFormat: @"<Recurrence_DayOfMonth xmlns=\"Calendar:\">%d</Recurrence_DayOfMonth>",
|
||||
(int)[[[self parent] startDate] dayOfMonth]];
|
||||
[s appendFormat: @"<Recurrence_DayOfMonth xmlns=\"Calendar:\">%d</Recurrence_DayOfMonth>", [[self _adjustedStartDate] dayOfMonth]];
|
||||
}
|
||||
}
|
||||
else if ([self frequency] == iCalRecurrenceFrequenceYearly)
|
||||
@@ -176,7 +189,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
}
|
||||
}
|
||||
else
|
||||
type = 5;
|
||||
{
|
||||
type = 5;
|
||||
[s appendFormat: @"<Recurrence_DayOfMonth xmlns=\"Calendar:\">%d</Recurrence_DayOfMonth>", [[self _adjustedStartDate] dayOfMonth]];
|
||||
[s appendFormat: @"<Recurrence_MonthOfYear xmlns=\"Calendar:\">%d</Recurrence_MonthOfYear>", [[self _adjustedStartDate] monthOfYear]];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[s appendFormat: @"<Recurrence_Type xmlns=\"Calendar:\">%d</Recurrence_Type>", type];
|
||||
|
||||
@@ -31,15 +31,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSCalendarDate.h>
|
||||
#include <Foundation/NSData.h>
|
||||
#include <Foundation/NSDate.h>
|
||||
#include <Foundation/NSString.h>
|
||||
|
||||
#import <NGCards/iCalByDayMask.h>
|
||||
#import <NGCards/iCalTimeZonePeriod.h>
|
||||
#import <NGCards/iCalRecurrenceRule.h>
|
||||
|
||||
#import <NGExtensions/NGBase64Coding.h>
|
||||
|
||||
#include "NSData+ActiveSync.h"
|
||||
|
||||
@@ -128,7 +123,7 @@ struct SYSTEMTIME {
|
||||
//uint16_t wStandardYear;
|
||||
struct SYSTEMTIME stStandardDate;
|
||||
//uint16_t wDaylightYear;
|
||||
struct SYSTEMTIME stDaylightDate;
|
||||
struct SYSTEMTIME stDaylightDate = {0,0,0,0,0,0,0,0};
|
||||
|
||||
char standardName[64], daylightName[64];
|
||||
|
||||
@@ -144,13 +139,17 @@ struct SYSTEMTIME {
|
||||
|
||||
period = [self _mostRecentPeriodWithName: @"DAYLIGHT"];
|
||||
if (!period)
|
||||
stStandardDate.wMonth = 0;
|
||||
|
||||
lDaylightBias = (uint32_t) -([period secondsOffsetFromGMT] / 60) - lBias;
|
||||
[period _fillTZDate: &stDaylightDate];
|
||||
//wStandardYear = stStandardDate.wYear;
|
||||
//wDaylightYear = stDaylightDate.wYear;
|
||||
|
||||
{
|
||||
stStandardDate.wMonth = 0;
|
||||
lDaylightBias = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
lDaylightBias = (uint32_t) -([period secondsOffsetFromGMT] / 60) - lBias;
|
||||
[period _fillTZDate: &stDaylightDate];
|
||||
//wStandardYear = stStandardDate.wYear;
|
||||
//wDaylightYear = stDaylightDate.wYear;
|
||||
}
|
||||
|
||||
// We build the timezone
|
||||
[bytes appendBytes: &lBias length: 4];
|
||||
|
||||
@@ -29,14 +29,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#import "iCalToDo+ActiveSync.h"
|
||||
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSDate.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSTimeZone.h>
|
||||
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
|
||||
@@ -131,7 +127,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// otherwise it'll prevent WP8 phones from sync'ing. See #3028 for details.
|
||||
o = [o activeSyncRepresentationInContext: context];
|
||||
|
||||
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
{
|
||||
[s appendFormat: @"<Body xmlns=\"Tasks:\">%@</Body>", o];
|
||||
[s appendString: @"<BodyTruncated xmlns=\"Tasks:\">0</BodyTruncated>"];
|
||||
@@ -165,7 +161,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
[self setSummary: o];
|
||||
|
||||
// FIXME: merge with iCalEvent
|
||||
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
|
||||
{
|
||||
if ((o = [theValues objectForKey: @"Body"]))
|
||||
[self setComment: o];
|
||||
|
||||
+7
-4
@@ -57,8 +57,6 @@ ProxyPreserveHost On
|
||||
# Allow from your-cas-host-addr
|
||||
# </Proxy>
|
||||
|
||||
ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0
|
||||
|
||||
# Enable to use Microsoft ActiveSync support
|
||||
# Note that you MUST have many sogod workers to use ActiveSync.
|
||||
# See the SOGo Installation and Configuration guide for more details.
|
||||
@@ -67,11 +65,15 @@ ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0
|
||||
# http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync \
|
||||
# retry=60 connectiontimeout=5 timeout=360
|
||||
|
||||
ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0
|
||||
|
||||
<Proxy http://127.0.0.1:20000/SOGo>
|
||||
## adjust the following to your configuration
|
||||
## and do not forget to enable the headers module
|
||||
<IfModule headers_module>
|
||||
RequestHeader set "x-webobjects-server-port" "443"
|
||||
# RequestHeader set "x-webobjects-server-name" "yourhostname"
|
||||
# RequestHeader set "x-webobjects-server-url" "https://yourhostname"
|
||||
RequestHeader set "x-webobjects-server-name" "%{HTTP_HOST}e" env=HTTP_HOST
|
||||
RequestHeader set "x-webobjects-server-url" "https://%{HTTP_HOST}e" env=HTTP_HOST
|
||||
|
||||
## When using proxy-side autentication, you need to uncomment and
|
||||
## adjust the following line:
|
||||
@@ -79,6 +81,7 @@ ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0
|
||||
# RequestHeader set "x-webobjects-remote-user" "%{REMOTE_USER}e" env=REMOTE_USER
|
||||
|
||||
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
|
||||
</IfModule>
|
||||
|
||||
AddDefaultCharset UTF-8
|
||||
|
||||
|
||||
@@ -1,36 +1,47 @@
|
||||
https://wiki.inverse.ca/focus/SOGo/CodingStyle
|
||||
https://wiki.inverse.ca/focus/SOGo/D%C3%A9veloppement
|
||||
https://wiki.inverse.ca/focus/PacketFence/Devel/BestPractices
|
||||
Developer's Guide
|
||||
=================
|
||||
:toc: left
|
||||
:icons: font
|
||||
|
||||
////
|
||||
|
||||
This file is part of the SOGo project.
|
||||
|
||||
See docinfo.xml for authors, copyright and license information.
|
||||
|
||||
////
|
||||
|
||||
include::includes/global-attributes.asciidoc[]
|
||||
|
||||
UI and UX
|
||||
---------
|
||||
|
||||
* http://www.google.com/design/spec/material-design/
|
||||
* http://goodui.org/
|
||||
* Try Repeating Your Primary Action instead of showing it just once.
|
||||
* Try Distinct Clickable/Selected Styles instead of blurring them.
|
||||
* Try Undos instead of prompting for confirmation.
|
||||
* Try More Contrast instead of similarity.
|
||||
* Try Exposing Options instead of hiding them.
|
||||
* Try Showing State instead of being state agnostic.
|
||||
* Try Direct Manipulation instead of contextless menus.
|
||||
* Try Exposing Fields instead of creating extra pages.
|
||||
* Try Transitions instead of showing changes instantly.
|
||||
* Try Fewer Borders instead of wasting attention.
|
||||
* Try Designing For Zero Data instead of just data heavy cases.
|
||||
* Try Consistency instead of making people relearn.
|
||||
* Try Conventions instead of reinventing the wheel.
|
||||
* Try Visual Hierarchy instead of dullness.
|
||||
* Try Grouping Related Items instead of disordering.
|
||||
* Try Inline Validation instead of delaying errors.
|
||||
* Try Forgiving Inputs instead of being strict with data.
|
||||
* Try Bigger Click Areas instead of tiny ones.
|
||||
* Try Faster Load Times instead of making people wait.
|
||||
* Try Keyboard Shortcuts instead of buttons only.
|
||||
* Try Upfront Progress instead of starting with a blank.
|
||||
* Try Softer Prompts instead of modal windows.
|
||||
* Try Multifunctional Controls instead of more parts.
|
||||
* Try Icon Labels instead of opening for interpretation.
|
||||
- Try Repeating Your Primary Action instead of showing it just once.
|
||||
- Try Distinct Clickable/Selected Styles instead of blurring them.
|
||||
- Try Undos instead of prompting for confirmation.
|
||||
- Try More Contrast instead of similarity.
|
||||
- Try Exposing Options instead of hiding them.
|
||||
- Try Showing State instead of being state agnostic.
|
||||
- Try Direct Manipulation instead of contextless menus.
|
||||
- Try Exposing Fields instead of creating extra pages.
|
||||
- Try Transitions instead of showing changes instantly.
|
||||
- Try Fewer Borders instead of wasting attention.
|
||||
- Try Designing For Zero Data instead of just data heavy cases.
|
||||
- Try Consistency instead of making people relearn.
|
||||
- Try Conventions instead of reinventing the wheel.
|
||||
- Try Visual Hierarchy instead of dullness.
|
||||
- Try Grouping Related Items instead of disordering.
|
||||
- Try Inline Validation instead of delaying errors.
|
||||
- Try Forgiving Inputs instead of being strict with data.
|
||||
- Try Bigger Click Areas instead of tiny ones.
|
||||
- Try Faster Load Times instead of making people wait.
|
||||
- Try Keyboard Shortcuts instead of buttons only.
|
||||
- Try Upfront Progress instead of starting with a blank.
|
||||
- Try Softer Prompts instead of modal windows.
|
||||
- Try Multifunctional Controls instead of more parts.
|
||||
- Try Icon Labels instead of opening for interpretation.
|
||||
* http://designmodo.com/create-style-guides/
|
||||
* http://uxmyths.com/
|
||||
|
||||
@@ -84,6 +95,7 @@ JavaScript
|
||||
~~~~~~~~~~
|
||||
|
||||
* http://eslint.org/
|
||||
* http://standardjs.com
|
||||
* https://github.com/toddmotto/angularjs-styleguide
|
||||
* https://github.com/angular/material/blob/master/docs/guides/CODING.md
|
||||
* http://jshint.com/
|
||||
@@ -116,6 +128,7 @@ SASS/CSS
|
||||
* http://sixrevisions.com/css/css-methodologies/
|
||||
* https://css-tricks.com/what-a-css-code-review-might-look-like/
|
||||
* http://una.im/classy-css/
|
||||
* http://stylelint.io/
|
||||
|
||||
A `@mixin` is like a stamp: it creates a duplicated version of the property block (optionally) with arguments provided. An `@extend` appends the element you are extending to the property block. It is your "yes, and ___" statement.
|
||||
|
||||
@@ -130,8 +143,23 @@ A `@mixin` is like a stamp: it creates a duplicated version of the property bloc
|
||||
Fonts
|
||||
^^^^^
|
||||
|
||||
* [Mozilla Fira](http://mozilla.github.io/Fira/)
|
||||
* [Material icons](https://www.google.com/design/icons/)
|
||||
* http://mozilla.github.io/Fira/[Mozilla Fira]
|
||||
* https://www.google.com/design/icons/[Material icons]
|
||||
|
||||
Building frontend
|
||||
-----------------
|
||||
|
||||
* Install the latest stable release of https://nodejs.org[Node.js]
|
||||
* Install grunt
|
||||
|
||||
npm install -g grunt-cli
|
||||
npm install -g bower
|
||||
|
||||
* Generate JavaScript files
|
||||
|
||||
cd UI/WebServerResources
|
||||
npm install
|
||||
grunt build
|
||||
|
||||
Version Control
|
||||
---------------
|
||||
@@ -154,7 +182,7 @@ Testing
|
||||
JSON API
|
||||
~~~~~~~~
|
||||
|
||||
One practical way to test the JSON API is to use `curl`. To do so, you need to enable `SOGoTrustProxyAuthentication` and configure HTTP authentifcation in Apache. You can pipe the result to [jq](http://stedolan.github.io/jq/) to nicely format and filter the output:
|
||||
One practical way to test the JSON API is to use `curl`. To do so, you need to enable `SOGoTrustProxyAuthentication` and configure HTTP authentifcation in Apache. You can pipe the result to http://stedolan.github.io/jq/[jq] to nicely format and filter the output:
|
||||
|
||||
curl -u username:password http://localhost/SOGo/so/username/Calendar/calendarslist | jq '.'
|
||||
|
||||
|
||||
@@ -18,13 +18,13 @@ About this Guide
|
||||
|
||||
This guide will walk you through the installation and configuration of
|
||||
the SOGo solution. It also covers the installation and configuration of
|
||||
SOGo ActiveSync support – the solution used to synchronize mobile
|
||||
SOGo ActiveSync support - the solution used to synchronize mobile
|
||||
devices with SOGo.
|
||||
|
||||
The instructions are based on version {release_version} of SOGo.
|
||||
|
||||
The latest version of this guide is available
|
||||
at http://www.sogo.nu/downloads/documentation.html.
|
||||
at http://sogo.nu/downloads/documentation.html.
|
||||
|
||||
Introduction
|
||||
------------
|
||||
@@ -50,8 +50,7 @@ the SOGo Connector and the SOGo Integrator
|
||||
device, or Outlook 2013
|
||||
|
||||
SOGo is developed by a community of developers located mainly in North
|
||||
America and Europe. More information can be found
|
||||
at http://www.sogo.nu/
|
||||
America and Europe. More information can be found at http://sogo.nu/
|
||||
|
||||
Architecture and Compatibility
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -171,21 +170,21 @@ supported by SOGo:
|
||||
|
||||
* Red Hat Enterprise Linux (RHEL) Server 5, 6 and 7
|
||||
* Community ENTerprise Operating System (CentOS) 5, 6 and 7
|
||||
* Debian GNU/Linux 6.0 (Squeeze) to 8.0 (Jessie)
|
||||
* Ubuntu 12.04 (Precise) to 14.04 (Trusty)
|
||||
* Debian GNU/Linux 6.0 (Squeeze), 7.0 (Wheezy) and 8.0 (Jessie)
|
||||
* Ubuntu 12.04 (Precise), 14.04 (Trusty) and 16.04 (Xenial)
|
||||
|
||||
Make sure the required components are started automatically at boot time
|
||||
and that they are running before proceeding with the SOGo configuration.
|
||||
Also make sure that you can install additional packages from your
|
||||
standard distribution. For example, if you are using Red Hat Enterprise
|
||||
Linux 5, you have to be subscribed to the Red Hat Network before
|
||||
Linux 7, you have to be subscribed to the Red Hat Network before
|
||||
continuing with the SOGo software installation.
|
||||
|
||||
NOTE: This document covers the installation of SOGo under RHEL 6.
|
||||
NOTE: This document covers the installation of SOGo under RHEL 7.
|
||||
|
||||
For installation instructions on Debian and Ubuntu, please refer
|
||||
directly to the SOGo website at http://www.sogo.nu/.
|
||||
Under the downloads section, you will find links for installation steps
|
||||
directly to the SOGo website at http://sogo.nu/.
|
||||
Under the _Support_ section, you will find links for installation steps
|
||||
for Debian and Ubuntu.
|
||||
|
||||
Note that once the SOGo packages are installed under Debian and Ubuntu,
|
||||
@@ -196,12 +195,17 @@ Installation
|
||||
|
||||
This section will guide you through the installation of SOGo together
|
||||
with its dependencies. The steps described here apply to an RPM-based
|
||||
installation for a Red Hat or CentOS 6 distribution. Most of these steps
|
||||
installation for a Red Hat or CentOS 7 distribution. Most of these steps
|
||||
should apply to all supported operating systems.
|
||||
|
||||
Software Downloads
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
[NOTE]
|
||||
In order to access the production builds, you need a proper support contract
|
||||
from https://sogo.nu/support/index_new.html#support-plans[Inverse]. Continue
|
||||
with the configuration once you received your username and password.
|
||||
|
||||
SOGo can be installed using the `yum` utility. To do so, first create
|
||||
the `/etc/yum.repos.d/inverse.repo` configuration file with the following
|
||||
content:
|
||||
@@ -209,19 +213,32 @@ content:
|
||||
----
|
||||
[SOGo]
|
||||
name=Inverse SOGo Repository
|
||||
baseurl=http://inverse.ca/rhel-v3/6/$basearch
|
||||
gpgcheck=0
|
||||
baseurl=https://<username>:<password>@packages.inverse.ca/SOGo/release/3/rhel/7/$basearch
|
||||
gpgcheck=1
|
||||
----
|
||||
|
||||
Some of the softwares on which SOGo depends are available from the
|
||||
repository of RepoForge (previously known as RPMforge). To add RepoForge
|
||||
to your packages sources, download and install the appropriate RPM
|
||||
package
|
||||
from http://packages.sw.be/rpmforge-release/.
|
||||
Also make sure you enabled the "rpmforge-extras" repository.
|
||||
[NOTE]
|
||||
Any non-URL safe characters in username/password must be URL-encoded. For
|
||||
example, if your password is `so%go`, you must set the value in your
|
||||
configuration file to `so%25go` - where `%` is encoded to `%25`.
|
||||
|
||||
For more information on using RepoForge,
|
||||
visit http://repoforge.org/use/.
|
||||
Inverse signs its RPM packages with its GPG key. Integrity verification happens
|
||||
all by itself on package installation, all you need to do is first import the
|
||||
key into your rpm keychain:
|
||||
|
||||
----
|
||||
rpm --import "https://pgp.mit.edu/pks/lookup?op=get&search=0xCB2D3A2AA0030E2C"
|
||||
----
|
||||
|
||||
Some of the softwares on which SOGo depends are available from the repository
|
||||
"Extra Packages for Enterprise Linux" (EPEL). To add EPEL to your packages
|
||||
sources, install the following package:
|
||||
|
||||
----
|
||||
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||
----
|
||||
|
||||
For more information on EPEL, visit http://fedoraproject.org/wiki/EPEL/.
|
||||
|
||||
Software Installation
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -370,6 +387,13 @@ Defaults to 10 (minutes).
|
||||
Do not set this too low as child processes replying to clients on a slow
|
||||
internet connection could be killed prematurely.
|
||||
|
||||
|S |WOMaxUploadSize
|
||||
|Parameter used to set the maximum allowed size for content being
|
||||
sent to SOGo using a PUT or a POST call. This can also limit the file
|
||||
attachment size being uploaded to SOGo when composing a mail. The
|
||||
value is in kilobyte. By default, the value is 0, or disabled so no
|
||||
limit will be set.
|
||||
|
||||
|S |SxVMemLimit
|
||||
|Parameter used to set the maximum amount of memory (in
|
||||
megabytes) that a child can use. Reaching that value will force children
|
||||
@@ -499,8 +523,8 @@ In our example, we set the default domain to `acme.com`.
|
||||
meeting participants. Possible values are:
|
||||
|
||||
[options="compact"]
|
||||
* `YES` – to send notifications
|
||||
* `NO` – to not send notifications
|
||||
* `YES` - to send notifications
|
||||
* `NO` - to not send notifications
|
||||
|
||||
Defaults to `NO` when unset.
|
||||
|
||||
@@ -573,6 +597,8 @@ for SOGo. Possible values are:
|
||||
* `Basque`
|
||||
* `BrazilianPortuguese`
|
||||
* `Catalan`
|
||||
* `ChineseTaiwan`
|
||||
* `Croatian`
|
||||
* `Czech`
|
||||
* `Danish`
|
||||
* `Dutch`
|
||||
@@ -583,14 +609,19 @@ for SOGo. Possible values are:
|
||||
* `Hungarian`
|
||||
* `Icelandic`
|
||||
* `Italian`
|
||||
* `Lithuanian`
|
||||
* `Macedonian`
|
||||
* `NorwegianBokmal`
|
||||
* `NorwegianNynorsk`
|
||||
* `Polish`
|
||||
* `Portuguese`
|
||||
* `Russian`
|
||||
* `Slovak`
|
||||
* `SpanishSpain`
|
||||
* `Slovenian`
|
||||
* `SpanishArgentina`
|
||||
* `SpanishSpain`
|
||||
* `Swedish`
|
||||
* `TurkishTurkey`
|
||||
* `Ukrainian`
|
||||
* `Welsh`
|
||||
|
||||
@@ -599,8 +630,8 @@ for SOGo. Possible values are:
|
||||
someone changes his/her own calendar. Possible values are:
|
||||
|
||||
[options="compact"]
|
||||
- `YES` – to send notifications
|
||||
- `NO` – to not send notifications
|
||||
- `YES` - to send notifications
|
||||
- `NO` - to not send notifications
|
||||
|
||||
Defaults to `NO` when unset. User can overwrite this from the calendar
|
||||
properties window.
|
||||
@@ -611,8 +642,8 @@ modification is being done to his/her own calendar by someone else.
|
||||
Possible values are:
|
||||
|
||||
[options="compact"]
|
||||
* `YES` – to send notifications
|
||||
* `NO` – to not send notifications
|
||||
* `YES` - to send notifications
|
||||
* `NO` - to not send notifications
|
||||
|
||||
Defaults to `NO` when unset. User can overwrite this from the calendar
|
||||
properties window.
|
||||
@@ -635,8 +666,8 @@ requiring not authentication) their calendars and address books.
|
||||
Possible values are:
|
||||
|
||||
[options="compact"]
|
||||
* `YES` – to allow them
|
||||
* `NO` – to prevent them from doing so
|
||||
* `YES` - to allow them
|
||||
* `NO` - to prevent them from doing so
|
||||
|
||||
Defaults to `NO` when unset.
|
||||
|
||||
@@ -647,8 +678,8 @@ SOGo.
|
||||
Possible values are:
|
||||
|
||||
[options="compact"]
|
||||
* `YES` – to allow them
|
||||
* `NO` – to prevent them from doing so
|
||||
* `YES` - to allow them
|
||||
* `NO` - to prevent them from doing so
|
||||
|
||||
Defaults to `NO` when unset.
|
||||
|
||||
@@ -678,7 +709,7 @@ Defaults to `NO` when unset.
|
||||
string (attendee completion, address book search, etc.) prior triggering
|
||||
the server-side search operation.
|
||||
|
||||
Defaults to `2` when unset – which means a search operation will be
|
||||
Defaults to `2` when unset - which means a search operation will be
|
||||
triggered on the 3rd typed character.
|
||||
|
||||
|S |SOGoMaximumFailedLoginCount
|
||||
@@ -716,6 +747,25 @@ Default value is `0`, or disabled.
|
||||
|Number of seconds, default to `300` (or 5 minutes). Note that
|
||||
_SOGoCacheCleanupInterval_ must be set to a value equal or higher than
|
||||
_SOGoFailedLoginBlockInterval_.
|
||||
|
||||
|S |SOGoMaximumRequestCount
|
||||
|Parameter used to control the number of requests a user can send to the SOGo
|
||||
server in _SOGoMaximumRequestInterval_ seconds or more. If conditions are met
|
||||
or exceeded, the user will not be able to perform requests on the SOGo server
|
||||
for _SOGoRequestBlockInterval_ seconds and will receive 429 HTTP responses for
|
||||
any requests being made. Default value is 0, or disabled
|
||||
|
||||
|S |SOGoMaximumRequestInterval
|
||||
|Number of seconds, defaults to `30`.
|
||||
|
||||
|S |SOGoRequestBlockInterval
|
||||
|Number of seconds, defaults to 300 (or 5 minutes). Note that _SOGoCacheCleanupInterval_
|
||||
must be set to a value equal or higher than _SOGoRequestBlockInterval_.
|
||||
|
||||
|D |SOGoXSRFValidationEnabled
|
||||
|Parameter used to enable or not XSRF (also known as CSRF) protection in SOGo.
|
||||
Default value is `NO`, or disabled.
|
||||
|
||||
|=======================================================================
|
||||
|
||||
Authentication using LDAP
|
||||
@@ -842,11 +892,11 @@ would be:
|
||||
CNFieldName = cn;
|
||||
IDFieldName = cn;
|
||||
UIDFieldName = cn;
|
||||
baseDN = "ou=groups,dc=inverse,dc=ca”;
|
||||
baseDN = "ou=groups,dc=inverse,dc=ca";
|
||||
bindDN = "cn=sogo,ou=services,dc=inverse,dc=ca";
|
||||
bindPassword = zot;
|
||||
canAuthenticate = YES;
|
||||
displayName = “Inverse Groups”;
|
||||
displayName = "Inverse Groups";
|
||||
hostname = ldap://127.0.0.1:389;
|
||||
id = inverse_groups;
|
||||
isAddressBook = YES;
|
||||
@@ -858,7 +908,7 @@ source:
|
||||
|
||||
[cols="^3,>47,50a"]
|
||||
|=======================================================================
|
||||
.34+|D <|SOGoUserSources
|
||||
.36+|D <|SOGoUserSources
|
||||
|Parameter used to set the LDAP and/or SQL sources used for
|
||||
authentication and global address books. Multiple sources can be
|
||||
specified as an array of dictionaries. A dictionary that defines an LDAP
|
||||
@@ -868,7 +918,7 @@ source can contain the following values:
|
||||
|The type of this user source, set to ldap` for an LDAP source.
|
||||
|
||||
|id
|
||||
|The identification name of the LDAP repository. This must be unique –
|
||||
|The identification name of the LDAP repository. This must be unique -
|
||||
even when using multiple domains.
|
||||
|
||||
|CNFieldName
|
||||
@@ -887,7 +937,8 @@ table.
|
||||
|
||||
|MailFieldNames
|
||||
|An array of fields that returns the user's email addresses (defaults to
|
||||
`mail` when unset).
|
||||
`mail` when unset). Note that SOGo will always automatically strip the
|
||||
protocol value from the attribute if the attribute name is `proxyAddresses`.
|
||||
|
||||
|SearchFieldNames
|
||||
|An array of fields to to match against the search string when filtering
|
||||
@@ -934,8 +985,8 @@ be marked as busy the first time it is booked.
|
||||
EOQualifier. The following operators are supported:
|
||||
|
||||
[options="compact"]
|
||||
* `<>` – inequality operator
|
||||
* `=` – equality operator
|
||||
* `<>` - inequality operator
|
||||
* `=` - equality operator
|
||||
|
||||
Multiple qualifiers can be joined by using `OR` and `AND`, they can also
|
||||
be grouped together by using parenthesis. Attribute values should be
|
||||
@@ -1035,6 +1086,10 @@ not work for entries in this source and thus, freebusy lookups.
|
||||
|If set as an address book, the human identification name of the LDAP
|
||||
repository
|
||||
|
||||
|listRequiresDot (optional)
|
||||
|If set to `YES`, listing of this LDAP source is only possible when performing a search (respecting the SOGoSearchMinimumWordLength parameter) or when explicitely typing a single dot.
|
||||
Defaults to `YES` when unset.
|
||||
|
||||
|ModulesConstraints (optional)
|
||||
|Limits the access of any module through a constraint based on an LDAP
|
||||
attribute; must be a dictionary with keys `Mail`, and/or `Calendar`,
|
||||
@@ -1107,6 +1162,7 @@ LDAP Attributes Indexing
|
||||
To ensure proper performance of the SOGo application, the following LDAP
|
||||
attributes must be fully indexed:
|
||||
|
||||
[options="compact"]
|
||||
* givenName
|
||||
* cn
|
||||
* mail
|
||||
@@ -1302,7 +1358,7 @@ If you want to test the IdP-initiated logout using SimpleSAMLphp, you can do so
|
||||
the following URL:
|
||||
|
||||
----
|
||||
https://idp.example.org/simplesaml/saml2/idp/SingleLogoutService.php?ReturnTo=www.sogo.nu
|
||||
https://idp.example.org/simplesaml/saml2/idp/SingleLogoutService.php?ReturnTo=sogo.nu
|
||||
----
|
||||
|
||||
In order to relay authentication information to your IMAP server and if
|
||||
@@ -1324,12 +1380,35 @@ supported, such as MySQL and Oracle.
|
||||
First, make sure that your PostgreSQL server has TCP/IP connections
|
||||
support enabled.
|
||||
|
||||
[TIP]
|
||||
===============================
|
||||
SOGo stores the database hostname together with table references inside
|
||||
several database tables. To prevent possible future issues when moving
|
||||
the database to another host, it is best practice to add a local alias name to
|
||||
your `/etc/hosts` file, and using this in `/etc/sogo/sogo.conf` instead of the
|
||||
actual name of your server or localhost. When the database host name changes,
|
||||
you can now simply change the hosts file instead of updating several table
|
||||
columns replacing the old hostname. An example entry for `/etc/hosts` when
|
||||
running the database on the same host, registering `127.0.0.1` not only for
|
||||
`localhost`, but also the `db-alias` alias:
|
||||
|
||||
127.0.0.1 localhost db-alias
|
||||
|
||||
In the SOGo configuration, use the alias name instead of the real IP address or
|
||||
host name, for example
|
||||
|
||||
----
|
||||
SOGoProfileURL =
|
||||
"postgresql://sogo:sogo@db-alias:5432/sogo/sogo_user_profile";
|
||||
----
|
||||
===============================
|
||||
|
||||
Create the database user and schema using the following commands:
|
||||
|
||||
----
|
||||
su – postgres
|
||||
createuser --no-superuser --no-createdb –-no-createrole \
|
||||
–-encrypted --pwprompt sogo
|
||||
su - postgres
|
||||
createuser --no-superuser --no-createdb --no-createrole \
|
||||
--encrypted --pwprompt sogo
|
||||
(specify “sogo” as password)
|
||||
createdb -O sogo sogo
|
||||
----
|
||||
@@ -1384,9 +1463,46 @@ _SOGoEnableEMailAlarms_ is set to `YES`. For PostgreSQL, the database
|
||||
URL could be set to something like:
|
||||
`postgresql://sogo:sogo@localhost:5432/sogo/sogo_alarms_folder`
|
||||
|
||||
|S |OCSStoreURL
|
||||
|Parameter used to set the database URL so that SOGo can use to store
|
||||
all content data. You must also set `OCSAclURL` and `OCSCacheFolderURL`
|
||||
if you set this parameter. Using these parameters will allow SOGo to use
|
||||
a total of nine database tables - and prevent SOGo from creating three
|
||||
database tables per collection.
|
||||
|
||||
For PostgresSQL, set the database URL to something like:
|
||||
`postgresql://sogo:@localhost:5432/sogo/sogo_store`.
|
||||
|
||||
|S |OCSAclURL
|
||||
|Parameter used to set the database URL so that SOGo can use to store
|
||||
all ACL data. You must also set `OCSStoreURL` and `OCSCacheFolderURL`
|
||||
if you set this parameter.
|
||||
|
||||
For PostgresSQL, set the database URL to something like:
|
||||
`postgresql://sogo:@localhost:5432/sogo/sogo_acl`.
|
||||
|
||||
|S |OCSCacheFolderURL
|
||||
|Parameter used to set the database URL so that SOGo can use to store
|
||||
all cache data. You must also set `OCSStoreURL` and `OCSAclURL`
|
||||
if you set this parameter.
|
||||
|
||||
For PostgresSQL, set the database URL to something like:
|
||||
`postgresql://sogo:@localhost:5432/sogo/sogo_cache_folder`.
|
||||
|
||||
See the "EMail reminders" section in this document for more information.
|
||||
|=======================================================================
|
||||
|
||||
|
||||
[NOTE]
|
||||
Any non-URL safe characters in username/password must be URL-encoded.
|
||||
For example, if your SOGo database password is `so%go`, you must set
|
||||
the value in your preferences to `so%25go` - where `%` is encoded
|
||||
to `%25`.
|
||||
|
||||
In addition to the seven tables described above, two other tables get
|
||||
created in the database: `sogo_quick_appointment` and `sogo_quick_contact`
|
||||
which store calendar and contact information.
|
||||
|
||||
If you're using MySQL, make sure in your `my.cnf` file you have:
|
||||
|
||||
----
|
||||
@@ -1402,6 +1518,72 @@ default-character-set=utf8
|
||||
default-character-set=utf8
|
||||
----
|
||||
|
||||
MySQL complete Unicode compliance
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
By default MySQL only supports a subset of UTF-8, meaning that characters such
|
||||
as emoji are not handled properly. Some extra steps at installation can be
|
||||
undertaken to leverage full Unicode support under MySQL.
|
||||
|
||||
IMPORTANT: Switching to complete Unicode compliance on an already-deployed SOGo
|
||||
is out of scope of this document, as it would typically involve delicate manual
|
||||
operations on the database system.
|
||||
|
||||
Requirements:
|
||||
|
||||
* MySQL >= 5.5
|
||||
* SOGo >= 3.1.0
|
||||
|
||||
Strongly suggested MySQL configuration settings (innodb* parameters are
|
||||
mandatory):
|
||||
|
||||
----
|
||||
[client]
|
||||
default-character-set = utf8mb4
|
||||
|
||||
[mysql]
|
||||
default-character-set = utf8mb4
|
||||
|
||||
[mysqld]
|
||||
character-set-client-handshake = FALSE
|
||||
character-set-server = utf8mb4
|
||||
collation-server = utf8mb4_unicode_ci
|
||||
innodb_file_per_table = TRUE
|
||||
innodb_file_format = barracuda
|
||||
innodb_large_prefix = TRUE
|
||||
----
|
||||
|
||||
CAUTION: Changing InnoDB parameters on an already deployed database server can
|
||||
cause severe data loss. Do not blindly edit MySQL parameters without reading
|
||||
and understanding the implication of such changes.
|
||||
|
||||
A parameter must be added to `sogo.conf` to turn on complete Unicode
|
||||
compliance:
|
||||
|
||||
----
|
||||
MySQL4Encoding = "utf8mb4";
|
||||
----
|
||||
|
||||
SOGo automatically creates missing database tables on start but slightly
|
||||
different table creation parameters are needed for complete Unicode compliance;
|
||||
meaning that before SOGo runs for the first time, all database tables must
|
||||
already exist. A MySQL script to achieve just that is provided in the SOGo
|
||||
distribution under `Scripts/mysql-utf8mb4.sql` and you can deploy it with
|
||||
a command such as:
|
||||
|
||||
----
|
||||
mysql -hHOST -uUSER -p -D SOGO < Scripts/mysql-utf8mb4.sql
|
||||
----
|
||||
|
||||
Where `HOST`, `USER` and `SOGO` are your MySQL host, username and database name
|
||||
respectively.
|
||||
|
||||
Once SOGo is running, you can test correctness by creating an event such as
|
||||
“Lunch with 🍕 and fries” and seeing it properly displayed in the SOGo
|
||||
calendar.
|
||||
|
||||
Ensure the computer used for the test has emoji fonts installed.
|
||||
|
||||
Authentication using SQL
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -1423,7 +1605,7 @@ source can contain the following values:
|
||||
|The type of this user source, set to `sql` for a SQL source.
|
||||
|
||||
|id
|
||||
|The identification name of the SQL repository. This must be unique –
|
||||
|The identification name of the SQL repository. This must be unique -
|
||||
even when using multiple domains.
|
||||
|
||||
|viewURL
|
||||
@@ -1431,14 +1613,14 @@ even when using multiple domains.
|
||||
present. Required columns are:
|
||||
|
||||
[options="compact"]
|
||||
* `c_uid`: will be used for authentication – it's a username or
|
||||
* `c_uid`: will be used for authentication - it's a username or
|
||||
username@domain.tld
|
||||
* `c_name`: will be used to uniquely identify entries – which can be
|
||||
* `c_name`: will be used to uniquely identify entries - which can be
|
||||
identical to `c_uid`
|
||||
* `c_password`: password of the user, plain text, crypt, md5 or sha
|
||||
encoded
|
||||
* `c_cn`: the user's common name
|
||||
* mail : the user's email address
|
||||
* `mail`: the user's email address
|
||||
|
||||
Other columns can exist and will actually be mapped automatically if
|
||||
they have the same name as popular LDAP attributes (such as `givenName`,
|
||||
@@ -1484,8 +1666,10 @@ repository.
|
||||
authentication usernames (defaults to `c_uid` when unset).
|
||||
|
||||
|MailFieldNames (optional)
|
||||
|Aan array of fields that specifies the column names that hold
|
||||
|An array of fields that specifies the column names that hold
|
||||
additional email addresses (beside the `mail` column) for each user.
|
||||
Values must be unique and not appear in more than one column.
|
||||
Space-separated values allowed in all *additional* columns (besides in `mail`).
|
||||
|
||||
|IMAPHostFieldName (optional)
|
||||
|The field that returns the IMAP hostname for the user.
|
||||
@@ -1539,14 +1723,14 @@ SOGoUserSources =
|
||||
|
||||
Certain database columns must be present in the view/table, such as:
|
||||
|
||||
* `c_uid` – will be used for authentication – it's the username
|
||||
* `c_uid` - will be used for authentication - it's the username
|
||||
or username@domain.tld
|
||||
* `c_name` – which can be identical to `c_uid` – will be used to
|
||||
* `c_name` - which can be identical to `c_uid` - will be used to
|
||||
uniquely identify entries
|
||||
* `c_password` – password of the user, plain-text, md5 or sha encoded
|
||||
* `c_password` - password of the user, plain-text, md5 or sha encoded
|
||||
for now
|
||||
* `c_cn` – the user's common name – such as "John Doe"
|
||||
* `mail` – the user's mail address
|
||||
* `c_cn` - the user's common name - such as "John Doe"
|
||||
* `mail` - the user's mail address
|
||||
|
||||
Note that groups are currently not supported for SQL-based
|
||||
authentication sources.
|
||||
@@ -1566,8 +1750,8 @@ The following table describes the related parameters.
|
||||
are:
|
||||
|
||||
[options="compact"]
|
||||
* `sendmail` – to use the sendmail binary
|
||||
* `smtp` – to use the SMTP protocol
|
||||
* `sendmail` - to use the sendmail binary
|
||||
* `smtp` - to use the SMTP protocol
|
||||
|
||||
|D |SOGoSMTPServer
|
||||
|The DNS name or IP address of the SMTP server used when
|
||||
@@ -1767,6 +1951,11 @@ behaviour of SOGo.
|
||||
|
||||
Defaults to `SOGo` when unset.
|
||||
|
||||
|S |SOGoHelpURL
|
||||
|Parameter used to define the URL to online help for SOGo. When set,
|
||||
an additional icon will appear near the logout button in SOGo's
|
||||
web interface. The URL will always be open in a separate page.
|
||||
|
||||
|U |SOGoLoginModule
|
||||
|Parameter used to specify which module to show after login. Possible
|
||||
values are:
|
||||
@@ -1805,7 +1994,17 @@ interface)
|
||||
|Parameter used to specify the default order of the columns from the
|
||||
SOGo webmail interface. The parameter is an array, for example:
|
||||
|
||||
SOGoMailListViewColumnsOrder = (Flagged, Attachment, Priority, From, Subject, Unread, Date, Size);
|
||||
`SOGoMailListViewColumnsOrder = (Flagged, Attachment, Priority, From, Subject, Unread, Date, Size);`
|
||||
|
||||
|D |SOGoExternalAvatarsEnabled
|
||||
|Parameter used to enable fetching of avatars from remote services.
|
||||
|
||||
Defaults to `YES` when unset.
|
||||
|
||||
|U |SOGoGravatarEnabled
|
||||
|Parameter used to activate fetching of avatars from http://gravatar.com/[Gravatar].
|
||||
|
||||
Defaults to `YES` when unset.
|
||||
|
||||
|D |SOGoVacationEnabled
|
||||
|Parameter used to activate the edition from the preferences window of a
|
||||
@@ -1822,6 +2021,33 @@ message expiration.
|
||||
See the _Cronjob — Vacation messages expiration_ section below for
|
||||
details.
|
||||
|
||||
|D |SOGoVacationDefaultSubject
|
||||
|Parameter used to define a default vacation subject if user don't specify a
|
||||
custom subject.
|
||||
|
||||
Defaults to the characters "Auto: " followed by the original subject when unset,
|
||||
as stated by RFC 5230.
|
||||
|
||||
|D |SOGoVacationHeaderTemplateFile
|
||||
|Parameter used to specify the path of a text file whose content must be
|
||||
prepended to the user's vacation message. For example:
|
||||
|
||||
`SOGoVacationHeaderTemplateFile = /etc/sogo/autoresponder.header.txt;`
|
||||
|
||||
The following template variables can appear in the content:
|
||||
|
||||
[options="compact"]
|
||||
* `%{username}`
|
||||
* `%{daysBetweenResponse}`
|
||||
|
||||
|D |SOGoVacationFooterTemplateFile
|
||||
|Parameter used to specify the path of a text file whose content must be
|
||||
appended to the user's vacation message. For example:
|
||||
|
||||
`SOGoVacationFooterTemplateFile = /etc/sogo/autoresponder.footer.txt;`
|
||||
|
||||
See `SOGoVacationHeaderTemplateFile` for available template variables.
|
||||
|
||||
|D |SOGoForwardEnabled
|
||||
|Parameter used to activate the edition from the preferences window of a
|
||||
forwarding email address. Requires Sieve script support on the IMAP
|
||||
@@ -1842,6 +2068,11 @@ host.
|
||||
|
||||
Defaults to `NO` when unset.
|
||||
|
||||
|U |SOGoSieveFilters
|
||||
|Parameter used to define initial Sieve scripts for users. The user
|
||||
can still modify the scripts and the initial values will be written
|
||||
to the Sieve server upon first login.
|
||||
|
||||
|D |SOGoMailPollingIntervals
|
||||
|Parameter used to define the mail polling intervals (in minutes)
|
||||
available to the user. The parameter is an array that can contain the
|
||||
@@ -2099,7 +2330,7 @@ be put under `~sogo/GNUstep/Library/SOGo/Templates/PreferencesUI/`.
|
||||
and the follow keys are supported: `vendor` (which must be set to "generic"
|
||||
for now), `junkEmailAddress` which sets the email address to whom SOGo will
|
||||
send junk mails to, `notJunkEmailAddress` which sets the email address to
|
||||
whome SOGo will send non-junk mails to and `limit`, which is an integer value
|
||||
whom SOGo will send non-junk mails to and `limit`, which is an integer value
|
||||
and sets the maximum number of mails that will be attached to a
|
||||
junk/not junk report sent by SOGo. Example: `SOGoMailJunkSettings = {
|
||||
vendor = "generic"; junkEmailAddress = "spam@foo.com";
|
||||
@@ -2278,7 +2509,7 @@ RequestHeader set "x-webobjects-server-url" "http://yourhostname"
|
||||
You may consider enabling SSL on top of this current installation to
|
||||
secure access to your SOGo installation.
|
||||
|
||||
See http://httpd.apache.org/docs/2.2/ssl/ for details.
|
||||
See http://httpd.apache.org/docs/2.4/ssl/ for details.
|
||||
|
||||
You might also have to adjust the configuration if you have SELinux
|
||||
enabled.
|
||||
@@ -2293,13 +2524,13 @@ Starting Services
|
||||
Once SOGo if fully installed and configured, start the services using
|
||||
the following command:
|
||||
|
||||
service sogod start
|
||||
systemctl start sogod.service
|
||||
|
||||
You may verify using thechkconfigcommand that the SOGo service is
|
||||
automatically started at boot time. Restart the Apache service since
|
||||
You may verify using the `systemctl is-enabled sogod` command that the SOGo
|
||||
service is automatically started at boot time. Restart the Apache service since
|
||||
modules and configuration files were added:
|
||||
|
||||
service httpd restart
|
||||
systemctl restart httpd.service
|
||||
|
||||
Finally, you should also make sure that the `memcached` service is
|
||||
started and that it is also automatically started at boot time.
|
||||
@@ -2328,11 +2559,11 @@ If your mail server requires use of SMTP AUTH, specify a credential file
|
||||
using `-p /path/to/credFile`. This file should contain the username and
|
||||
password, separated by a colon (`username:password`)
|
||||
|
||||
_Cronjob_ — Vacation messages expiration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
_Cronjob_ — Vacation messages activation and expiration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
When vacation messages are enabled (see the parameter
|
||||
_SOGoVacationEnabled_), users can set an expiration date to messages
|
||||
_SOGoVacationEnabled_), users can set an activation or expiration date to messages
|
||||
auto-reply. For this feature to work, you must run a _cronjob_ under the
|
||||
"sogo" user.
|
||||
|
||||
@@ -2346,7 +2577,7 @@ contain the username and password, separated by a colon
|
||||
The _cronjob_ should look like this:
|
||||
|
||||
----
|
||||
0 0 * * * sogo /usr/sbin/sogo-tool expire-autoreply -p /etc/sogo/sieve.creds
|
||||
0 0 * * * sogo /usr/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds
|
||||
----
|
||||
|
||||
Managing User Accounts
|
||||
@@ -2643,7 +2874,7 @@ your site. However, be aware that in order to use the SOGo Integrator
|
||||
plug in, you will need to repackage it with specific modifications.
|
||||
Please refer to the documentation published online:
|
||||
|
||||
http://www.sogo.nu/downloads/documentation.html
|
||||
http://sogo.nu/downloads/documentation.html
|
||||
|
||||
If you only use the SOGo Connector plug in, you can still easily access
|
||||
your data.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
Mobile Devices Configuration Guide
|
||||
==================================
|
||||
:toc: left
|
||||
:icons: font
|
||||
|
||||
////
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
Mozilla Thunderbird Configuration Guide
|
||||
=======================================
|
||||
:toc: left
|
||||
:icons: font
|
||||
|
||||
////
|
||||
|
||||
@@ -61,9 +63,8 @@ Mozilla Thunderbird
|
||||
|
||||
Mozilla Thunderbird is the official front end client of SOGo.
|
||||
|
||||
Mozilla Thunderbird version 2, 3.1, 10 ESR (Extended Support Release),
|
||||
17 ESR, 24 and 31 are supported and it is recommended to use version 31 of
|
||||
Thunderbird.
|
||||
Mozilla Thunderbird versions 31, 38, 45 and above are supported
|
||||
and it is recommended to use the latest version of Thunderbird.
|
||||
|
||||
In order to download and install Mozilla Thunderbird, please visit:
|
||||
|
||||
@@ -72,33 +73,16 @@ https://www.mozilla.org/en-US/thunderbird/organizations/all-esr.html
|
||||
Mozilla Lightning
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
When using version 24 or 31 of Thunderbird, you can use the latest version of
|
||||
Mozilla Lightning. Use the Add-ons manager of Thunderbird or visit:
|
||||
When using Thunderbird, you can use the latest version of Mozilla
|
||||
Lightning. Use the Add-ons manager of Thunderbird or visit:
|
||||
|
||||
https://addons.mozilla.org/en-US/thunderbird/addon/lightning/
|
||||
|
||||
When using version 17 ESR of Thunderbird, you can use Mozilla Lightning
|
||||
version 1.9.1. In order to download the extension, please visit:
|
||||
|
||||
https://addons.mozilla.org/en-US/thunderbird/addon/lightning/versions/1.9.1
|
||||
|
||||
For Thunderbird 2 and 3.1, you need the _Inverse Edition_of Mozilla
|
||||
Lightning. It provides back ported features, bug fixes and security
|
||||
fixes from the current development version of Mozilla Lightning. For
|
||||
Thunderbird 2, it is based on release version 0.9 of Lightning. For
|
||||
Thunderbird 3.1, it is based on 1.0b2.
|
||||
|
||||
In order to download and install Mozilla Lightning – Inverse Edition for
|
||||
Thunderbird 2 or 3.1, please visit:
|
||||
|
||||
http://www.sogo.nu/downloads/frontends.html
|
||||
|
||||
SOGo Connector and SOGo Integrator
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The SOGo Connector and Integrator extensions are provided to perfect the
|
||||
integration of Mozilla Thunderbird 2, 3.1, 10 ESR, 17 ESR, 24 and 31 with
|
||||
the SOGo groupware solution.
|
||||
integration of Mozilla Thunderbird with the SOGo groupware solution.
|
||||
|
||||
First of all, the SOGo Connector extension transforms Thunderbird into a
|
||||
full DAV client for groupware servers such as SOGo, eGroupware or
|
||||
@@ -136,7 +120,7 @@ extensions, please visit:
|
||||
http://www.sogo.nu/downloads/frontends.html
|
||||
|
||||
Prior to installing the SOGo Integrator extension, you should read the
|
||||
following chapter – _SOGo Integrator Customization_.
|
||||
following chapter - _SOGo Integrator Customization_.
|
||||
|
||||
SOGo Integrator Customization
|
||||
-----------------------------
|
||||
@@ -157,7 +141,7 @@ the same user name used to connect to the first email server configured
|
||||
in Thunderbird. It is a current limitation but it will fit nearly all
|
||||
configurations out there.
|
||||
|
||||
For testing purpose, you are strongly recommended to create and
|
||||
For testing purpose, it is strongly recommended to create and
|
||||
configure an additional user profile for Thunderbird. This is for two
|
||||
reasons. The first is because of the limitation mentioned above. The
|
||||
second is because the Integrator will synchronize your personal address
|
||||
@@ -168,7 +152,7 @@ you may want to make a copy of that address book beforehand.
|
||||
The second part requires editing one file in the extension file sub tree
|
||||
to specify where the SOGo server is located. This is done by hand. In an
|
||||
enterprise environment, this step is only required once per release
|
||||
since the updates are expected to propagate automatically.
|
||||
since the updates are expected to propagate automatically.
|
||||
|
||||
Uncompress (using a ZIP or jar tool) the SOGo Integrator XPI and locate
|
||||
the following file:
|
||||
@@ -195,7 +179,7 @@ if the SOGo server is accessible from the following URL:
|
||||
|
||||
Note that if you changed the `x-webobjects-server-url` configuration
|
||||
setting from your HTTP server configuration file for SOGo, the
|
||||
value *must* match the one you specify in `isi:updateURL` – even the
|
||||
value *must* match the one you specify in `isi:updateURL` - even the
|
||||
port number.
|
||||
|
||||
Moreover, you *must* change the value of the
|
||||
@@ -216,7 +200,7 @@ In this section, you will learn how to install and configure the SOGo
|
||||
Update Server.
|
||||
|
||||
The SOGo Update Server can be used to automatically install or uninstall
|
||||
Mozilla Thunderbird extensions, push user settings and more – all from a
|
||||
Mozilla Thunderbird extensions, push user settings and more - all from a
|
||||
central place managed by system administrators.
|
||||
|
||||
Installation
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
Native Microsoft Outlook Configuration Guide
|
||||
============================================
|
||||
:toc: left
|
||||
:icons: font
|
||||
|
||||
////
|
||||
|
||||
@@ -142,7 +144,7 @@ to authenticate users. A SOGoUserSources entry to achieve this wold look
|
||||
like this:
|
||||
|
||||
----
|
||||
su – sogo
|
||||
su - sogo
|
||||
defaults write sogod SOGoUserSources '(
|
||||
{
|
||||
CNFieldName = displayName;
|
||||
@@ -245,7 +247,7 @@ http://www.sogo.nu/english/downloads/backend.html.
|
||||
In order to satisfy certain dependencies, you should also add the EPEL
|
||||
source corresponding to your distribution and architecture. More
|
||||
information on this is available here:
|
||||
http://fedoraproject.org/wiki/EPEL – or more specifically,
|
||||
http://fedoraproject.org/wiki/EPEL - or more specifically,
|
||||
http://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F.
|
||||
|
||||
Once ready, install the OpenChange packages on top of an existing SOGo
|
||||
@@ -319,11 +321,11 @@ disable the upstart check. For more details, refer to:
|
||||
https://wiki.samba.org/index.php/Samba4/InitScript
|
||||
////
|
||||
|
||||
Debian 8 (Jessie) and Ubuntu 14.04 (Trusty Tahr)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Ubuntu 16.04 (Xenial Xerus)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Please follow the instructions from
|
||||
http://www.sogo.nu/english/downloads/backend.html to setup your
|
||||
https://sogo.nu/download.html to setup your
|
||||
apt sources.
|
||||
|
||||
Then install Samba 4 on top of an existing SOGo
|
||||
@@ -720,7 +722,7 @@ Adding Users
|
||||
------------
|
||||
|
||||
Users that wish to connect natively to SOGo must be provisioned in
|
||||
Samba 4 and in OpenChange – even if they already exist in your current
|
||||
Samba 4 and in OpenChange - even if they already exist in your current
|
||||
LDAP or Microsoft Active Directory server.
|
||||
|
||||
To add a user, execute the following commands:
|
||||
@@ -803,10 +805,6 @@ contact Inverse by sending an email to support@inverse.ca.
|
||||
General
|
||||
^^^^^^^
|
||||
|
||||
* If you can't see any email's content with Microsoft Outlook 2007,
|
||||
install the latest Service Pack available from Microsoft's website for
|
||||
this specific version. Microsoft Outlook 2007 (12.0.6423.100) SP2 MSO
|
||||
(12.0.6425.1000) is known to work.
|
||||
* When you create a new Microsoft Outlook profile, not all folders might
|
||||
be synchronized during the first start. Simply select the appropriate
|
||||
folder and click "Send and Receive". Synchronizing a folder may take
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- TODO have the build system take care of this -->
|
||||
<releaseinfo>Version 3.0.1 - February 2016</releaseinfo>
|
||||
<subtitle>for version 3.0.1</subtitle>
|
||||
<date>2016-02-05</date>
|
||||
<releaseinfo>Version 3.2.0 - October 2016</releaseinfo>
|
||||
<subtitle>for version 3.2.0</subtitle>
|
||||
<date>2016-10-03</date>
|
||||
|
||||
<legalnotice>
|
||||
<para>Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".</para>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@@ -6,7 +6,7 @@
|
||||
Authors:
|
||||
- Inverse inc. <info@inverse.ca>
|
||||
|
||||
Copyright (C) 2008-2014 Inverse inc.
|
||||
Copyright (C) 2008-2016 Inverse inc.
|
||||
License: GFDL 1.2 or later. http://www.gnu.org/licenses/fdl.html
|
||||
|
||||
////
|
||||
@@ -17,7 +17,7 @@ Additional Information
|
||||
For more information, please consult the online FAQs (Frequently Asked
|
||||
Questions) :
|
||||
|
||||
http://www.sogo.nu/english/support/faq.html
|
||||
http://sogo.nu/support/faq.html
|
||||
|
||||
You can also read the mailing archives or post your questions to it. For
|
||||
details, see :
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
|
||||
// TODO have the build system take care of this
|
||||
|
||||
:release_version: 3.0.1
|
||||
:release_version: 3.2.0
|
||||
|
||||
// vim: set syntax=asciidoc tabstop=2 shiftwidth=2 expandtab:
|
||||
@@ -19,7 +19,6 @@
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
@interface MainUIProduct : NSObject
|
||||
{
|
||||
@@ -27,7 +26,6 @@
|
||||
|
||||
@end
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@implementation MainUIProduct
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSException.h>
|
||||
|
||||
@interface NSException (SOGoExtensions)
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include <execinfo.h>
|
||||
|
||||
#import "NSException+Stacktrace.h"
|
||||
|
||||
|
||||
+14
-25
@@ -18,18 +18,12 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
#import <NGObjWeb/SoObject+SoDAV.h>
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
||||
#import <DOM/DOMDocument.h>
|
||||
#import <DOM/DOMNode.h>
|
||||
#import <DOM/DOMProtocols.h>
|
||||
#import <SaxObjC/XMLNamespaces.h>
|
||||
|
||||
#import <SOGo/NSArray+Utilities.h>
|
||||
@@ -42,6 +36,7 @@
|
||||
#import <SOGo/SOGoPermissions.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserFolder.h>
|
||||
#import <SOGo/SOGoUserManager.h>
|
||||
|
||||
#import "SOGo+DAV.h"
|
||||
|
||||
@@ -365,31 +360,26 @@
|
||||
withEmailAddressSetMatching: (NSString *) value
|
||||
inContext: (WOContext *) localContext
|
||||
{
|
||||
id <SOGoSource> authenticationSource;
|
||||
SOGoUser *activeUser;
|
||||
SOGoUserManager *um;
|
||||
NSArray *records;
|
||||
NSUInteger count, max;
|
||||
NSString *uid;
|
||||
SOGoUserFolder *collection;
|
||||
|
||||
activeUser = [localContext activeUser];
|
||||
if ([activeUser respondsToSelector: @selector (authenticationSource)])
|
||||
um = [SOGoUserManager sharedUserManager];
|
||||
records = [um fetchUsersMatching: value
|
||||
inDomain: [[localContext activeUser] domain]];
|
||||
|
||||
max = [records count];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
authenticationSource = [[localContext activeUser] authenticationSource];
|
||||
records = [authenticationSource
|
||||
fetchContactsMatching: value
|
||||
inDomain: [activeUser domain]];
|
||||
max = [records count];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
uid = [[records objectAtIndex: count] objectForKey: @"c_uid"];
|
||||
if ([uid length] > 0)
|
||||
{
|
||||
collection = [[SOGoUser userWithLogin: uid]
|
||||
uid = [[records objectAtIndex: count] objectForKey: @"c_uid"];
|
||||
if ([uid length] > 0)
|
||||
{
|
||||
collection = [[SOGoUser userWithLogin: uid]
|
||||
homeFolderInContext: localContext];
|
||||
[collections addObject: collection];
|
||||
}
|
||||
}
|
||||
[collections addObject: collection];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -585,7 +575,6 @@
|
||||
@"addressbook", @"calendar-access",
|
||||
@"calendar-schedule", @"calendar-auto-schedule",
|
||||
@"calendar-proxy",
|
||||
|
||||
@"calendar-query-extended",
|
||||
@"extended-mkcol",
|
||||
@"calendarserver-principal-property-search",
|
||||
|
||||
+1
-3
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 2005-2010 Inverse inc.
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
Copyright (C) 2005-2016 Inverse inc.
|
||||
|
||||
This file is part of SOGo.
|
||||
|
||||
@@ -27,7 +26,6 @@
|
||||
|
||||
@class NSArray;
|
||||
@class NSDictionary;
|
||||
@class NSMutableDictionary;
|
||||
|
||||
@class SOGoCache;
|
||||
|
||||
|
||||
+136
-24
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 2005-2014 Inverse inc.
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
Copyright (C) 2005-2016 Inverse inc.
|
||||
|
||||
This file is part of SOGo
|
||||
|
||||
@@ -20,18 +19,11 @@
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSDebug.h>
|
||||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSDate.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSProcessInfo.h>
|
||||
#import <Foundation/NSRunLoop.h>
|
||||
#import <Foundation/NSURL.h>
|
||||
|
||||
#import <GDLAccess/EOAdaptorChannel.h>
|
||||
#import <GDLContentStore/GCSChannelManager.h>
|
||||
#import <GDLContentStore/GCSFolderManager.h>
|
||||
#import <GDLContentStore/GCSFolderType.h>
|
||||
#import <GDLContentStore/GCSAlarmsFolder.h>
|
||||
#import <GDLContentStore/GCSSessionsFolder.h>
|
||||
|
||||
@@ -58,7 +50,6 @@
|
||||
#import <SOGo/SOGoPublicBaseFolder.h>
|
||||
#import <SOGo/SOGoProductLoader.h>
|
||||
#import <SOGo/SOGoProxyAuthenticator.h>
|
||||
#import <SOGo/SOGoUserFolder.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoSystemDefaults.h>
|
||||
#import <SOGo/SOGoWebAuthenticator.h>
|
||||
@@ -145,7 +136,7 @@ static BOOL debugLeaks;
|
||||
[$(@"SOGoFolder") soClass];
|
||||
|
||||
/* load products */
|
||||
[[SOGoProductLoader productLoader] loadAllProducts];
|
||||
[[SOGoProductLoader productLoader] loadAllProducts: YES];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
@@ -220,36 +211,94 @@ static BOOL debugLeaks;
|
||||
[cm releaseChannel: tc];
|
||||
}
|
||||
|
||||
- (void) _checkQuickTableWithTypeName: typeName
|
||||
withCm: (GCSChannelManager *) cm
|
||||
tableURL: (NSString *) url
|
||||
{
|
||||
GCSFolderType *type;
|
||||
NSString *sql;
|
||||
NSString *tableName;
|
||||
EOAdaptorChannel *channel;
|
||||
|
||||
channel = [cm acquireOpenChannelForURL: [NSURL URLWithString: url]];
|
||||
|
||||
tableName = [NSString stringWithFormat: @"sogo_quick_%@", typeName];
|
||||
sql = [NSString stringWithFormat: @"SELECT count(*) FROM %@",
|
||||
tableName];
|
||||
if ([channel evaluateExpressionX: sql])
|
||||
{
|
||||
type = [GCSFolderType folderTypeWithName: typeName];
|
||||
if (type)
|
||||
{
|
||||
sql = [type sqlQuickCreateWithTableName: tableName];
|
||||
if (![channel evaluateExpressionX: sql])
|
||||
[self logWithFormat: @"sogo quick table %@ successfully created!",
|
||||
tableName];
|
||||
}
|
||||
}
|
||||
else
|
||||
[channel cancelFetch];
|
||||
|
||||
[cm releaseChannel:channel];
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// If OCSStoreURL is defined, we also check for OCSAclURL, OCSCacheFolderURL
|
||||
// and we create the combined quick tables.
|
||||
//
|
||||
- (BOOL) _checkMandatoryTables
|
||||
{
|
||||
GCSChannelManager *cm;
|
||||
GCSFolderManager *fm;
|
||||
NSString *urlStrings[] = {@"SOGoProfileURL", @"OCSFolderInfoURL", nil};
|
||||
NSString **urlString;
|
||||
NSString *value;
|
||||
NSArray *urlStrings;
|
||||
NSArray *quickTypeStrings;
|
||||
NSString *tmp, *value;
|
||||
SOGoSystemDefaults *defaults;
|
||||
BOOL ok;
|
||||
NSEnumerator *e;
|
||||
BOOL ok, combined;
|
||||
|
||||
defaults = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
ok = YES;
|
||||
|
||||
if ([GCSFolderManager singleStoreMode])
|
||||
{
|
||||
urlStrings = [NSArray arrayWithObjects: @"SOGoProfileURL", @"OCSFolderInfoURL", @"OCSStoreURL", @"OCSAclURL", @"OCSCacheFolderURL", nil];
|
||||
quickTypeStrings = [NSArray arrayWithObjects: @"contact", @"appointment", nil];
|
||||
combined = YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
urlStrings = [NSArray arrayWithObjects: @"SOGoProfileURL", @"OCSFolderInfoURL", nil];
|
||||
combined = NO;
|
||||
}
|
||||
|
||||
cm = [GCSChannelManager defaultChannelManager];
|
||||
|
||||
urlString = urlStrings;
|
||||
while (ok && *urlString)
|
||||
e = [urlStrings objectEnumerator];
|
||||
while (ok && (tmp = [e nextObject]))
|
||||
{
|
||||
value = [defaults stringForKey: *urlString];
|
||||
value = [defaults stringForKey: tmp];
|
||||
if (value)
|
||||
{
|
||||
[self _checkTableWithCM: cm tableURL: value andType: *urlString];
|
||||
urlString++;
|
||||
}
|
||||
[self _checkTableWithCM: cm tableURL: value andType: tmp];
|
||||
else
|
||||
{
|
||||
[self errorWithFormat: @"No value specified for '%@'", *urlString];
|
||||
[self errorWithFormat: @"No value specified for '%@'", tmp];
|
||||
ok = NO;
|
||||
}
|
||||
}
|
||||
|
||||
if (combined)
|
||||
{
|
||||
e = [quickTypeStrings objectEnumerator];
|
||||
while ((tmp = [e nextObject]))
|
||||
{
|
||||
[self _checkQuickTableWithTypeName: tmp
|
||||
withCm: cm
|
||||
tableURL: [defaults stringForKey: @"OCSFolderInfoURL"]];
|
||||
}
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
fm = [GCSFolderManager defaultFolderManager];
|
||||
@@ -425,8 +474,12 @@ static BOOL debugLeaks;
|
||||
{
|
||||
static NSArray *runLoopModes = nil;
|
||||
static BOOL debugOn = NO;
|
||||
|
||||
SOGoSystemDefaults *sd;
|
||||
WOResponse *resp;
|
||||
NSDate *startDate;
|
||||
NSString *path;
|
||||
|
||||
NSTimeInterval timeDelta;
|
||||
|
||||
if (debugRequests)
|
||||
@@ -436,6 +489,7 @@ static BOOL debugLeaks;
|
||||
startDate = [NSDate date];
|
||||
}
|
||||
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
cache = [SOGoCache sharedCache];
|
||||
#ifdef GNUSTEP_BASE_LIBRARY
|
||||
if (debugLeaks)
|
||||
@@ -450,6 +504,64 @@ static BOOL debugLeaks;
|
||||
}
|
||||
#endif
|
||||
|
||||
// We check for rate-limiting settings - ignore anything actually
|
||||
// sent to /SOGo/ (so unauthenticated requests).
|
||||
path = [_request requestHandlerPath];
|
||||
if ([path length] && [sd maximumRequestCount] > 0)
|
||||
{
|
||||
NSDictionary *requestCount;
|
||||
NSString *username;
|
||||
NSRange r;
|
||||
|
||||
r = [path rangeOfString: @"/"];
|
||||
|
||||
// We handle /sogo1/Calendar/.../ and "sogo1" as paths
|
||||
if (r.length)
|
||||
username = [path substringWithRange: NSMakeRange(0, r.location)];
|
||||
else
|
||||
username = path;
|
||||
|
||||
requestCount = [cache requestCountForLogin: username];
|
||||
|
||||
if (requestCount)
|
||||
{
|
||||
unsigned int current_time, start_time, delta, block_time, request_count;
|
||||
|
||||
current_time = [[NSCalendarDate date] timeIntervalSince1970];
|
||||
start_time = [[requestCount objectForKey: @"InitialDate"] unsignedIntValue];
|
||||
delta = current_time - start_time;
|
||||
|
||||
block_time = [sd requestBlockInterval];
|
||||
request_count = [[requestCount objectForKey: @"RequestCount"] intValue];
|
||||
|
||||
if ( request_count >= [sd maximumRequestCount] &&
|
||||
delta < [sd maximumRequestInterval] &&
|
||||
delta <= block_time )
|
||||
{
|
||||
resp = [WOResponse responseWithRequest: _request];
|
||||
[resp setStatus: 429];
|
||||
return resp;
|
||||
}
|
||||
|
||||
if (delta > block_time)
|
||||
{
|
||||
[cache setRequestCount: 1
|
||||
forLogin: username
|
||||
interval: current_time];
|
||||
}
|
||||
else
|
||||
[cache setRequestCount: (request_count+1)
|
||||
forLogin: username
|
||||
interval: start_time];
|
||||
}
|
||||
else
|
||||
{
|
||||
[cache setRequestCount: 1
|
||||
forLogin: username
|
||||
interval: 0];
|
||||
}
|
||||
}
|
||||
|
||||
resp = [super dispatchRequest: _request];
|
||||
[cache killCache];
|
||||
|
||||
|
||||
@@ -21,10 +21,8 @@
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSTimeZone.h>
|
||||
|
||||
#import <NGObjWeb/SoApplication.h>
|
||||
|
||||
@@ -1,3 +1,311 @@
|
||||
3.2.0 (2016-10-03)
|
||||
------------------
|
||||
|
||||
New features
|
||||
- [web] added IMAP folder subscriptions management (#255)
|
||||
- [web] keyboard hotkeys (#1711, #1467, #3817)
|
||||
- [eas] initial support for server-side mailbox search operations
|
||||
|
||||
Enhancements
|
||||
- [web] don't allow a recurrence rule to end before the first occurrence
|
||||
- [web] updated Angular Material to version 1.1.1
|
||||
- [web] show user's name upon successful login
|
||||
- [web] inserted unseen messages count and mailbox name in browser's window title
|
||||
- [web] disable JavaScript theme generation when SOGoUIxDebugEnabled is set to NO
|
||||
- [web] added Serbian (sr) translation - thanks to Bogdanović Bojan
|
||||
- [web] added sort by arrival date in Mail module (#708)
|
||||
- [web] restored "now" line in Calendar module
|
||||
- [web] updated CKEditor to version 4.5.11
|
||||
- [web] allow custom email address to be one of the user's profile (#3551)
|
||||
- [eas] propagate message submission errors to EAS clients (#3774)
|
||||
|
||||
Bug fixes
|
||||
- [eas] properly generate the BusyStatus for normal events
|
||||
- [eas] properly escape all email and address fields
|
||||
- [eas] properly generate yearly rrule
|
||||
- [eas] make sure we don't sleep for too long when EAS processes need interruption
|
||||
- [eas] fixed recurring events with timezones for EAS (#3822)
|
||||
- [web] restored functionality to save unknown recipient emails to address book on send
|
||||
- [web] fixed ripple blocking the form when submitting no values (#3808)
|
||||
- [web] fixed error handling when renaming a mailbox
|
||||
- [web] handle binary content transfer encoding when displaying mails
|
||||
- [web] removed resize grips to short events (#3771)
|
||||
- [core] strip protocol value from proxyAddresses attribute (#3182)
|
||||
- [core] we now search in all domain sources for Apple Calendar
|
||||
- [core] properly handle groups in Apple Calendar's delegation
|
||||
- [core] fixed caching expiration of ACLs assigned to LDAP groups (#2867)
|
||||
- [core] make sure new cards always have a UID (#3819)
|
||||
- [core] fixed default TRANSP value when creating event
|
||||
|
||||
3.1.5 (2016-08-10)
|
||||
------------------
|
||||
|
||||
New features
|
||||
- [web] drag'n'drop of messages in the Mail module (#3497, #3586, #3734, #3788)
|
||||
- [web] drag'n'drop of cards in the AddressBook module
|
||||
- [eas] added folder merging capabilities
|
||||
|
||||
Enhancements
|
||||
- [web] improve action progress when login in or sending a message (#3765, #3761)
|
||||
- [web] don't allow to send the message while an upload is in progress
|
||||
- [web] notify when successfully copied or moved some messages
|
||||
- [web] restored indicator in the top banner when a vacation message (auto-reply) is active
|
||||
- [web] removed animation when dragging an event to speed up rendering
|
||||
- [web] expunge drafts mailbox when a draft is sent and deleted
|
||||
- [web] actions of Sieve filters are now sortable
|
||||
- [web] show progress indicator when refreshing events/tasks lists
|
||||
- [web] updated CKEditor to version 4.5.10
|
||||
|
||||
Bug fixes
|
||||
- [web] fixed refresh of addressbook when deleting one or many cards
|
||||
- [web] reset multiple-selection mode after deleting cards, events or tasks
|
||||
- [web] fixed exception when moving tasks to a different calendar
|
||||
- [web] fixed printing of long mail (#3731)
|
||||
- [web] fixed position of ghost block when creating an event from DnD
|
||||
- [web] fixed avatar image in autocompletion
|
||||
- [web] restored expunge of current mailbox when leaving the Mail module
|
||||
- [web] added support for multiple description values in LDAP entries (#3750)
|
||||
- [web] don't allow drag'n'drop of invitations
|
||||
- [eas] fixed long GUID issue preventing sometimes synchronisation (#3460)
|
||||
- [core] fixing sogo-tool backup with multi-domain configuration but domain-less logins
|
||||
- [core] during event scheduling, use 409 instead of 403 so Lightning doesn't fail silently
|
||||
- [core] correctly calculate recurrence exceptions when not overlapping the recurrence id
|
||||
- [core] prevent invalid SENT-BY handling during event invitations (#3759)
|
||||
|
||||
3.1.4 (2016-07-12)
|
||||
------------------
|
||||
|
||||
New features
|
||||
- [core] new sogo-tool truncate-calendar feature (#1513, #3141)
|
||||
- [eas] initial Out-of-Office support in EAS
|
||||
- [oc] initial support for calendar and address book sharing with OpenChange
|
||||
|
||||
Enhancements
|
||||
- [eas] use the preferred email identity in EAS if valid (#3698)
|
||||
- [eas] handle inline attachments during EAS content generation
|
||||
- [web] all batch operations can now be performed on selected messages in advanced search mode
|
||||
- [web] add date picker to change date, week, or month of current Calendar view
|
||||
- [web] style cancelled events in Calendar module
|
||||
- [web] replace sortable library for better support with Firefox
|
||||
- [web] stage-1 tuning of sgColorPicker directive
|
||||
- [oc] better handling of nested attachments with OpenChange
|
||||
|
||||
Bug fixes
|
||||
- [web] fixed crash when an attachment filename has no extension
|
||||
- [web] fixed selection of transparent all-day events (#3744)
|
||||
- [web] leaving the dropping area while dragging a file was blocking the mail editor
|
||||
- [web] fixed scrolling of all-day events (#3190)
|
||||
- [eas] handle base64 EAS protocol version
|
||||
- [eas] handle missing IMAP folders from a hierarchy using EAS
|
||||
|
||||
3.1.3 (2016-06-22)
|
||||
------------------
|
||||
|
||||
New features
|
||||
- [core] now possible to define default Sieve filters (#2949)
|
||||
- [core] now possible to set vacation message start date (#3679)
|
||||
- [web] add a header and/or footer to the vacation message (#1961)
|
||||
- [web] specify a custom subject for the vacation message (#685, #1447)
|
||||
|
||||
Enhancements
|
||||
- [core] when restoring data using sogo-tool, regenerate Sieve script (#3029)
|
||||
- [web] always display name of month in week view (#3724)
|
||||
- [web] use a speed dial (instead of a dialog) for card/list creation
|
||||
- [web] use a speed dial for event/task creation
|
||||
- [web] CSS is now minified using clean-css
|
||||
|
||||
Bug fixes
|
||||
- [core] properly handle sorted/deleted calendars (#3723)
|
||||
- [core] properly handle flattened timezone definitions (#2690)
|
||||
- [web] fixed generic avatar in lists (#3719)
|
||||
- [web] fixed validation in Sieve filter editor
|
||||
- [web] properly encode rawsource of events and tasks to avoid XSS issues (#3718)
|
||||
- [web] properly encode rawsource of cards to avoid XSS issues
|
||||
- [web] fixed all-day events covering a timezone change (#3457)
|
||||
- [web] sgTimePicker parser now respects the user's time format and language
|
||||
- [web] fixed time format when user chooses the default one
|
||||
- [web] added missing delegators identities in mail editor (#3720)
|
||||
- [web] honour the domain default SOGoAppointmentSendEMailNotifications (#3729)
|
||||
- [web] the login module parameter is now properly restored when set as "Last used"
|
||||
- [web] if cn isn't found for shared mailboxes, use email address (#3733)
|
||||
- [web] fixed handling of attendees when updating an event
|
||||
- [web] show tooltips over long calendar/ab names (#232)
|
||||
- [web] one-click option to give all permissions for user (#1637)
|
||||
- [web] never query gravatar.com when disabled
|
||||
|
||||
3.1.2 (2016-06-06)
|
||||
------------------
|
||||
|
||||
Enhancements
|
||||
- [web] updated Angular Material to version 1.1.0rc5
|
||||
|
||||
Bug fixes
|
||||
- [web] fixed error handling when renaming a mailbox
|
||||
- [web] fixed user removal from ACLs in Administration module (#3713)
|
||||
- [web] fixed event classification icon (private/confidential) in month view (#3711)
|
||||
- [web] CKEditor: added the pastefromword plugin (#2295, #3313)
|
||||
- [web] fixed loading of card from global addressbooks
|
||||
- [web] fixed negative offset when saving an all-day event (#3717)
|
||||
|
||||
3.1.1 (2016-06-02)
|
||||
------------------
|
||||
|
||||
Enhancements
|
||||
- [web] expose all email addresses in autocompletion of message editor (#3443)
|
||||
- [web] Gravatar service can now be disabled (#3600)
|
||||
- [web] collapsable mail accounts (#3493)
|
||||
- [web] show progress indicator when loading messages and cards
|
||||
- [web] display messages sizes in list of Mail module
|
||||
- [web] link event's attendees email addresses to mail composer
|
||||
- [web] respect SOGoSearchMinimumWordLength when searching for events or tasks
|
||||
- [web] updated CKEditor to version 4.5.9
|
||||
- [web] CKEditor: switched to the minimalist skin
|
||||
- [web] CKEditor: added the base64image plugin
|
||||
|
||||
Bug fixes
|
||||
- [core] strip X- tags when securing content (#3695)
|
||||
- [web] fixed creation of chip on blur (sgTransformOnBlur directive)
|
||||
- [web] fixed composition of new messages from Contacts module
|
||||
- [web] fixed autocompletion of LDAP-based groups (#3673)
|
||||
- [web] fixed month view when current month covers six weeks (#3663)
|
||||
- [web] fixed negative offset when converting a regular event to an all-day event (#3655)
|
||||
- [web] fixed event classification icon (private/confidential) in day/week/multicolumn views
|
||||
- [web] fixed display of mailboxes list on mobiles (#3654)
|
||||
- [web] restored Catalan and Slovak translations (#3687)
|
||||
- [web] fixed restore of mailboxes expansion state when multiple IMAP accounts are configured
|
||||
- [web] improved CSS sanitizer for HTML messages (#3700)
|
||||
- [web] fixed toolbar of mail editor when sender address was too long (#3705)
|
||||
- [web] fixed decoding of filename in attachments (quotes and Cyrillic characters) (#2272)
|
||||
- [web] fixed recipients when replying from a message in the Sent mailbox (#2625)
|
||||
- [eas] when using EAS/ItemOperations, use IMAP PEEK operation
|
||||
|
||||
3.1.0 (2016-05-18)
|
||||
------------------
|
||||
|
||||
New features
|
||||
- [core] new database structure options to make SOGo use a total of nine tables
|
||||
- [core] new user-based rate-limiting support for all SOGo requests (#3188)
|
||||
- [web] toolbar of all-day events can be expanded to display all events
|
||||
- [web] added AngularJS's XSRF support (#3246)
|
||||
- [web] calendars list can be reordered and filtered
|
||||
- [web] user can limit the calendars view to specific week days (#1841)
|
||||
|
||||
Enhancements
|
||||
- [web] updated Angular Material to version 1.1.0rc4
|
||||
- [web] added Lithuanan (lt) translation - thanks to Mantas Liobė
|
||||
- [web] added Turkish (Turkey) (tr_TR) translation - thanks to Sinan Kurşunoğlu
|
||||
- [web] we now "cc" delegates during invitation updates (#3195)
|
||||
- [web] new SOGoHelpURL preference to set a custom URL for SOGo help (#2768)
|
||||
- [web] now able to copy/move events and also duplicate them (#3196)
|
||||
- [web] improved preferences validation and now check for unsaved changes
|
||||
- [web] display events and tasks priorities in list and day/week views (#3162)
|
||||
- [web] style events depending on the user participation state
|
||||
- [web] style transparent events (show time as free) (#3192)
|
||||
- [web] improved input parsing of time picker (#3659)
|
||||
- [web] restored support for Web calendars that require authentication
|
||||
|
||||
Bug fixes
|
||||
- [core] properly escape wide characters (#3616)
|
||||
- [core] avoid double-appending domains in cache for multi-domain configurations (#3614)
|
||||
- [core] fixed multidomain issue with non-unique ID accross domains (#3625)
|
||||
- [core] fixed bogus headers generation when stripping folded bcc header (#3664)
|
||||
- [core] fixed issue with multi-value org units (#3630)
|
||||
- [core] sanity checks for events with bogus timezone offsets
|
||||
- [web] fixed missing columns in SELECT statements (PostgreSQL)
|
||||
- [web] fixed display of ghosts when dragging events
|
||||
- [web] fixed management of mail labels in Preferences module
|
||||
- [web] respect super user privileges to create in any calendar and addressbook (#3533)
|
||||
- [web] properly null-terminate IS8601-formatted dates (#3539)
|
||||
- [web] display CC/BCC fields in message editor when initialized with values
|
||||
- [web] fixed message initialization in popup window (#3583)
|
||||
- [web] create chip (recipient) on blur (#3470)
|
||||
- [web] fixed position of warning when JavaScript is disabled (#3449)
|
||||
- [web] respect the LDAP attributes mapping in the list view
|
||||
- [web] handle empty body data when forwarding mails (#3581)
|
||||
- [web] show repeating events when we ask for "All" or "Future" events (#69)
|
||||
- [web] show the To instead of From when we are in the Sent folder (#3547)
|
||||
- [web] fixed handling of mail tags in mail viewer
|
||||
- [web] avoid marking mails as read when archiving a folder (#2792)
|
||||
- [web] fixed crash when sending a message with a special priority
|
||||
- [web] fixed saving of a custom weekly recurrence definition
|
||||
- [web] properly escape the user's display name (#3617)
|
||||
- [web] avoid returning search results on objects without read permissions (#3619)
|
||||
- [web] restore priority of event or task in component editor
|
||||
- [web] fixed menu content visibility when printing an email (#3584)
|
||||
- [web] retired CSS reset so the style of HTML messages is respected (#3582)
|
||||
- [web] fixed messages archiving as zip file
|
||||
- [web] adapted time picker to match changes of md calendar picker
|
||||
- [web] fixed sender addresses of draft when using multiple IMAP accounts (#3577)
|
||||
- [web] create a new message when clicking on a "mailto" link (#3588)
|
||||
- [web] fixed handling of Web calendars option "reload on login"
|
||||
- [web] add recipient chip when leaving an input field (to/cc/bcc) (#3470)
|
||||
- [dav] we now handle the default classifications for tasks (#3541)
|
||||
- [eas] properly unfold long mail headers (#3152)
|
||||
- [eas] correctly set EAS message class for S/MIME messages (#3576)
|
||||
- [eas] handle FilterType changes using EAS (#3543)
|
||||
- [eas] handle Dovecot's mail_shared_explicit_inbox parameter
|
||||
- [eas] prevent concurrent Sync ops from same device (#3603)
|
||||
- [eas] handle EAS loop termination when SOGo is being shutdown (#3604)
|
||||
- [eas] now cache heartbeat interval and folders list during Ping ops (#3606)
|
||||
- [eas] sanitize non-us-ascii 7bit emails (#3592)
|
||||
- [eas] properly escape organizer name (#3615)
|
||||
- [eas] correctly set answered/forwarded flags during smart operations
|
||||
- [eas] don't mark calendar invitations as read when fetching messages
|
||||
|
||||
3.0.2 (2016-03-04)
|
||||
------------------
|
||||
|
||||
New features
|
||||
- [web] show all/only this calendar
|
||||
- [web] convert a message to an appointment or a task (#1722)
|
||||
- [web] customizable base font size for HTML messages
|
||||
- [web you can now limit the file upload size using the WOMaxUploadSize
|
||||
configuration parameter (integer value in kilobytes) (#3510, #3135)
|
||||
|
||||
Enhancements
|
||||
- [web] added Junk handling feature from v2
|
||||
- [web] updated Material Icons font to version 2.1.3
|
||||
- [web] don't offer forward/vacation options in filters if not enabled
|
||||
- [web] mail filters are now sortable
|
||||
- [web] now supports RFC6154 and NoInferiors IMAP flag
|
||||
- [web] improved confirm dialogs for deletions
|
||||
- [web] allow resources to prevent invitations (#3410)
|
||||
- [web] warn when double-booking attendees and offer force save option
|
||||
- [web] list search now displays a warning regarding the minlength constraint
|
||||
- [web] loading an LDAP-based addressbook is now instantaneous when listRequiresDot is disabled (#438, #3464)
|
||||
- [web] improve display of messages with many recipients
|
||||
- [web] colorize categories chips in event and task viewers
|
||||
- [web] initial stylesheet for printing (#3484)
|
||||
- [web] updated lodash to version 4.6.1
|
||||
- [i18n] updated French and Finnish translations
|
||||
- [eas] now support EAS MIME truncation
|
||||
|
||||
Bug fixes
|
||||
- [web] handle birthday dates before 1970 (#3567)
|
||||
- [web] safe-guarding against bogus value coming from the quick tables
|
||||
- [web] apply search filters when automatically reloading current mailbox (#3507)
|
||||
- [web] fixed virtual repeater when moving up in messages list
|
||||
- [web] really delete mailboxes being deleted from the Trash folder (#595, #1189, #641)
|
||||
- [web] fixed address autocompletion of mail editor affecting cards list of active addressbook
|
||||
- [web] fixed batched delete of components (#3516)
|
||||
- [web] fixed mail draft autosave in preferences (#3519)
|
||||
- [web] fixed password change (#3496)
|
||||
- [web] fixed saving of notification email for calendar changes (#3522)
|
||||
- [web] fixed ACL editor for authenticated users in Mail module
|
||||
- [web] fixed fab button position in Calendar module (#3462)
|
||||
- [web] fixed default priority of sent messages (#3542)
|
||||
- [web] removed double-quotes from Chinese (Taiwan) translations that were breaking templates
|
||||
- [web] fixed unseen count retrieval of nested IMAP folders
|
||||
- [web] properly extract the mail column values from an SQL contacts source (#3544)
|
||||
- [web] fixed incorrect date formatting when timezone was after UTC+0 (#3481, #3494)
|
||||
- [web] replaced checkboxes in menu by a custom checkmark (#3557)
|
||||
- [web] fixed attachments display when forwarding a message (#3560)
|
||||
- [web] activate new calendar subscriptions by default
|
||||
- [web] keep specified task status when not completed (#3499)
|
||||
- [eas] allow EAS attachments get on 2nd-level mailboxes (#3505)
|
||||
- [eas] fix EAS bday shift (#3518)
|
||||
- [eas] encode CR in EAS payload (#3626)
|
||||
|
||||
3.0.1 (2016-02-05)
|
||||
------------------
|
||||
|
||||
|
||||
@@ -78,6 +78,9 @@ $(SOGOBACKEND)_OBJC_FILES += \
|
||||
MAPIStoreGCSMessage.m \
|
||||
MAPIStoreGCSMessageTable.m \
|
||||
\
|
||||
MAPIStoreCalTaskFolder.m \
|
||||
MAPIStoreCalTaskMessage.m \
|
||||
\
|
||||
MAPIStoreCalendarAttachment.m \
|
||||
MAPIStoreCalendarContext.m \
|
||||
MAPIStoreCalendarFolder.m \
|
||||
|
||||
@@ -68,105 +68,109 @@
|
||||
- (void) fillMessageData: (struct mapistore_message *) dataPtr
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
- (int) getPidTagSenderEmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagSenderAddressType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagSenderName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagSenderEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (NSString *) creator;
|
||||
- (NSString *) owner;
|
||||
- (NSUInteger) sensitivity;
|
||||
|
||||
- (int) getPidTagReceivedByAddressType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagReceivedByEmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagReceivedByName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagReceivedByEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagSenderEmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagSenderAddressType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagSenderName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagSenderEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
- (int) getPidTagIconIndex: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagOwnerAppointmentId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidMeetingType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagStartDate: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidAppointmentSequence: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidAppointmentStateFlags: (void **) data
|
||||
- (enum mapistore_error) getPidTagReceivedByAddressType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagReceivedByEmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagReceivedByName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagReceivedByEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
- (enum mapistore_error) getPidTagIconIndex: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagOwnerAppointmentId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidMeetingType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagStartDate: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidAppointmentSequence: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidAppointmentStateFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidResponseStatus: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
- (enum mapistore_error) getPidLidAppointmentStartWhole: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidCommonStart: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagEndDate: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidAppointmentEndWhole: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidCommonEnd: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidAppointmentDuration: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidAppointmentSubType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidBusyStatus: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidIndentedBusyStatus: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagNormalizedSubject: (void **) data // SUMMARY
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidLocation: (void **) data // LOCATION
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidPrivate: (void **) data // private (bool), should depend on CLASS and permissions
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagSensitivity: (void **) data // not implemented, depends on CLASS
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagImportance: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidResponseStatus: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
- (int) getPidLidAppointmentStartWhole: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidCommonStart: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagEndDate: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidAppointmentEndWhole: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidCommonEnd: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidAppointmentDuration: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidAppointmentSubType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidBusyStatus: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidIndentedBusyStatus: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagNormalizedSubject: (void **) data // SUMMARY
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidLocation: (void **) data // LOCATION
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidPrivate: (void **) data // private (bool), should depend on CLASS and permissions
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagSensitivity: (void **) data // not implemented, depends on CLASS
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagImportance: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidIsRecurring: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidRecurring: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidAppointmentRecur: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidGlobalObjectId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidCleanGlobalObjectId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidServerProcessed: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidServerProcessingActions: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidAppointmentReplyTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidIsRecurring: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidRecurring: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidAppointmentRecur: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidGlobalObjectId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidCleanGlobalObjectId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidServerProcessed: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidServerProcessingActions: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidAppointmentReplyTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
/* reminders */
|
||||
- (int) getPidLidReminderSet: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidReminderDelta: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidReminderTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidReminderSignalTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidReminderOverride: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidReminderType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidReminderPlaySound: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidReminderFileParameter: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidReminderSet: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidReminderDelta: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidReminderTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidReminderSignalTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidReminderOverride: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidReminderType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidReminderPlaySound: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidReminderFileParameter: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -36,13 +36,13 @@
|
||||
- (void) setAID: (uint32_t) newAID;
|
||||
- (uint32_t) AID;
|
||||
|
||||
- (int) openEmbeddedMessage: (MAPIStoreEmbeddedMessage **) messagePtr
|
||||
withMID: (uint64_t *) mid
|
||||
withMAPIStoreMsg: (struct mapistore_message **) mapistoreMsgPtr
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) createEmbeddedMessage: (MAPIStoreEmbeddedMessage **) messagePtr
|
||||
withMAPIStoreMsg: (struct mapistore_message **) mapistoreMsgPtr
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) openEmbeddedMessage: (MAPIStoreEmbeddedMessage **) messagePtr
|
||||
withMID: (uint64_t *) mid
|
||||
withMAPIStoreMsg: (struct mapistore_message **) mapistoreMsgPtr
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) createEmbeddedMessage: (MAPIStoreEmbeddedMessage **) messagePtr
|
||||
withMAPIStoreMsg: (struct mapistore_message **) mapistoreMsgPtr
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
/* helpers */
|
||||
- (NSData *) mimeAttachTag;
|
||||
|
||||
@@ -67,40 +67,40 @@
|
||||
return mimeAttachTag;
|
||||
}
|
||||
|
||||
- (int) getPidTagMid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongLongValue (memCtx, [container objectId]);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, aid);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagRenderingPosition: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagRenderingPosition: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, 0xffffffff);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAccessLevel: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAccessLevel: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) openEmbeddedMessage: (MAPIStoreEmbeddedMessage **) messagePtr
|
||||
withMID: (uint64_t *) mid
|
||||
withMAPIStoreMsg: (struct mapistore_message **) mapistoreMsgPtr
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) openEmbeddedMessage: (MAPIStoreEmbeddedMessage **) messagePtr
|
||||
withMID: (uint64_t *) mid
|
||||
withMAPIStoreMsg: (struct mapistore_message **) mapistoreMsgPtr
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
MAPIStoreEmbeddedMessage *attMessage;
|
||||
struct mapistore_message *mapistoreMsg;
|
||||
@@ -118,9 +118,9 @@
|
||||
return (attMessage ? MAPISTORE_SUCCESS : MAPISTORE_ERROR);
|
||||
}
|
||||
|
||||
- (int) createEmbeddedMessage: (MAPIStoreEmbeddedMessage **) messagePtr
|
||||
withMAPIStoreMsg: (struct mapistore_message **) mapistoreMsgPtr
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) createEmbeddedMessage: (MAPIStoreEmbeddedMessage **) messagePtr
|
||||
withMAPIStoreMsg: (struct mapistore_message **) mapistoreMsgPtr
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
MAPIStoreEmbeddedMessage *attMessage;
|
||||
struct mapistore_message *mapistoreMsg;
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* MAPIStoreCalTaskFolder.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2016 Enrique J. Hernandez
|
||||
*
|
||||
* Author: Enrique J. Hernandez <ejhernandez@zentyal.com>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef MAPISTORECALTASKFOLDER_H
|
||||
#define MAPISTORECALTASKFOLDER_H
|
||||
|
||||
#import "MAPIStoreGCSFolder.h"
|
||||
|
||||
/* This class is intended to share code between Calendar and Tasks as
|
||||
of nowadays share the table */
|
||||
|
||||
@interface MAPIStoreCalTaskFolder : MAPIStoreGCSFolder
|
||||
|
||||
@end
|
||||
|
||||
#endif /* MAPISTORECALTASKFOLDER_H */
|
||||
@@ -0,0 +1,101 @@
|
||||
/* MAPIStoreCalTaskFolder.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2016 Enrique J. Hernandez
|
||||
*
|
||||
* Author: Enrique J. Hernandez <ejhernandez@zentyal.com>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSSet.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <SOGo/SOGoPermissions.h>
|
||||
|
||||
#import "MAPIStoreCalTaskFolder.h"
|
||||
|
||||
@implementation MAPIStoreCalTaskFolder
|
||||
|
||||
- (NSArray *) expandRoles: (NSArray *) roles
|
||||
{
|
||||
static NSDictionary *rolesMap = nil;
|
||||
NSArray *subRoles;
|
||||
NSMutableSet *expandedRoles;
|
||||
NSString *role, *subRole;
|
||||
NSUInteger i, max, j;
|
||||
|
||||
if (!rolesMap)
|
||||
{
|
||||
/* Build the map of array permissions */
|
||||
rolesMap = [[NSDictionary alloc] initWithObjects: [NSArray arrayWithObjects:
|
||||
[NSArray arrayWithObjects: SOGoCalendarRole_PublicDAndTViewer,
|
||||
SOGoCalendarRole_PublicViewer,
|
||||
SOGoCalendarRole_PublicResponder,
|
||||
SOGoCalendarRole_PublicModifier, nil],
|
||||
[NSArray arrayWithObjects: SOGoCalendarRole_ConfidentialDAndTViewer,
|
||||
SOGoCalendarRole_ConfidentialViewer,
|
||||
SOGoCalendarRole_ConfidentialResponder,
|
||||
SOGoCalendarRole_ConfidentialModifier, nil],
|
||||
[NSArray arrayWithObjects: SOGoCalendarRole_PrivateDAndTViewer,
|
||||
SOGoCalendarRole_PrivateViewer,
|
||||
SOGoCalendarRole_PrivateResponder,
|
||||
SOGoCalendarRole_PrivateModifier, nil],
|
||||
[NSArray arrayWithObjects: SOGoCalendarRole_ComponentDAndTViewer,
|
||||
SOGoCalendarRole_ComponentViewer,
|
||||
SOGoCalendarRole_ComponentResponder,
|
||||
SOGoCalendarRole_ComponentModifier, nil],
|
||||
nil]
|
||||
forKeys: [NSArray arrayWithObjects: @"Public", @"Confidential", @"Private",
|
||||
@"Component", nil]];
|
||||
}
|
||||
|
||||
max = [roles count];
|
||||
expandedRoles = [NSMutableSet set];
|
||||
for (i = 0; i < max; i++)
|
||||
{
|
||||
role = [roles objectAtIndex: i];
|
||||
subRoles = nil;
|
||||
if ([role hasPrefix: @"Public"])
|
||||
subRoles = [rolesMap objectForKey: @"Public"];
|
||||
else if ([role hasPrefix: @"Confidential"])
|
||||
subRoles = [rolesMap objectForKey: @"Confidential"];
|
||||
else if ([role hasPrefix: @"Private"])
|
||||
subRoles = [rolesMap objectForKey: @"Private"];
|
||||
else if ([role hasPrefix: @"Component"])
|
||||
subRoles = [rolesMap objectForKey: @"Component"];
|
||||
|
||||
if (subRoles)
|
||||
{
|
||||
for (j = 0; j < [subRoles count]; j++)
|
||||
{
|
||||
subRole = [subRoles objectAtIndex: j];
|
||||
[expandedRoles addObject: subRole];
|
||||
|
||||
if ([subRole isEqualToString: role])
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[expandedRoles addObject: role];
|
||||
}
|
||||
}
|
||||
|
||||
return [expandedRoles allObjects];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,40 @@
|
||||
/* MAPIStoreCalTaskMessage.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2016 Enrique J. Hernandez
|
||||
*
|
||||
* Author: Enrique J. Hernandez <ejhernandez@zentyal.com>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef MAPISTORECALTASKMESSAGE_H
|
||||
#define MAPISTORECALTASKMESSAGE_H
|
||||
|
||||
#import "MAPIStoreGCSMessage.h"
|
||||
|
||||
/* This class is intended to share common logic for Calendar and Tasks
|
||||
as of today they are stored in the same table. This is relevant for
|
||||
permissions */
|
||||
@interface MAPIStoreCalTaskMessage : MAPIStoreGCSMessage
|
||||
{
|
||||
}
|
||||
|
||||
/* Get the sensitivity (access class) from a message */
|
||||
- (NSUInteger) sensitivity;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* MAPISTORECALTASKMESSAGE_H */
|
||||
@@ -0,0 +1,107 @@
|
||||
/* MAPIStoreCalTaskMessage.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2016 Enrique J. Hernandez
|
||||
*
|
||||
* Author: Enrique J. Hernandez <ejhernandez@zentyal.com>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
|
||||
#import <SOGo/SOGoPermissions.h>
|
||||
|
||||
#import "MAPIStoreFolder.h"
|
||||
#import "MAPIStoreCalTaskMessage.h"
|
||||
|
||||
@implementation MAPIStoreCalTaskMessage
|
||||
|
||||
/* It must be implemented by subclasses */
|
||||
- (NSUInteger) sensitivity
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSArray *) expandRoles: (NSArray *) roles
|
||||
{
|
||||
return [container expandRoles: roles];
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanModifyMessage
|
||||
{
|
||||
BOOL rc;
|
||||
NSArray *roles;
|
||||
|
||||
roles = [self activeUserRoles];
|
||||
|
||||
if (isNew)
|
||||
rc = [roles containsObject: SOGoRole_ObjectCreator];
|
||||
else
|
||||
rc = ([roles containsObject: SOGoCalendarRole_ComponentModifier]
|
||||
|| [roles containsObject: SOGoCalendarRole_ComponentResponder]);
|
||||
|
||||
/* Check if the message is owned and it has permission to edit it */
|
||||
if (!rc && [roles containsObject: MAPIStoreRightEditOwn])
|
||||
{
|
||||
NSString *currentUser;
|
||||
|
||||
currentUser = [[container context] activeUser];
|
||||
rc = [currentUser isEqual: [self ownerUser]];
|
||||
}
|
||||
|
||||
if (!rc)
|
||||
{
|
||||
NSUInteger sensitivity;
|
||||
|
||||
/* Get sensitivity of the message to check if the user can
|
||||
modify the message */
|
||||
sensitivity = [self sensitivity];
|
||||
/* FIXME: Use OpenChange constant names */
|
||||
switch (sensitivity)
|
||||
{
|
||||
case 0: /* PUBLIC */
|
||||
rc = [roles containsObject: SOGoCalendarRole_PublicModifier]
|
||||
|| [roles containsObject: SOGoCalendarRole_PublicResponder];
|
||||
break;
|
||||
case 1: /* PERSONAL */
|
||||
case 2: /* PRIVATE */
|
||||
rc = [roles containsObject: SOGoCalendarRole_PrivateModifier]
|
||||
|| [roles containsObject: SOGoCalendarRole_PrivateResponder];
|
||||
break;
|
||||
case 3: /* CONFIDENTIAL */
|
||||
rc = [roles containsObject: SOGoCalendarRole_ConfidentialModifier]
|
||||
|| [roles containsObject: SOGoCalendarRole_ConfidentialResponder];
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanReadMessage
|
||||
{
|
||||
NSArray *roles;
|
||||
|
||||
roles = [self activeUserRoles];
|
||||
|
||||
return ([roles containsObject: SOGoCalendarRole_ComponentViewer]
|
||||
|| [roles containsObject: SOGoCalendarRole_ComponentDAndTViewer]
|
||||
|| [self subscriberCanModifyMessage]);
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -94,64 +94,64 @@
|
||||
flattenedValuesForKey: @""];
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachmentHidden: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
- (enum mapistore_error) getPidTagAttachmentHidden: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
{
|
||||
return [self getYes: data inMemCtx: localMemCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachmentFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
- (enum mapistore_error) getPidTagAttachmentFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
{
|
||||
*data = MAPILongValue (localMemCtx, 0x00000002); /* afException */
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachmentLinkId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
- (enum mapistore_error) getPidTagAttachmentLinkId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: localMemCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
- (enum mapistore_error) getPidTagAttachFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: localMemCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachMethod: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
- (enum mapistore_error) getPidTagAttachMethod: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
{
|
||||
*data = MAPILongValue (localMemCtx, afEmbeddedMessage);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachEncoding: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
- (enum mapistore_error) getPidTagAttachEncoding: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
{
|
||||
*data = [[NSData data] asBinaryInMemCtx: localMemCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
- (enum mapistore_error) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
{
|
||||
*data = [@"Untitled" asUnicodeInMemCtx: localMemCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachmentContactPhoto: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachmentContactPhoto: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagExceptionReplaceTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagExceptionReplaceTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
enum mapistore_error rc;
|
||||
NSCalendarDate *dateValue;
|
||||
@@ -178,8 +178,8 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagExceptionStartTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
- (enum mapistore_error) getPidTagExceptionStartTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
{
|
||||
enum mapistore_error rc;
|
||||
NSCalendarDate *dateValue;
|
||||
@@ -205,8 +205,8 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagExceptionEndTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
- (enum mapistore_error) getPidTagExceptionEndTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||
{
|
||||
enum mapistore_error rc;
|
||||
NSCalendarDate *dateValue;
|
||||
|
||||
@@ -89,73 +89,73 @@
|
||||
*dataPtr = msgData;
|
||||
}
|
||||
|
||||
- (int) getPidTagMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = talloc_strdup (memCtx, "IPM.OLE.CLASS.{00061055-0000-0000-C000-000000000046}");
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagMessageFlags: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageFlags: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, MSGFLAG_UNMODIFIED);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagProcessed: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagProcessed: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getYes: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagResponseRequested: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagResponseRequested: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getYes: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
/* discarded properties */
|
||||
|
||||
- (int) getPidLidAppointmentLastSequence: (void **)
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidAppointmentLastSequence: (void **)
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidLidMeetingWorkspaceUrl: (void **)
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidMeetingWorkspaceUrl: (void **)
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidLidContacts: (void **)
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidContacts: (void **)
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagSensitivity: (void **)
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSensitivity: (void **)
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidLidPrivate: (void **)
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidPrivate: (void **)
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidNameKeywords: (void **)
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidNameKeywords: (void **)
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidLidFExceptionalBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidFExceptionalBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
}
|
||||
@@ -208,6 +208,7 @@
|
||||
[[container event] updateFromMAPIProperties: properties
|
||||
inUserContext: [self userContext]
|
||||
withActiveUser: activeUser
|
||||
isNew: NO
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
#ifndef MAPISTORECALENDARFOLDER_H
|
||||
#define MAPISTORECALENDARFOLDER_H
|
||||
|
||||
#import "MAPIStoreGCSFolder.h"
|
||||
#import "MAPIStoreCalTaskFolder.h"
|
||||
|
||||
@interface MAPIStoreCalendarFolder : MAPIStoreGCSFolder
|
||||
@interface MAPIStoreCalendarFolder : MAPIStoreCalTaskFolder
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -81,11 +81,7 @@
|
||||
|
||||
Following rights are not supported by SOGo specifically:
|
||||
|
||||
- DeleteOwned : Delete only own objects
|
||||
- EditOwned : Edit only own objects
|
||||
- CreateSubfolders: No calendar subfolders
|
||||
- FolderOwner: No sharing folder ownership?
|
||||
- FolderContact: No support to store this information
|
||||
- FolderVisible: It is inferred by other rights when extracting
|
||||
*/
|
||||
NSMutableArray *roles;
|
||||
@@ -95,26 +91,35 @@
|
||||
[roles addObject: SOGoRole_ObjectCreator];
|
||||
if (rights & RightsDeleteAll)
|
||||
[roles addObject: SOGoRole_ObjectEraser];
|
||||
if (rights & RightsDeleteOwn)
|
||||
[roles addObject: MAPIStoreRightDeleteOwn];
|
||||
|
||||
if (rights & RightsEditAll)
|
||||
{
|
||||
[roles addObject: SOGoCalendarRole_PublicModifier];
|
||||
[roles addObject: SOGoCalendarRole_PrivateModifier];
|
||||
[roles addObject: SOGoCalendarRole_ConfidentialModifier];
|
||||
}
|
||||
else if (rights & RightsReadItems)
|
||||
if (rights & RightsEditOwn)
|
||||
[roles addObject: MAPIStoreRightEditOwn];
|
||||
|
||||
if (rights & RightsReadItems)
|
||||
{
|
||||
[roles addObject: SOGoCalendarRole_PublicViewer];
|
||||
[roles addObject: SOGoCalendarRole_PrivateViewer];
|
||||
[roles addObject: SOGoCalendarRole_ConfidentialViewer];
|
||||
}
|
||||
if (rights & RightsFreeBusySimple)
|
||||
{
|
||||
[roles addObject: SOGoCalendarRole_PublicDAndTViewer];
|
||||
}
|
||||
[roles addObject: SOGoCalendarRole_PublicDAndTViewer];
|
||||
|
||||
if (rights & RightsFreeBusyDetailed)
|
||||
{
|
||||
[roles addObject: SOGoCalendarRole_ConfidentialDAndTViewer];
|
||||
}
|
||||
[roles addObject: SOGoCalendarRole_ConfidentialDAndTViewer];
|
||||
|
||||
if (rights & RightsFolderOwner)
|
||||
[roles addObject: MAPIStoreRightFolderOwner];
|
||||
|
||||
if (rights & RightsFolderContact)
|
||||
[roles addObject: MAPIStoreRightFolderContact];
|
||||
|
||||
// [self logWithFormat: @"roles for rights %.8x = (%@)", rights, roles];
|
||||
|
||||
@@ -136,19 +141,28 @@
|
||||
else if ([roles containsObject: SOGoCalendarRole_PublicViewer]
|
||||
&& [roles containsObject: SOGoCalendarRole_PrivateViewer]
|
||||
&& [roles containsObject: SOGoCalendarRole_ConfidentialViewer])
|
||||
// We have to set by hand other rights as only the highest role is returned
|
||||
// See SOGoAppointmentFolder.m:aclsForUser for details
|
||||
rights |= RightsReadItems | RightsFreeBusySimple | RightsFreeBusyDetailed;
|
||||
rights |= RightsReadItems;
|
||||
|
||||
if ([roles containsObject: MAPIStoreRightEditOwn])
|
||||
rights |= RightsEditOwn;
|
||||
if ([roles containsObject: MAPIStoreRightDeleteOwn])
|
||||
rights |= RightsDeleteOwn;
|
||||
|
||||
if ([roles containsObject: SOGoCalendarRole_PublicDAndTViewer])
|
||||
rights |= RightsFreeBusySimple;
|
||||
|
||||
if ([roles containsObject: SOGoCalendarRole_ConfidentialDAndTViewer])
|
||||
rights |= RightsFreeBusyDetailed;
|
||||
rights |= RightsFreeBusySimple | RightsFreeBusyDetailed;
|
||||
|
||||
if ((rights & RightsReadItems) != 0 || (rights & RightsCreateItems) != 0 || (rights & RightsDeleteAll) != 0)
|
||||
rights |= RoleNone; /* actually "folder visible" */
|
||||
|
||||
if ([roles containsObject: MAPIStoreRightFolderOwner])
|
||||
rights |= RightsFolderOwner | RoleNone;
|
||||
|
||||
if ([roles containsObject: MAPIStoreRightFolderContact])
|
||||
rights |= RightsFolderContact;
|
||||
|
||||
// [self logWithFormat: @"rights for roles (%@) = %.8x", roles, rights];
|
||||
|
||||
return rights;
|
||||
@@ -193,16 +207,16 @@
|
||||
[(SOGoAppointmentFolder *) sogoObject aclSQLListingFilter]];
|
||||
}
|
||||
|
||||
- (int) getPidTagContainerClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagContainerClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"IPF.Appointment" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagDefaultPostMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDefaultPostMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"IPM.Appointment" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
#ifndef MAPISTORECALENDARMESSAGE_H
|
||||
#define MAPISTORECALENDARMESSAGE_H
|
||||
|
||||
#import "MAPIStoreGCSMessage.h"
|
||||
#import "MAPIStoreCalTaskMessage.h"
|
||||
|
||||
@class iCalCalendar;
|
||||
@class iCalEvent;
|
||||
@class MAPIStoreAppointmentWrapper;
|
||||
|
||||
@interface MAPIStoreCalendarMessage : MAPIStoreGCSMessage
|
||||
@interface MAPIStoreCalendarMessage : MAPIStoreCalTaskMessage
|
||||
{
|
||||
iCalCalendar *calendar;
|
||||
iCalEvent *masterEvent;
|
||||
|
||||
@@ -228,8 +228,8 @@ static Class NSArrayK, MAPIStoreAppointmentWrapperK;
|
||||
|
||||
|
||||
/* getters */
|
||||
- (int) getPidTagMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
SOGoUser *owner;
|
||||
|
||||
@@ -242,8 +242,8 @@ static Class NSArrayK, MAPIStoreAppointmentWrapperK;
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidSideEffects: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSideEffects: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx,
|
||||
seOpenToDelete | seOpenToCopy | seOpenToMove
|
||||
@@ -252,7 +252,7 @@ static Class NSArrayK, MAPIStoreAppointmentWrapperK;
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagProcessed: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagProcessed: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getYes: data inMemCtx: memCtx];
|
||||
}
|
||||
@@ -347,8 +347,8 @@ static Class NSArrayK, MAPIStoreAppointmentWrapperK;
|
||||
*dataPtr = msgData;
|
||||
}
|
||||
|
||||
- (int) getPidTagResponseRequested: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagResponseRequested: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getYes: data inMemCtx: memCtx];
|
||||
}
|
||||
@@ -358,8 +358,8 @@ static Class NSArrayK, MAPIStoreAppointmentWrapperK;
|
||||
MAPIStoreMessage base class, then the proxy method is not reached
|
||||
(see MAPIStoreObject).
|
||||
*/
|
||||
- (int) getPidTagNormalizedSubject: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagNormalizedSubject: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
MAPIStoreAppointmentWrapper *appointmentWrapper;
|
||||
|
||||
@@ -370,8 +370,8 @@ static Class NSArrayK, MAPIStoreAppointmentWrapperK;
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagSensitivity: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSensitivity: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
MAPIStoreAppointmentWrapper *appointmentWrapper;
|
||||
|
||||
@@ -382,8 +382,8 @@ static Class NSArrayK, MAPIStoreAppointmentWrapperK;
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagImportance: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagImportance: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
MAPIStoreAppointmentWrapper *appointmentWrapper;
|
||||
|
||||
@@ -528,29 +528,19 @@ static Class NSArrayK, MAPIStoreAppointmentWrapperK;
|
||||
ASSIGN (sogoObject, newObject);
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanReadMessage
|
||||
- (NSUInteger) sensitivity
|
||||
{
|
||||
NSArray *roles;
|
||||
|
||||
roles = [self activeUserRoles];
|
||||
|
||||
return ([roles containsObject: SOGoCalendarRole_ComponentViewer]
|
||||
|| [roles containsObject: SOGoCalendarRole_ComponentDAndTViewer]
|
||||
|| [self subscriberCanModifyMessage]);
|
||||
return [[self _appointmentWrapper] sensitivity];
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanModifyMessage
|
||||
- (NSString *) creator
|
||||
{
|
||||
BOOL rc;
|
||||
NSArray *roles = [self activeUserRoles];
|
||||
return [[self _appointmentWrapper] creator];
|
||||
}
|
||||
|
||||
if (isNew)
|
||||
rc = [roles containsObject: SOGoRole_ObjectCreator];
|
||||
else
|
||||
rc = ([roles containsObject: SOGoCalendarRole_ComponentModifier]
|
||||
|| [roles containsObject: SOGoCalendarRole_ComponentResponder]);
|
||||
|
||||
return rc;
|
||||
- (NSString *) owner
|
||||
{
|
||||
return [[self _appointmentWrapper] owner];
|
||||
}
|
||||
|
||||
- (void) _updateAttachedEvents
|
||||
@@ -632,6 +622,7 @@ static Class NSArrayK, MAPIStoreAppointmentWrapperK;
|
||||
[masterEvent updateFromMAPIProperties: properties
|
||||
inUserContext: [self userContext]
|
||||
withActiveUser: activeUser
|
||||
isNew: isNew
|
||||
inMemCtx: memCtx];
|
||||
[self _updateAttachedEvents];
|
||||
[[self userContext] activate];
|
||||
|
||||
@@ -92,52 +92,52 @@
|
||||
return [container lastModificationTime];
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachEncoding: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagAttachEncoding: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
{
|
||||
*data = [[NSData data] asBinaryInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachmentFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachmentFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachmentHidden: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachmentHidden: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachmentLinkId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachmentLinkId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachMethod: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachMethod: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, 0x00000001);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachmentContactPhoto: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachmentContactPhoto: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getYes: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachDataBinary: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachDataBinary: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
if (!photoData)
|
||||
ASSIGN (photoData,
|
||||
@@ -148,8 +148,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachSize: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachSize: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
if (!photoData)
|
||||
ASSIGN (photoData,
|
||||
@@ -160,16 +160,16 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachExtension: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachExtension: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [[self fileExtension] asUnicodeInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachLongFilename: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachLongFilename: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *filename;
|
||||
|
||||
@@ -181,15 +181,15 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachFilename: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachFilename: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidTagAttachLongFilename: data
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidTagAttachLongFilename: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
@@ -74,18 +74,34 @@
|
||||
|
||||
- (NSArray *) rolesForExchangeRights: (uint32_t) rights
|
||||
{
|
||||
/* Limitations
|
||||
|
||||
Following rights are not supported by SOGo specifically:
|
||||
|
||||
- CreateSubfolders: No contacts subfolders
|
||||
- FolderVisible: It is inferred by other rights when extracting
|
||||
*/
|
||||
NSMutableArray *roles;
|
||||
|
||||
roles = [NSMutableArray arrayWithCapacity: 6];
|
||||
roles = [NSMutableArray arrayWithCapacity: 8];
|
||||
if (rights & RightsCreateItems)
|
||||
[roles addObject: SOGoRole_ObjectCreator];
|
||||
if (rights & RightsDeleteAll)
|
||||
[roles addObject: SOGoRole_ObjectEraser];
|
||||
if (rights & RightsDeleteOwn)
|
||||
[roles addObject: MAPIStoreRightDeleteOwn];
|
||||
if (rights & RightsEditAll)
|
||||
[roles addObject: SOGoRole_ObjectEditor];
|
||||
if (rights & RightsEditOwn)
|
||||
[roles addObject: MAPIStoreRightEditOwn];
|
||||
if (rights & RightsReadItems)
|
||||
[roles addObject: SOGoRole_ObjectViewer];
|
||||
|
||||
if (rights & RightsFolderOwner)
|
||||
[roles addObject: MAPIStoreRightFolderOwner];
|
||||
if (rights & RightsFolderContact)
|
||||
[roles addObject: MAPIStoreRightFolderContact];
|
||||
|
||||
return roles;
|
||||
}
|
||||
|
||||
@@ -95,15 +111,28 @@
|
||||
|
||||
if ([roles containsObject: SOGoRole_ObjectCreator])
|
||||
rights |= RightsCreateItems;
|
||||
|
||||
if ([roles containsObject: SOGoRole_ObjectEraser])
|
||||
rights |= RightsDeleteAll | RightsDeleteOwn;
|
||||
else if ([roles containsObject: MAPIStoreRightDeleteOwn])
|
||||
rights |= RightsDeleteOwn;
|
||||
|
||||
if ([roles containsObject: SOGoRole_ObjectEditor])
|
||||
rights |= RightsEditAll | RightsEditOwn;
|
||||
else if ([roles containsObject: MAPIStoreRightEditOwn])
|
||||
rights |= RightsEditOwn;
|
||||
|
||||
if ([roles containsObject: SOGoRole_ObjectViewer])
|
||||
rights |= RightsReadItems;
|
||||
if (rights != 0)
|
||||
rights |= RoleNone; /* actually "folder visible" */
|
||||
|
||||
if ([roles containsObject: MAPIStoreRightFolderOwner])
|
||||
rights |= RightsFolderOwner | RoleNone;
|
||||
|
||||
if ([roles containsObject: MAPIStoreRightFolderContact])
|
||||
rights |= RightsFolderContact;
|
||||
|
||||
return rights;
|
||||
}
|
||||
|
||||
@@ -117,8 +146,8 @@
|
||||
return [[self activeUserRoles] containsObject: SOGoRole_ObjectViewer];
|
||||
}
|
||||
|
||||
- (int) getPidTagDefaultPostMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDefaultPostMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"IPM.Contact" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
|
||||
@@ -31,9 +31,11 @@
|
||||
#import <NGCards/NGVCardPhoto.h>
|
||||
#import <NGCards/NSArray+NGCards.h>
|
||||
#import <NGCards/NSString+NGCards.h>
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
#import <Contacts/SOGoContactGCSEntry.h>
|
||||
#import <Mailer/NSString+Mail.h>
|
||||
#import <SOGo/SOGoPermissions.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserManager.h>
|
||||
|
||||
#import "MAPIStoreAttachment.h"
|
||||
@@ -104,8 +106,8 @@
|
||||
return element;
|
||||
}
|
||||
|
||||
- (int) getPidTagIconIndex: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagIconIndex: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
/* see http://msdn.microsoft.com/en-us/library/cc815472.aspx */
|
||||
*data = MAPILongValue (memCtx, 0x00000200);
|
||||
@@ -113,52 +115,52 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAlternateRecipientAllowed: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAlternateRecipientAllowed: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
|
||||
{
|
||||
return [self getYes: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagMessageFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, MSGFLAG_READ);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagDeleteAfterSubmit: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDeleteAfterSubmit: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = talloc_strdup (memCtx, "IPM.Contact");
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagSendInternetEncoding: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSendInternetEncoding: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, 0x00065001);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagNormalizedSubject: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagNormalizedSubject: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidTagDisplayName: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidFileUnder: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidFileUnder: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *surName, *givenName, *middleName;
|
||||
NSMutableString *fileUnder;
|
||||
@@ -184,22 +186,22 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidFileUnderId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidFileUnderId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, 0x00008017); /* what ol2003 sets */
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAccount: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAccount: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidLidEmail1EmailAddress: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagContactEmailAddresses: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagContactEmailAddresses: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
|
||||
@@ -212,8 +214,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagEmsAbTargetAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagEmsAbTargetAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
|
||||
@@ -224,8 +226,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagSearchKey: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSearchKey: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
|
||||
@@ -236,16 +238,16 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagMailPermission: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMailPermission: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getYes: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
NSString *stringValue;
|
||||
|
||||
stringValue = [[sogoObject vCard] note];
|
||||
@@ -257,8 +259,8 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagSensitivity: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSensitivity: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
@@ -267,8 +269,8 @@
|
||||
// Contact Name Properties [MS-OXOCNTC 2.2.1.1]
|
||||
// ---------------------------------------------------------
|
||||
|
||||
- (int) getPidTagNickname: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagNickname: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
|
||||
@@ -278,8 +280,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagGeneration: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagGeneration: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
|
||||
@@ -291,8 +293,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagSurname: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSurname: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
|
||||
@@ -304,8 +306,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagMiddleName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMiddleName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
|
||||
@@ -317,8 +319,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagGivenName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagGivenName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
|
||||
@@ -330,8 +332,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagDisplayNamePrefix: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDisplayNamePrefix: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
|
||||
@@ -398,9 +400,9 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
Store on *data the given email (position)
|
||||
It can return MAPISTORE_ERR_NOT_FOUND if the email doesn't exist
|
||||
*/
|
||||
- (int) _getPidLidEmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
atPosition: (NSUInteger) position
|
||||
- (enum mapistore_error) _getPidLidEmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
atPosition: (NSUInteger) position
|
||||
{
|
||||
NSString *email;
|
||||
|
||||
@@ -412,60 +414,60 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail1EmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail1EmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getPidLidEmailAddress: data inMemCtx: memCtx atPosition: 1];
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail2EmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail2EmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getPidLidEmailAddress: data inMemCtx: memCtx atPosition: 2];
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail3EmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail3EmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getPidLidEmailAddress: data inMemCtx: memCtx atPosition: 3];
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail1OriginalDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail1OriginalDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidLidEmail1EmailAddress: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail2OriginalDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail2OriginalDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidLidEmail2EmailAddress: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail3OriginalDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail3OriginalDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidLidEmail3EmailAddress: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail1AddressType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail1AddressType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
if (![self _fetchEmailAddress: 1]) return MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
return [self getSMTPAddrType: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail2AddressType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail2AddressType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
if (![self _fetchEmailAddress: 2]) return MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
return [self getSMTPAddrType: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail3AddressType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail3AddressType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
if (![self _fetchEmailAddress: 3]) return MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
@@ -476,9 +478,9 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
Store on *data a string with the display name for the given email (position)
|
||||
It can return MAPISTORE_ERR_NOT_FOUND if the email doesn't exist
|
||||
*/
|
||||
- (int) _getPidLidEmailDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
atPosition: (NSUInteger) position
|
||||
- (enum mapistore_error) _getPidLidEmailDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
atPosition: (NSUInteger) position
|
||||
{
|
||||
NGVCard *vCard;
|
||||
NSString *fn, *email;
|
||||
@@ -495,20 +497,20 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail1DisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail1DisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getPidLidEmailDisplayName: data inMemCtx: memCtx atPosition: 1];
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail2DisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail2DisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getPidLidEmailDisplayName: data inMemCtx: memCtx atPosition: 2];
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail3DisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail3DisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getPidLidEmailDisplayName: data inMemCtx: memCtx atPosition: 3];
|
||||
}
|
||||
@@ -544,9 +546,9 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
Store on *data an entryId for the given email (position)
|
||||
It can return MAPISTORE_ERR_NOT_FOUND if the email doesn't exist
|
||||
*/
|
||||
- (int) _getPidLidEmailOriginalEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
atPosition: (NSUInteger) position
|
||||
- (enum mapistore_error) _getPidLidEmailOriginalEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
atPosition: (NSUInteger) position
|
||||
{
|
||||
NSData *value;
|
||||
|
||||
@@ -558,36 +560,36 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail1OriginalEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail1OriginalEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getPidLidEmailOriginalEntryId: data
|
||||
inMemCtx: memCtx
|
||||
atPosition: 1];
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail2OriginalEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail2OriginalEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getPidLidEmailOriginalEntryId: data
|
||||
inMemCtx: memCtx
|
||||
atPosition: 2];
|
||||
}
|
||||
|
||||
- (int) getPidLidEmail3OriginalEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidEmail3OriginalEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getPidLidEmailOriginalEntryId: data
|
||||
inMemCtx: memCtx
|
||||
atPosition: 3];
|
||||
}
|
||||
|
||||
- (int) _getElement: (NSString *) elementTag
|
||||
ofType: (NSString *) aType
|
||||
excluding: (NSString *) aTypeToExclude
|
||||
atPos: (NSUInteger) pos
|
||||
inData: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) _getElement: (NSString *) elementTag
|
||||
ofType: (NSString *) aType
|
||||
excluding: (NSString *) aTypeToExclude
|
||||
atPos: (NSUInteger) pos
|
||||
inData: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSArray *elements;
|
||||
CardElement *ce;
|
||||
@@ -611,15 +613,15 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
}
|
||||
|
||||
if (!stringValue)
|
||||
stringValue = @"";
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagBusinessFaxNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagBusinessFaxNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"tel" ofType: @"fax" excluding: nil
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
@@ -656,30 +658,39 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return list;
|
||||
}
|
||||
|
||||
- (int) getPidLidAddressBookProviderArrayType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidAddressBookProviderArrayType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
// [MS-OXOCNTC] 2.2.1.2.12
|
||||
// https://msdn.microsoft.com/en-us/library/ee218011%28v=exchg.80%29.aspx
|
||||
uint32_t value = 0;
|
||||
NSArray *emailList = [self _buildAddressBookProviderEmailList];
|
||||
|
||||
for (NSNumber *maskValue in emailList)
|
||||
value |= 1 << [maskValue intValue];
|
||||
if ([emailList count] > 0)
|
||||
{
|
||||
for (NSNumber *maskValue in emailList)
|
||||
value |= 1 << [maskValue intValue];
|
||||
|
||||
*data = MAPILongValue (memCtx, value);
|
||||
*data = MAPILongValue (memCtx, value);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
else
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidLidAddressBookProviderEmailList: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidAddressBookProviderEmailList: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSArray *emailList = [self _buildAddressBookProviderEmailList];
|
||||
|
||||
*data = [emailList asMVLongInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
if ([emailList count] > 0)
|
||||
{
|
||||
*data = [emailList asMVLongInMemCtx: memCtx];
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
else
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
@@ -688,49 +699,49 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
|
||||
// Home Address
|
||||
|
||||
- (int) getPidTagHomeAddressStreet: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagHomeAddressStreet: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
||||
atPos: 2 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagHomeAddressCity: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagHomeAddressCity: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
||||
atPos: 3 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagHomeAddressStateOrProvince: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagHomeAddressStateOrProvince: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
||||
atPos: 4 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagHomeAddressPostalCode: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagHomeAddressPostalCode: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
||||
atPos: 5 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
- (int) getPidTagHomeAddressCountry: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagHomeAddressCountry: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
||||
atPos: 6 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagHomeAddressPostOfficeBox: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagHomeAddressPostOfficeBox: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidHomeAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidHomeAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"label" ofType: @"home" excluding: nil
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
@@ -738,50 +749,50 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
|
||||
// Work Address
|
||||
|
||||
- (int) getPidLidWorkAddressStreet: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidWorkAddressStreet: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"work" excluding: nil
|
||||
atPos: 2 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidWorkAddressCity: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidWorkAddressCity: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"work" excluding: nil
|
||||
atPos: 3 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidWorkAddressState: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidWorkAddressState: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"work" excluding: nil
|
||||
atPos: 4 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidWorkAddressPostalCode: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidWorkAddressPostalCode: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"work" excluding: nil
|
||||
atPos: 5 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidWorkAddressCountry: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidWorkAddressCountry: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"work" excluding: nil
|
||||
atPos: 6 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidWorkAddressPostOfficeBox: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidWorkAddressPostOfficeBox: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"work" excluding: nil
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidWorkAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidWorkAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"label" ofType: @"work" excluding: nil
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
@@ -789,57 +800,57 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
|
||||
// Mailing Address
|
||||
|
||||
- (int) getPidTagStreetAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagStreetAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
||||
atPos: 2 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagLocality: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagLocality: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
||||
atPos: 3 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagStateOrProvince: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagStateOrProvince: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
||||
atPos: 4 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagPostalCode: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagPostalCode: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
||||
atPos: 5 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagCountry: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagCountry: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
||||
atPos: 6 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagPostOfficeBox: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagPostOfficeBox: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagPostalAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagPostalAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"label" ofType: @"pref" excluding: nil
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidPostalAddressId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidPostalAddressId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSArray *elements;
|
||||
CardElement *element;
|
||||
@@ -869,36 +880,36 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
// Telephone Properties [MS-OXOCNTC 2.2.1.4]
|
||||
// -------------------------------------------------------
|
||||
|
||||
- (int) getPidTagPagerTelephoneNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagPagerTelephoneNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"tel" ofType: @"pager" excluding: nil
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagBusinessTelephoneNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagBusinessTelephoneNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"tel" ofType: @"work" excluding: @"fax"
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagHomeTelephoneNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagHomeTelephoneNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"tel" ofType: @"home" excluding: @"fax"
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagPrimaryTelephoneNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagPrimaryTelephoneNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"tel" ofType: @"pref" excluding: nil
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagMobileTelephoneNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMobileTelephoneNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"tel" ofType: @"cell" excluding: nil
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
@@ -908,12 +919,12 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
// Event Properties [MS-OXOCNTC 2.2.1.5]
|
||||
// ---------------------------------------------------------
|
||||
|
||||
- (int) getPidTagBirthday: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagBirthday: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSCalendarDate *dateValue;
|
||||
NSString *stringValue;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
|
||||
stringValue = [[sogoObject vCard] bday];
|
||||
if ([stringValue length] != 0)
|
||||
@@ -929,12 +940,12 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagWeddingAnniversary: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagWeddingAnniversary: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSCalendarDate *dateValue;
|
||||
NSString *stringValue;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
|
||||
stringValue = [[[sogoObject vCard] uniqueChildWithTag: @"x-ms-anniversary"]
|
||||
flattenedValuesForKey: @""];
|
||||
@@ -954,8 +965,8 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
// Professional Properties [MS-OXOCNTC 2.2.1.6]
|
||||
// ---------------------------------------------------------
|
||||
|
||||
- (int) getPidTagTitle: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagTitle: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
|
||||
@@ -965,8 +976,8 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagCompanyName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagCompanyName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
CardElement *org;
|
||||
|
||||
@@ -977,8 +988,8 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagDepartmentName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDepartmentName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
CardElement *org;
|
||||
|
||||
@@ -989,11 +1000,11 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagOfficeLocation: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagOfficeLocation: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
|
||||
stringValue = [[[sogoObject vCard] uniqueChildWithTag: @"x-ms-office"]
|
||||
flattenedValuesForKey: @""];
|
||||
@@ -1005,11 +1016,11 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagManagerName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagManagerName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
|
||||
stringValue = [[[sogoObject vCard] uniqueChildWithTag: @"x-ms-manager"]
|
||||
flattenedValuesForKey: @""];
|
||||
@@ -1021,11 +1032,11 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagAssistant: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAssistant: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
|
||||
stringValue = [[[sogoObject vCard] uniqueChildWithTag: @"x-ms-assistant"]
|
||||
flattenedValuesForKey: @""];
|
||||
@@ -1037,11 +1048,11 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagProfession: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagProfession: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
|
||||
stringValue = [[sogoObject vCard] role];
|
||||
if (stringValue)
|
||||
@@ -1080,8 +1091,8 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
fetchedAttachments = YES;
|
||||
}
|
||||
|
||||
- (int) getPidLidHasPicture: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidHasPicture: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
if (!fetchedAttachments)
|
||||
[self _fetchAttachmentParts];
|
||||
@@ -1154,11 +1165,11 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
// Other Properties [MS-OXOCNTC 2.2.1.10]
|
||||
// ---------------------------------------------------------
|
||||
|
||||
- (int) getPidTagSpouseName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSpouseName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
|
||||
stringValue = [[[sogoObject vCard] uniqueChildWithTag: @"x-ms-spouse"]
|
||||
flattenedValuesForKey: @""];
|
||||
@@ -1170,8 +1181,8 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidLidInstantMessagingAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidInstantMessagingAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
|
||||
@@ -1184,11 +1195,11 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidFreeBusyLocation: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidFreeBusyLocation: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
|
||||
stringValue = [[[sogoObject vCard] uniqueChildWithTag: @"fburl"]
|
||||
flattenedValuesForKey: @""];
|
||||
@@ -1200,38 +1211,43 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagPersonalHomePage: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagPersonalHomePage: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"url" ofType: @"home" excluding: nil
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagBusinessHomePage: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagBusinessHomePage: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getElement: @"url" ofType: @"work" excluding: nil
|
||||
atPos: 0 inData: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// Permissions
|
||||
// ---------------------------------------------------------
|
||||
|
||||
- (NSString *) creator
|
||||
{
|
||||
return [[[sogoObject vCard] uniqueChildWithTag: @"x-openchange-creator"]
|
||||
flattenedValuesForKey: @""];
|
||||
}
|
||||
|
||||
- (NSString *) owner
|
||||
{
|
||||
return [self creator];
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanReadMessage
|
||||
{
|
||||
return [[self activeUserRoles] containsObject: SOGoRole_ObjectViewer];
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanModifyMessage
|
||||
{
|
||||
NSArray *roles;
|
||||
|
||||
roles = [self activeUserRoles];
|
||||
|
||||
return ((isNew
|
||||
&& [roles containsObject: SOGoRole_ObjectCreator])
|
||||
|| (!isNew && [roles containsObject: SOGoRole_ObjectEditor]));
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// Save
|
||||
// ---------------------------------------------------------
|
||||
- (void) saveDistList:(TALLOC_CTX *) memCtx
|
||||
{
|
||||
[self warnWithFormat: @"IPM.DistList messages are ignored"];
|
||||
@@ -1575,6 +1591,14 @@ enum { // [MS-OXOCNTC] 2.2.1.2.11
|
||||
if (value)
|
||||
[newCard setNote: value];
|
||||
|
||||
/* Store the creator name for sharing purposes */
|
||||
if (isNew)
|
||||
{
|
||||
value = [[[self context] activeUser] login];
|
||||
[[newCard uniqueChildWithTag: @"x-openchange-creator"]
|
||||
setSingleValue: value forKey: @""];
|
||||
}
|
||||
|
||||
//
|
||||
// we save the new/modified card
|
||||
//
|
||||
|
||||
@@ -72,10 +72,10 @@
|
||||
forUser: (NSString *) username
|
||||
withRole: (enum mapistore_context_role) role;
|
||||
|
||||
+ (int) openContext: (MAPIStoreContext **) contextPtr
|
||||
withURI: (const char *) newUri
|
||||
connectionInfo: (struct mapistore_connection_info *) newConnInfo
|
||||
andTDBIndexing: (struct indexing_context *) indexing;
|
||||
+ (enum mapistore_error) openContext: (MAPIStoreContext **) contextPtr
|
||||
withURI: (const char *) newUri
|
||||
connectionInfo: (struct mapistore_connection_info *) newConnInfo
|
||||
andTDBIndexing: (struct indexing_context *) indexing;
|
||||
|
||||
- (id) initFromURL: (NSURL *) newUri
|
||||
withConnectionInfo: (struct mapistore_connection_info *) newConnInfo
|
||||
@@ -91,11 +91,11 @@
|
||||
// - (id) lookupObject: (NSString *) objectURLString;
|
||||
|
||||
/* backend methods */
|
||||
- (int) getPath: (char **) path
|
||||
ofFMID: (uint64_t) fmid
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getRootFolder: (MAPIStoreFolder **) folderPtr
|
||||
withFID: (uint64_t) fmid;
|
||||
- (enum mapistore_error) getPath: (char **) path
|
||||
ofFMID: (uint64_t) fmid
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getRootFolder: (MAPIStoreFolder **) folderPtr
|
||||
withFID: (uint64_t) fmid;
|
||||
|
||||
/* util methods */
|
||||
- (NSString *) extractChildNameFromURL: (NSString *) childURL
|
||||
|
||||
@@ -212,16 +212,16 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri)
|
||||
return completeURL;
|
||||
}
|
||||
|
||||
+ (int) openContext: (MAPIStoreContext **) contextPtr
|
||||
withURI: (const char *) newUri
|
||||
connectionInfo: (struct mapistore_connection_info *) newConnInfo
|
||||
andTDBIndexing: (struct indexing_context *) indexing
|
||||
+ (enum mapistore_error) openContext: (MAPIStoreContext **) contextPtr
|
||||
withURI: (const char *) newUri
|
||||
connectionInfo: (struct mapistore_connection_info *) newConnInfo
|
||||
andTDBIndexing: (struct indexing_context *) indexing
|
||||
{
|
||||
MAPIStoreContext *context;
|
||||
Class contextClass;
|
||||
NSString *module;
|
||||
NSURL *baseURL;
|
||||
int rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
enum mapistore_error rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
context = nil;
|
||||
|
||||
@@ -338,11 +338,11 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri)
|
||||
return activeUser;
|
||||
}
|
||||
|
||||
- (int) getPath: (char **) path
|
||||
ofFMID: (uint64_t) fmid
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPath: (char **) path
|
||||
ofFMID: (uint64_t) fmid
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
NSString *objectURL, *url;
|
||||
|
||||
url = [contextUrl absoluteString];
|
||||
@@ -379,8 +379,8 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri)
|
||||
{
|
||||
}
|
||||
|
||||
- (int) getRootFolder: (MAPIStoreFolder **) folderPtr
|
||||
withFID: (uint64_t) newFid
|
||||
- (enum mapistore_error) getRootFolder: (MAPIStoreFolder **) folderPtr
|
||||
withFID: (uint64_t) newFid
|
||||
{
|
||||
enum mapistore_error rc;
|
||||
MAPIStoreFolder *baseFolder;
|
||||
@@ -438,8 +438,16 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri)
|
||||
mapiStoreObjectWithSOGoObject: currentFolder
|
||||
inContainer: nil];
|
||||
[baseFolder setContext: self];
|
||||
*folderPtr = baseFolder;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
|
||||
if ([[userContext sogoUser] isEqual: activeUser]
|
||||
|| [baseFolder subscriberCanReadMessages])
|
||||
{
|
||||
*folderPtr = baseFolder;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
else
|
||||
rc = MAPISTORE_ERR_DENIED;
|
||||
|
||||
}
|
||||
else if ([[userContext sogoUser] isEqual: activeUser])
|
||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
@@ -494,8 +502,11 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri)
|
||||
mappingId = [mapping idFromURL: childURL];
|
||||
if (mappingId == NSNotFound)
|
||||
{
|
||||
const char *owner;
|
||||
|
||||
[self logWithFormat: @"No id exist yet for '%@', requesting one", childURL];
|
||||
ret = mapistore_indexing_get_new_folderID (connInfo->mstore_ctx, &mappingId);
|
||||
owner = [[userContext username] UTF8String];
|
||||
ret = mapistore_indexing_get_new_folderID_as_user (connInfo->mstore_ctx, owner, &mappingId);
|
||||
if (ret == MAPISTORE_SUCCESS)
|
||||
[mapping registerURL: childURL withID: mappingId];
|
||||
else
|
||||
@@ -506,36 +517,56 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri)
|
||||
return mappingId;
|
||||
}
|
||||
|
||||
/* Get new change number from openchange db interface using
|
||||
resource's owner user */
|
||||
- (uint64_t) getNewChangeNumber
|
||||
{
|
||||
const char *owner;
|
||||
enum MAPISTATUS retval;
|
||||
uint64_t newVersionNumber;
|
||||
|
||||
if (openchangedb_get_new_changeNumber (connInfo->oc_ctx, connInfo->username, &newVersionNumber)
|
||||
!= MAPI_E_SUCCESS)
|
||||
abort ();
|
||||
owner = [[userContext username] UTF8String];
|
||||
retval = openchangedb_get_new_changeNumber (connInfo->oc_ctx, owner, &newVersionNumber);
|
||||
if (retval != MAPI_E_SUCCESS)
|
||||
[NSException raise: @"MAPIStoreIOException"
|
||||
format: @"Impossible to get new change number for %s: %s", owner,
|
||||
mapi_get_errstr (retval)];
|
||||
|
||||
return newVersionNumber;
|
||||
}
|
||||
|
||||
/* Get new change numbers from openchange db interface using
|
||||
resource's owner user */
|
||||
- (NSArray *) getNewChangeNumbers: (uint64_t) max
|
||||
{
|
||||
const char *owner;
|
||||
enum MAPISTATUS retval;
|
||||
TALLOC_CTX *memCtx;
|
||||
NSMutableArray *newChangeNumbers;
|
||||
uint64_t count;
|
||||
struct UI8Array_r *numbers;
|
||||
NSString *newNumber;
|
||||
|
||||
memCtx = talloc_zero(NULL, TALLOC_CTX);
|
||||
memCtx = talloc_new (NULL);
|
||||
if (!memCtx)
|
||||
[NSException raise: @"MAPIStoreIOException"
|
||||
format: @"Not enough memory to allocate change numbers"];
|
||||
|
||||
newChangeNumbers = [NSMutableArray arrayWithCapacity: max];
|
||||
owner = [[userContext username] UTF8String];
|
||||
|
||||
retval = openchangedb_get_new_changeNumbers (connInfo->oc_ctx, memCtx, owner, max, &numbers);
|
||||
if (retval != MAPI_E_SUCCESS || numbers->cValues != max)
|
||||
{
|
||||
talloc_free (memCtx);
|
||||
[NSException raise: @"MAPIStoreIOException"
|
||||
format: @"Failing to get %d new change numbers: %s", max,
|
||||
mapi_get_errstr (retval)];
|
||||
}
|
||||
|
||||
if (openchangedb_get_new_changeNumbers (connInfo->oc_ctx,
|
||||
memCtx, connInfo->username, max, &numbers)
|
||||
!= MAPI_E_SUCCESS || numbers->cValues != max)
|
||||
abort ();
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
newNumber
|
||||
= [NSString stringWithUnsignedLongLong: numbers->lpui8[count]];
|
||||
newNumber = [NSString stringWithUnsignedLongLong: numbers->lpui8[count]];
|
||||
[newChangeNumbers addObject: newNumber];
|
||||
}
|
||||
|
||||
@@ -544,29 +575,31 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri)
|
||||
return newChangeNumbers;
|
||||
}
|
||||
|
||||
/* Get new fmids from mapistore_indexing interface using resource's
|
||||
owner user */
|
||||
- (NSArray *) getNewFMIDs: (uint64_t) max
|
||||
{
|
||||
TALLOC_CTX *memCtx;
|
||||
const char *owner;
|
||||
enum mapistore_error ret;
|
||||
NSMutableArray *newFMIDs;
|
||||
uint64_t count;
|
||||
struct UI8Array_r *numbers;
|
||||
NSString *newNumber;
|
||||
uint64_t count, newFID;
|
||||
|
||||
memCtx = talloc_zero(NULL, TALLOC_CTX);
|
||||
newFMIDs = [NSMutableArray arrayWithCapacity: max];
|
||||
/* Get the resource's owner name */
|
||||
owner = [[userContext username] UTF8String];
|
||||
|
||||
if (mapistore_indexing_get_new_folderIDs (connInfo->mstore_ctx,
|
||||
memCtx, max, &numbers)
|
||||
!= MAPISTORE_SUCCESS || numbers->cValues != max)
|
||||
abort ();
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
newNumber = [NSString stringWithUnsignedLongLong: numbers->lpui8[count]];
|
||||
ret = mapistore_indexing_get_new_folderID_as_user (connInfo->mstore_ctx, owner, &newFID);
|
||||
if (ret != MAPISTORE_SUCCESS)
|
||||
[NSException raise: @"MAPIStoreIOException"
|
||||
format: @"Impossible to get new fmid for %s", owner];
|
||||
|
||||
newNumber = [NSString stringWithUnsignedLongLong: newFID];
|
||||
[newFMIDs addObject: newNumber];
|
||||
}
|
||||
|
||||
talloc_free (memCtx);
|
||||
|
||||
return newFMIDs;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,16 @@
|
||||
|
||||
#import "MAPIStoreFolder.h"
|
||||
|
||||
extern NSString *MAPIStoreRightReadItems;
|
||||
extern NSString *MAPIStoreRightCreateItems;
|
||||
extern NSString *MAPIStoreRightEditOwn;
|
||||
extern NSString *MAPIStoreRightEditAll;
|
||||
extern NSString *MAPIStoreRightDeleteOwn;
|
||||
extern NSString *MAPIStoreRightDeleteAll;
|
||||
extern NSString *MAPIStoreRightCreateSubfolders;
|
||||
extern NSString *MAPIStoreRightFolderOwner;
|
||||
extern NSString *MAPIStoreRightFolderContact;
|
||||
|
||||
@interface MAPIStoreDBFolder : MAPIStoreFolder
|
||||
|
||||
@end
|
||||
|
||||
@@ -51,16 +51,6 @@
|
||||
|
||||
static Class EOKeyValueQualifierK, SOGoCacheGCSFolderK, MAPIStoreDBFolderK;
|
||||
|
||||
static NSString *MAPIStoreRightReadItems = @"RightsReadItems";
|
||||
static NSString *MAPIStoreRightCreateItems = @"RightsCreateItems";
|
||||
static NSString *MAPIStoreRightEditOwn = @"RightsEditOwn";
|
||||
static NSString *MAPIStoreRightEditAll = @"RightsEditAll";
|
||||
static NSString *MAPIStoreRightDeleteOwn = @"RightsDeleteOwn";
|
||||
static NSString *MAPIStoreRightDeleteAll = @"RightsDeleteAll";
|
||||
static NSString *MAPIStoreRightCreateSubfolders = @"RightsCreateSubfolders";
|
||||
static NSString *MAPIStoreRightFolderOwner = @"RightsFolderOwner";
|
||||
static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
|
||||
|
||||
@implementation MAPIStoreDBFolder
|
||||
|
||||
+ (void) initialize
|
||||
@@ -355,8 +345,7 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
|
||||
|
||||
- (BOOL) subscriberCanModifyMessages
|
||||
{
|
||||
return ([self _testRoleForActiveUser: MAPIStoreRightEditAll]
|
||||
|| [self _testRoleForActiveUser: MAPIStoreRightEditOwn]);
|
||||
return [self _testRoleForActiveUser: MAPIStoreRightEditAll];
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanReadMessages
|
||||
@@ -377,8 +366,7 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
|
||||
|
||||
- (BOOL) subscriberCanDeleteMessages
|
||||
{
|
||||
return ([self _testRoleForActiveUser: MAPIStoreRightDeleteAll]
|
||||
|| [self _testRoleForActiveUser: MAPIStoreRightDeleteOwn]);
|
||||
return [self _testRoleForActiveUser: MAPIStoreRightDeleteAll];
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanCreateSubFolders
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
#import <SOGo/SOGoFolder.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
|
||||
#import "MAPIStoreContext.h"
|
||||
#import "MAPIStorePropertySelectors.h"
|
||||
@@ -282,7 +285,7 @@
|
||||
// We might get there if for some reasons, all classes weren't able
|
||||
// to tell us the message class.
|
||||
//
|
||||
- (int) getPidTagMessageClass: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageClass: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"IPM.Note" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
@@ -291,10 +294,10 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getProperties: (struct mapistore_property_data *) data
|
||||
withTags: (enum MAPITAGS *) tags
|
||||
andCount: (uint16_t) columnCount
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getProperties: (struct mapistore_property_data *) data
|
||||
withTags: (enum MAPITAGS *) tags
|
||||
andCount: (uint16_t) columnCount
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
[sogoObject reloadIfNeeded];
|
||||
|
||||
@@ -304,12 +307,12 @@
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getProperty: (void **) data
|
||||
withTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getProperty: (void **) data
|
||||
withTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
id value;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
value = [properties objectForKey: MAPIPropertyKey (propTag)];
|
||||
if (value)
|
||||
@@ -346,6 +349,16 @@
|
||||
/* Update PredecessorChangeList accordingly */
|
||||
[self _updatePredecessorChangeList];
|
||||
|
||||
if (isNew)
|
||||
{
|
||||
NSString *lastModifierName;
|
||||
|
||||
lastModifierName = (NSString *)[properties objectForKey: MAPIPropertyKey (PidTagLastModifierName)];
|
||||
if ([lastModifierName length] > 0)
|
||||
[properties setObject: lastModifierName
|
||||
forKey: MAPIPropertyKey (PidTagCreatorName)];
|
||||
}
|
||||
|
||||
// [self logWithFormat: @"Saving %@", [self description]];
|
||||
// [self logWithFormat: @"%d props in dict", [properties count]];
|
||||
|
||||
@@ -364,20 +377,77 @@
|
||||
return [msgClass isEqualToString: @"IPM.Microsoft.ScheduleData.FreeBusy"];
|
||||
}
|
||||
|
||||
/* TODO: differentiate between the "Own" and "All" cases */
|
||||
//-----------------------------
|
||||
// Permissions
|
||||
//-----------------------------
|
||||
|
||||
- (BOOL) subscriberCanReadMessage
|
||||
{
|
||||
return [(MAPIStoreFolder *) container subscriberCanReadMessages];
|
||||
// || [self _messageIsFreeBusy]);
|
||||
}
|
||||
|
||||
- (SOGoUser *) _ownerUser
|
||||
{
|
||||
NSString *ownerName;
|
||||
SOGoUser *ownerUser = nil;
|
||||
|
||||
ownerName = [properties objectForKey: MAPIPropertyKey (PidTagCreatorName)];
|
||||
if ([ownerName length] > 0)
|
||||
ownerUser = [SOGoUser userWithLogin: ownerName];
|
||||
|
||||
return ownerUser;
|
||||
}
|
||||
|
||||
- (NSArray *) activeUserRoles
|
||||
{
|
||||
/* Override because of this exception: NSInvalidArgumentException,
|
||||
reason: [SOGoMAPIDBMessage-aclsForUser:] should be overridden by
|
||||
subclass */
|
||||
if (!activeUserRoles)
|
||||
{
|
||||
SOGoUser *activeUser;
|
||||
|
||||
activeUser = [[self context] activeUser];
|
||||
activeUserRoles = [[container aclFolder] aclsForUser: [activeUser login]];
|
||||
[activeUserRoles retain];
|
||||
}
|
||||
|
||||
return activeUserRoles;
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanModifyMessage
|
||||
{
|
||||
return ((isNew
|
||||
&& [(MAPIStoreFolder *) container subscriberCanCreateMessages])
|
||||
|| (!isNew
|
||||
&& [(MAPIStoreFolder *) container subscriberCanModifyMessages]));
|
||||
// || [self _messageIsFreeBusy]);
|
||||
BOOL rc;
|
||||
NSArray *roles;
|
||||
|
||||
roles = [self activeUserRoles];
|
||||
|
||||
if (isNew)
|
||||
rc = [(MAPIStoreFolder *) container subscriberCanCreateMessages];
|
||||
else
|
||||
rc = [roles containsObject: MAPIStoreRightEditAll];
|
||||
|
||||
/* Check if the message is owned and it has permission to edit it */
|
||||
if (!rc && [roles containsObject: MAPIStoreRightEditOwn])
|
||||
rc = [[[container context] activeUser] isEqual: [self _ownerUser]];
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanDeleteMessage
|
||||
{
|
||||
BOOL rc;
|
||||
NSArray *roles;
|
||||
|
||||
roles = [self activeUserRoles];
|
||||
|
||||
rc = [roles containsObject: MAPIStoreRightDeleteAll];
|
||||
|
||||
/* Check if the message is owned and it has permission to delete it */
|
||||
if (!rc && [roles containsObject: MAPIStoreRightDeleteOwn])
|
||||
rc = [[[container context] activeUser] isEqual: [self _ownerUser]];
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (NSDate *) creationTime
|
||||
|
||||
@@ -56,81 +56,81 @@ static Class MAPIStoreAttachmentK;
|
||||
idForObjectWithKey: objectKey];
|
||||
}
|
||||
|
||||
- (int) getPidTagAccessLevel: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAccessLevel: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
/* disabled properties */
|
||||
- (int) getPidTagFolderId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagFolderId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagChangeKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagChangeKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagSourceKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSourceKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagParentSourceKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagParentSourceKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagChangeNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagChangeNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagInstID: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagInstID: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagInstanceNum: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagInstanceNum: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagRowType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagRowType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagDepth: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDepth: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagIconIndex: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagIconIndex: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagGenerateExchangeViews: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagGenerateExchangeViews: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagOriginalMessageClass: (void **) dataa
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagOriginalMessageClass: (void **) dataa
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#import "MAPIStoreActiveTables.h"
|
||||
#import "MAPIStoreContext.h"
|
||||
#import "MAPIStoreFolder.h"
|
||||
#import "MAPIStoreUserContext.h"
|
||||
#import "NSObject+MAPIStore.h"
|
||||
|
||||
@@ -45,8 +46,8 @@
|
||||
andType: MAPISTORE_FAI_TABLE];
|
||||
}
|
||||
|
||||
- (int) getPidTagAssociated: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAssociated: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getYes: data inMemCtx: memCtx];
|
||||
}
|
||||
@@ -69,7 +70,7 @@
|
||||
|
||||
- (BOOL) subscriberCanReadMessage
|
||||
{
|
||||
return NO;
|
||||
return [(MAPIStoreFolder *)container subscriberCanReadMessages];
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanModifyMessage
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#define MAPISTOREFOLDER_H
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
@class NSArray;
|
||||
@class NSMutableArray;
|
||||
@@ -41,6 +42,20 @@
|
||||
|
||||
#import "MAPIStoreSOGoObject.h"
|
||||
|
||||
/* MAPI Permissions
|
||||
|
||||
This set has only sogo-openchange library scope
|
||||
*/
|
||||
extern NSString *MAPIStoreRightReadItems;
|
||||
extern NSString *MAPIStoreRightCreateItems;
|
||||
extern NSString *MAPIStoreRightEditOwn;
|
||||
extern NSString *MAPIStoreRightEditAll;
|
||||
extern NSString *MAPIStoreRightDeleteOwn;
|
||||
extern NSString *MAPIStoreRightDeleteAll;
|
||||
extern NSString *MAPIStoreRightCreateSubfolders;
|
||||
extern NSString *MAPIStoreRightFolderOwner;
|
||||
extern NSString *MAPIStoreRightFolderContact;
|
||||
|
||||
@interface MAPIStoreFolder : MAPIStoreSOGoObject
|
||||
{
|
||||
MAPIStoreContext *context;
|
||||
@@ -74,6 +89,8 @@
|
||||
- (MAPIStorePermissionsTable *) permissionsTable;
|
||||
- (NSArray *) permissionEntries;
|
||||
|
||||
- (NSArray *) expandRoles: (NSArray *) roles;
|
||||
|
||||
/* message objects and tables */
|
||||
- (id) lookupMessage: (NSString *) messageKey;
|
||||
- (NSArray *) messageKeys;
|
||||
@@ -96,34 +113,34 @@
|
||||
|
||||
/* backend interface */
|
||||
|
||||
- (int) openFolder: (MAPIStoreFolder **) childFolderPtr
|
||||
withFID: (uint64_t) fid;
|
||||
- (int) createFolder: (MAPIStoreFolder **) childFolderPtr
|
||||
withRow: (struct SRow *) aRow
|
||||
andFID: (uint64_t) fid;
|
||||
- (int) deleteFolder;
|
||||
- (int) getChildCount: (uint32_t *) rowCount
|
||||
ofTableType: (enum mapistore_table_type) tableType;
|
||||
- (enum mapistore_error) openFolder: (MAPIStoreFolder **) childFolderPtr
|
||||
withFID: (uint64_t) fid;
|
||||
- (enum mapistore_error) createFolder: (MAPIStoreFolder **) childFolderPtr
|
||||
withRow: (struct SRow *) aRow
|
||||
andFID: (uint64_t) fid;
|
||||
- (enum mapistore_error) deleteFolder;
|
||||
- (enum mapistore_error) getChildCount: (uint32_t *) rowCount
|
||||
ofTableType: (enum mapistore_table_type) tableType;
|
||||
|
||||
- (int) createMessage: (MAPIStoreMessage **) messagePtr
|
||||
withMID: (uint64_t) mid
|
||||
isAssociated: (BOOL) isAssociated;
|
||||
- (enum mapistore_error) createMessage: (MAPIStoreMessage **) messagePtr
|
||||
withMID: (uint64_t) mid
|
||||
isAssociated: (BOOL) isAssociated;
|
||||
|
||||
- (int) openMessage: (MAPIStoreMessage **) messagePtr
|
||||
withMID: (uint64_t) mid
|
||||
forWriting: (BOOL) readWrite
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) deleteMessageWithMID: (uint64_t) mid
|
||||
andFlags: (uint8_t) flags;
|
||||
- (enum mapistore_error) openMessage: (MAPIStoreMessage **) messagePtr
|
||||
withMID: (uint64_t) mid
|
||||
forWriting: (BOOL) readWrite
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) deleteMessageWithMID: (uint64_t) mid
|
||||
andFlags: (uint8_t) flags;
|
||||
|
||||
- (int) moveCopyMessagesWithMIDs: (uint64_t *) srcMids
|
||||
andCount: (uint32_t) count
|
||||
fromFolder: (MAPIStoreFolder *) sourceFolder
|
||||
withMIDs: (uint64_t *) targetMids
|
||||
andChangeKeys: (struct Binary_r **) targetChangeKeys
|
||||
andPredecessorChangeLists: (struct Binary_r **) targetPredecessorChangeLists
|
||||
wantCopy: (uint8_t) want_copy
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) moveCopyMessagesWithMIDs: (uint64_t *) srcMids
|
||||
andCount: (uint32_t) count
|
||||
fromFolder: (MAPIStoreFolder *) sourceFolder
|
||||
withMIDs: (uint64_t *) targetMids
|
||||
andChangeKeys: (struct Binary_r **) targetChangeKeys
|
||||
andPredecessorChangeLists: (struct Binary_r **) targetPredecessorChangeLists
|
||||
wantCopy: (uint8_t) want_copy
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
- (enum mapistore_error) moveCopyToFolder: (MAPIStoreFolder *) targetFolder
|
||||
withNewName: (NSString *) newFolderName
|
||||
@@ -131,20 +148,20 @@
|
||||
isRecursive: (BOOL) isRecursive
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
- (int) getDeletedFMIDs: (struct UI8Array_r **) fmidsPtr
|
||||
andCN: (uint64_t *) cnPtr
|
||||
fromChangeNumber: (uint64_t) changeNum
|
||||
inTableType: (enum mapistore_table_type) tableType
|
||||
inMemCtx: (TALLOC_CTX *) mem_ctx;
|
||||
- (enum mapistore_error) getDeletedFMIDs: (struct UI8Array_r **) fmidsPtr
|
||||
andCN: (uint64_t *) cnPtr
|
||||
fromChangeNumber: (uint64_t) changeNum
|
||||
inTableType: (enum mapistore_table_type) tableType
|
||||
inMemCtx: (TALLOC_CTX *) mem_ctx;
|
||||
|
||||
- (int) getTable: (MAPIStoreTable **) tablePtr
|
||||
andRowCount: (uint32_t *) count
|
||||
tableType: (enum mapistore_table_type) tableType
|
||||
andHandleId: (uint32_t) handleId;
|
||||
- (enum mapistore_error) getTable: (MAPIStoreTable **) tablePtr
|
||||
andRowCount: (uint32_t *) count
|
||||
tableType: (enum mapistore_table_type) tableType
|
||||
andHandleId: (uint32_t) handleId;
|
||||
|
||||
- (int) modifyPermissions: (struct PermissionData *) permissions
|
||||
withCount: (uint16_t) pcount
|
||||
andFlags: (int8_t) flags;
|
||||
- (enum mapistore_error) modifyPermissions: (struct PermissionData *) permissions
|
||||
withCount: (uint16_t) pcount
|
||||
andFlags: (int8_t) flags;
|
||||
- (enum mapistore_error) preloadMessageBodiesWithMIDs: (const struct UI8Array_r *) mids
|
||||
ofTableType: (enum mapistore_table_type) tableType;
|
||||
|
||||
|
||||
+162
-113
@@ -65,6 +65,17 @@
|
||||
|
||||
Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMessageTableK, MAPIStoreFolderTableK;
|
||||
|
||||
/* MAPI permissions */
|
||||
NSString *MAPIStoreRightReadItems = @"RightsReadItems";
|
||||
NSString *MAPIStoreRightCreateItems = @"RightsCreateItems";
|
||||
NSString *MAPIStoreRightEditOwn = @"RightsEditOwn";
|
||||
NSString *MAPIStoreRightEditAll = @"RightsEditAll";
|
||||
NSString *MAPIStoreRightDeleteOwn = @"RightsDeleteOwn";
|
||||
NSString *MAPIStoreRightDeleteAll = @"RightsDeleteAll";
|
||||
NSString *MAPIStoreRightCreateSubfolders = @"RightsCreateSubfolders";
|
||||
NSString *MAPIStoreRightFolderOwner = @"RightsFolderOwner";
|
||||
NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
|
||||
|
||||
@implementation MAPIStoreFolder
|
||||
|
||||
+ (void) initialize
|
||||
@@ -365,10 +376,10 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
return foundObject;
|
||||
}
|
||||
|
||||
- (int) openFolder: (MAPIStoreFolder **) childFolderPtr
|
||||
withFID: (uint64_t) fid
|
||||
- (enum mapistore_error) openFolder: (MAPIStoreFolder **) childFolderPtr
|
||||
withFID: (uint64_t) fid
|
||||
{
|
||||
int rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
enum mapistore_error rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
MAPIStoreFolder *childFolder;
|
||||
MAPIStoreMapping *mapping;
|
||||
NSString *childURL;
|
||||
@@ -390,9 +401,9 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) createFolder: (MAPIStoreFolder **) childFolderPtr
|
||||
withRow: (struct SRow *) aRow
|
||||
andFID: (uint64_t) fid
|
||||
- (enum mapistore_error) createFolder: (MAPIStoreFolder **) childFolderPtr
|
||||
withRow: (struct SRow *) aRow
|
||||
andFID: (uint64_t) fid
|
||||
{
|
||||
BOOL mapped;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
@@ -447,7 +458,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) deleteFolder
|
||||
- (enum mapistore_error) deleteFolder
|
||||
{
|
||||
// TODO: raise exception in case underlying delete fails?
|
||||
// [propsMessage delete];
|
||||
@@ -458,11 +469,11 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getChildCount: (uint32_t *) rowCount
|
||||
ofTableType: (enum mapistore_table_type) tableType
|
||||
- (enum mapistore_error) getChildCount: (uint32_t *) rowCount
|
||||
ofTableType: (enum mapistore_table_type) tableType
|
||||
{
|
||||
NSArray *keys;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
|
||||
//[self logWithFormat: @"METHOD '%s' (%d) -- tableType: %d",
|
||||
//__FUNCTION__, __LINE__, tableType];
|
||||
@@ -483,16 +494,16 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) openMessage: (MAPIStoreMessage **) messagePtr
|
||||
withMID: (uint64_t) mid
|
||||
forWriting: (BOOL) readWrite
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) openMessage: (MAPIStoreMessage **) messagePtr
|
||||
withMID: (uint64_t) mid
|
||||
forWriting: (BOOL) readWrite
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
{
|
||||
NSString *messageURL;
|
||||
MAPIStoreMapping *mapping;
|
||||
MAPIStoreMessage *message;
|
||||
SOGoUser *ownerUser;
|
||||
int rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
enum mapistore_error rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
mapping = [self mapping];
|
||||
messageURL = [mapping urlFromID: mid];
|
||||
@@ -523,9 +534,9 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) createMessage: (MAPIStoreMessage **) messagePtr
|
||||
withMID: (uint64_t) mid
|
||||
isAssociated: (BOOL) isAssociated
|
||||
- (enum mapistore_error) createMessage: (MAPIStoreMessage **) messagePtr
|
||||
withMID: (uint64_t) mid
|
||||
isAssociated: (BOOL) isAssociated
|
||||
{
|
||||
enum mapistore_error rc;
|
||||
MAPIStoreMessage *message;
|
||||
@@ -570,8 +581,8 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) deleteMessageWithMID: (uint64_t) mid
|
||||
andFlags: (uint8_t) flags
|
||||
- (enum mapistore_error) deleteMessageWithMID: (uint64_t) mid
|
||||
andFlags: (uint8_t) flags
|
||||
{
|
||||
NSString *childURL;
|
||||
MAPIStoreMapping *mapping;
|
||||
@@ -580,7 +591,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
NSUInteger count, max;
|
||||
id msgObject;
|
||||
SOGoUser *ownerUser;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
/* flags that control the behaviour of the operation
|
||||
(MAPISTORE_SOFT_DELETE or MAPISTORE_PERMANENT_DELETE) */
|
||||
@@ -597,7 +608,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
|
||||
if ([[context activeUser] isEqual: ownerUser]
|
||||
|| (![message isKindOfClass: MAPIStoreFAIMessageK]
|
||||
&& [self subscriberCanDeleteMessages]))
|
||||
&& ([self subscriberCanDeleteMessages] || [message subscriberCanDeleteMessage])))
|
||||
{
|
||||
/* we ensure the table caches are loaded so that old and new state
|
||||
can be compared */
|
||||
@@ -638,15 +649,15 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
}
|
||||
|
||||
// private method
|
||||
- (int) _moveCopyMessageWithMID: (uint64_t) srcMid
|
||||
fromFolder: (MAPIStoreFolder *) sourceFolder
|
||||
withMID: (uint64_t) targetMid
|
||||
andChangeKey: (struct Binary_r *) targetChangeKey
|
||||
andPredecessorChangeList: (struct Binary_r *) targetPredecessorChangeList
|
||||
wantCopy: (uint8_t) wantCopy
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) _moveCopyMessageWithMID: (uint64_t) srcMid
|
||||
fromFolder: (MAPIStoreFolder *) sourceFolder
|
||||
withMID: (uint64_t) targetMid
|
||||
andChangeKey: (struct Binary_r *) targetChangeKey
|
||||
andPredecessorChangeList: (struct Binary_r *) targetPredecessorChangeList
|
||||
wantCopy: (uint8_t) wantCopy
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
MAPIStoreMessage *sourceMsg, *destMsg;
|
||||
//TALLOC_CTX *memCtx;
|
||||
struct SRow aRow;
|
||||
@@ -695,16 +706,16 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) moveCopyMessagesWithMIDs: (uint64_t *) srcMids
|
||||
andCount: (uint32_t) midCount
|
||||
fromFolder: (MAPIStoreFolder *) sourceFolder
|
||||
withMIDs: (uint64_t *) targetMids
|
||||
andChangeKeys: (struct Binary_r **) targetChangeKeys
|
||||
andPredecessorChangeLists: (struct Binary_r **) targetPredecessorChangeLists
|
||||
wantCopy: (uint8_t) wantCopy
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) moveCopyMessagesWithMIDs: (uint64_t *) srcMids
|
||||
andCount: (uint32_t) midCount
|
||||
fromFolder: (MAPIStoreFolder *) sourceFolder
|
||||
withMIDs: (uint64_t *) targetMids
|
||||
andChangeKeys: (struct Binary_r **) targetChangeKeys
|
||||
andPredecessorChangeLists: (struct Binary_r **) targetPredecessorChangeLists
|
||||
wantCopy: (uint8_t) wantCopy
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
NSUInteger count;
|
||||
NSMutableArray *oldMessageURLs;
|
||||
NSString *oldMessageURL;
|
||||
@@ -908,6 +919,11 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSArray *) expandRoles: (NSArray *) roles
|
||||
{
|
||||
return roles;
|
||||
}
|
||||
|
||||
- (void) _modifyPermissionEntryForUser: (NSString *) user
|
||||
withRoles: (NSArray *) roles
|
||||
isAddition: (BOOL) isAddition
|
||||
@@ -957,13 +973,13 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
withIDs: newIDs];
|
||||
}
|
||||
|
||||
- (int) getDeletedFMIDs: (struct UI8Array_r **) fmidsPtr
|
||||
andCN: (uint64_t *) cnPtr
|
||||
fromChangeNumber: (uint64_t) changeNum
|
||||
inTableType: (enum mapistore_table_type) tableType
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getDeletedFMIDs: (struct UI8Array_r **) fmidsPtr
|
||||
andCN: (uint64_t *) cnPtr
|
||||
fromChangeNumber: (uint64_t) changeNum
|
||||
inTableType: (enum mapistore_table_type) tableType
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
NSString *baseURL, *format, *url;
|
||||
NSArray *keys;
|
||||
NSNumber *cnNbr;
|
||||
@@ -1016,14 +1032,15 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getTable: (MAPIStoreTable **) tablePtr
|
||||
andRowCount: (uint32_t *) countPtr
|
||||
tableType: (enum mapistore_table_type) tableType
|
||||
andHandleId: (uint32_t) handleId
|
||||
- (enum mapistore_error) getTable: (MAPIStoreTable **) tablePtr
|
||||
andRowCount: (uint32_t *) countPtr
|
||||
tableType: (enum mapistore_table_type) tableType
|
||||
andHandleId: (uint32_t) handleId
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
BOOL access;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
MAPIStoreTable *table;
|
||||
SOGoUser *ownerUser;
|
||||
SOGoUser *activeUser, *ownerUser;
|
||||
|
||||
if (tableType == MAPISTORE_MESSAGE_TABLE)
|
||||
table = [self messageTable];
|
||||
@@ -1034,8 +1051,20 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
else if (tableType == MAPISTORE_PERMISSIONS_TABLE)
|
||||
{
|
||||
ownerUser = [[self userContext] sogoUser];
|
||||
if ([[context activeUser] isEqual: ownerUser])
|
||||
table = [self permissionsTable];
|
||||
activeUser = [context activeUser];
|
||||
access = [activeUser isEqual: ownerUser];
|
||||
if (!access)
|
||||
{
|
||||
NSArray *roles;
|
||||
|
||||
roles = [[self aclFolder] aclsForUser: [activeUser login]];
|
||||
roles = [self expandRoles: roles]; // Not required here
|
||||
/* Check FolderVisible right to return the table */
|
||||
access = ([self exchangeRightsForRoles: roles] & RoleNone) != 0;
|
||||
}
|
||||
|
||||
if (access)
|
||||
table = [self permissionsTable];
|
||||
else
|
||||
rc = MAPISTORE_ERR_DENIED;
|
||||
}
|
||||
@@ -1208,16 +1237,16 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
// folderKeys = nil;
|
||||
}
|
||||
|
||||
- (int) getPidTagParentFolderId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagParentFolderId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongLongValue (memCtx, [container objectId]);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagFolderId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagFolderId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongLongValue (memCtx, [self objectId]);
|
||||
|
||||
@@ -1234,8 +1263,8 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
0x00000010 Create Contents Table
|
||||
0x00000020 Create Associated Contents Table
|
||||
*/
|
||||
- (int) getPidTagAccess: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAccess: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
uint32_t access = 0;
|
||||
SOGoUser *ownerUser;
|
||||
@@ -1263,103 +1292,107 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagRights: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagRights: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
uint32_t rights = 0;
|
||||
SOGoUser *ownerUser;
|
||||
BOOL userIsOwner;
|
||||
SOGoUser *activeUser, *ownerUser;
|
||||
|
||||
ownerUser = [[self userContext] sogoUser];
|
||||
activeUser = [context activeUser];
|
||||
|
||||
userIsOwner = [[context activeUser] isEqual: ownerUser];
|
||||
if (userIsOwner || [self subscriberCanReadMessages])
|
||||
rights |= RightsReadItems;
|
||||
if (userIsOwner || [self subscriberCanCreateMessages])
|
||||
rights |= RightsCreateItems;
|
||||
if (userIsOwner || [self subscriberCanModifyMessages])
|
||||
rights |= RightsEditOwn | RightsEditAll;
|
||||
if (userIsOwner || [self subscriberCanDeleteMessages])
|
||||
rights |= RightsDeleteOwn | RightsDeleteAll;
|
||||
if ((userIsOwner || [self subscriberCanCreateSubFolders])
|
||||
&& [self supportsSubFolders])
|
||||
rights |= RightsCreateSubfolders;
|
||||
if (userIsOwner)
|
||||
rights |= RightsFolderOwner | RightsFolderContact;
|
||||
if ([activeUser isEqual: ownerUser])
|
||||
{
|
||||
rights = RightsReadItems | RightsCreateItems | RightsEditOwn | RightsEditAll
|
||||
| RightsDeleteOwn | RightsDeleteAll | RightsFolderOwner | RightsFolderContact | RoleNone;
|
||||
if ([self supportsSubFolders])
|
||||
rights |= RightsCreateSubfolders;
|
||||
}
|
||||
else
|
||||
{
|
||||
NSArray *roles;
|
||||
|
||||
roles = [[self aclFolder] aclsForUser: [activeUser login]];
|
||||
roles = [self expandRoles: roles];
|
||||
rights = [self exchangeRightsForRoles: roles];
|
||||
/* FreeBusySimple and FreeBusyDetailed does not apply here
|
||||
[MS-OXCFOLD] Section 2.2.2.2.2.8 */
|
||||
rights &= ~RightsFreeBusySimple & ~RightsFreeBusyDetailed;
|
||||
}
|
||||
|
||||
*data = MAPILongValue (memCtx, rights);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAccessControlListData: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAccessControlListData: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [[NSData data] asBinaryInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttributeHidden: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttributeHidden: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagAttributeSystem: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttributeSystem: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagAttributeReadOnly: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttributeReadOnly: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagSubfolders: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSubfolders: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPIBoolValue (memCtx, [self supportsSubFolders] && [[self folderKeys] count] > 0);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagFolderChildCount: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagFolderChildCount: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, [[self folderKeys] count]);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagContentCount: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagContentCount: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, [[self messageKeys] count]);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagContentUnreadCount: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagContentUnreadCount: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, 0);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAssociatedContentCount: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAssociatedContentCount: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, [[self faiMessageKeys] count]);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagDeletedCountTotal: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDeletedCountTotal: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
/* TODO */
|
||||
*data = MAPILongValue (memCtx, 0);
|
||||
@@ -1367,10 +1400,10 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagLocalCommitTimeMax: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagLocalCommitTimeMax: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
NSDate *date;
|
||||
|
||||
date = [self lastMessageModificationTime];
|
||||
@@ -1382,18 +1415,18 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagDefaultPostMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDefaultPostMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"IPM.Note" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getProperties: (struct mapistore_property_data *) data
|
||||
withTags: (enum MAPITAGS *) tags
|
||||
andCount: (uint16_t) columnCount
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getProperties: (struct mapistore_property_data *) data
|
||||
withTags: (enum MAPITAGS *) tags
|
||||
andCount: (uint16_t) columnCount
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
[dbFolder reloadIfNeeded];
|
||||
|
||||
@@ -1403,11 +1436,11 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getProperty: (void **) data
|
||||
withTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getProperty: (void **) data
|
||||
withTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
id value;
|
||||
|
||||
value = [properties objectForKey: MAPIPropertyKey (propTag)];
|
||||
@@ -1614,9 +1647,9 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
[users release];
|
||||
}
|
||||
|
||||
- (int) modifyPermissions: (struct PermissionData *) permissions
|
||||
withCount: (uint16_t) pcount
|
||||
andFlags: (int8_t) flags
|
||||
- (enum mapistore_error) modifyPermissions: (struct PermissionData *) permissions
|
||||
withCount: (uint16_t) pcount
|
||||
andFlags: (int8_t) flags
|
||||
{
|
||||
NSUInteger count, propCount;
|
||||
struct PermissionData *currentPermission;
|
||||
@@ -1626,6 +1659,22 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
NSArray *permissionRoles;
|
||||
BOOL reset, isAdd = NO, isDelete = NO, isModify = NO;
|
||||
SOGoFolder *aclFolder;
|
||||
SOGoUser *activeUser, *ownerUser;
|
||||
|
||||
/* Check if we have permissions to modify the permissions.
|
||||
See [MS-OXCPERM] Section 3.2.5.2 for details */
|
||||
ownerUser = [[self userContext] sogoUser];
|
||||
activeUser = [context activeUser];
|
||||
if (![activeUser isEqual: ownerUser])
|
||||
{
|
||||
/* Check if we have FolderOwner right */
|
||||
NSArray *roles;
|
||||
|
||||
roles = [[self aclFolder] aclsForUser: [activeUser login]];
|
||||
roles = [self expandRoles: roles]; // Not required
|
||||
if (([self exchangeRightsForRoles: roles] & RightsFolderOwner) == 0)
|
||||
return MAPISTORE_ERR_DENIED;
|
||||
}
|
||||
|
||||
aclFolder = [self aclFolder];
|
||||
|
||||
|
||||
@@ -86,9 +86,9 @@ static Class NSNumberK;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (int) deleteFolder
|
||||
- (enum mapistore_error) deleteFolder
|
||||
{
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
NSException *error;
|
||||
NSString *name;
|
||||
|
||||
@@ -138,8 +138,8 @@ static Class NSNumberK;
|
||||
[sogoObject renameTo: newDisplayName];
|
||||
}
|
||||
|
||||
- (int) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *displayName;
|
||||
Class cClass;
|
||||
@@ -859,6 +859,7 @@ static Class NSNumberK;
|
||||
woContext = [[self userContext] woContext];
|
||||
activeUserRoles = [activeUser rolesForObject: sogoObject
|
||||
inContext: woContext];
|
||||
activeUserRoles = [self expandRoles: activeUserRoles];
|
||||
[activeUserRoles retain];
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef MAPISTOREGCSMESSAGE_H
|
||||
#define MAPISTOREGCSMESSAGE_H
|
||||
|
||||
#import <SOGo/SOGoUser.h>
|
||||
|
||||
#import "MAPIStoreMessage.h"
|
||||
|
||||
@interface MAPIStoreGCSMessage : MAPIStoreMessage
|
||||
@@ -30,6 +32,11 @@
|
||||
}
|
||||
|
||||
/* subclass helpers */
|
||||
|
||||
/* Return the message original creator */
|
||||
- (NSString *) creator;
|
||||
- (NSString *) owner;
|
||||
- (SOGoUser *) ownerUser;
|
||||
- (void) updateVersions;
|
||||
|
||||
@end
|
||||
|
||||
@@ -20,10 +20,12 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
#import <NGObjWeb/SoSecurityManager.h>
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
#import <NGExtensions/NSObject+Values.h>
|
||||
#import <SOGo/SOGoContentObject.h>
|
||||
@@ -35,6 +37,7 @@
|
||||
#import "MAPIStoreTypes.h"
|
||||
#import "MAPIStoreUserContext.h"
|
||||
#import "NSData+MAPIStore.h"
|
||||
#import "NSString+MAPIStore.h"
|
||||
|
||||
#import "MAPIStoreGCSMessage.h"
|
||||
|
||||
@@ -54,76 +57,28 @@
|
||||
return [sogoObject lastModified];
|
||||
}
|
||||
|
||||
- (int) getPidTagAccess: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagCreatorName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
MAPIStoreContext *context;
|
||||
WOContext *woContext;
|
||||
SoSecurityManager *sm;
|
||||
MAPIStoreUserContext *userContext;
|
||||
uint32_t access;
|
||||
enum mapistore_error rc;
|
||||
NSString *creator;
|
||||
|
||||
context = [self context];
|
||||
userContext = [self userContext];
|
||||
if ([[context activeUser] isEqual: [userContext sogoUser]])
|
||||
access = 0x03;
|
||||
else
|
||||
creator = [self creator];
|
||||
if (creator)
|
||||
{
|
||||
sm = [SoSecurityManager sharedSecurityManager];
|
||||
woContext = [userContext woContext];
|
||||
|
||||
access = 0;
|
||||
if (![sm validatePermission: SoPerm_ChangeImagesAndFiles
|
||||
onObject: sogoObject
|
||||
inContext: woContext])
|
||||
access |= 1;
|
||||
if (![sm validatePermission: SoPerm_AccessContentsInformation
|
||||
onObject: sogoObject
|
||||
inContext: woContext])
|
||||
access |= 2;
|
||||
if (![sm validatePermission: SOGoPerm_DeleteObject
|
||||
onObject: sogoObject
|
||||
inContext: woContext])
|
||||
access |= 4;
|
||||
*data = [creator asUnicodeInMemCtx: memCtx];
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
*data = MAPILongValue (memCtx, access);
|
||||
else
|
||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagAccessLevel: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagChangeKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
MAPIStoreContext *context;
|
||||
MAPIStoreUserContext *userContext;
|
||||
WOContext *woContext;
|
||||
SoSecurityManager *sm;
|
||||
uint32_t accessLvl;
|
||||
|
||||
context = [self context];
|
||||
userContext = [self userContext];
|
||||
if ([[context activeUser] isEqual: [userContext sogoUser]])
|
||||
accessLvl = 1;
|
||||
else
|
||||
{
|
||||
sm = [SoSecurityManager sharedSecurityManager];
|
||||
woContext = [userContext woContext];
|
||||
if (![sm validatePermission: SoPerm_ChangeImagesAndFiles
|
||||
onObject: sogoObject
|
||||
inContext: woContext])
|
||||
accessLvl = 1;
|
||||
else
|
||||
accessLvl = 0;
|
||||
}
|
||||
*data = MAPILongValue (memCtx, accessLvl);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagChangeKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
NSData *changeKey;
|
||||
MAPIStoreGCSFolder *parentFolder;
|
||||
NSString *nameInContainer;
|
||||
@@ -155,10 +110,10 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagPredecessorChangeList: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagPredecessorChangeList: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
NSData *changeList;
|
||||
MAPIStoreGCSFolder *parentFolder;
|
||||
|
||||
@@ -241,4 +196,69 @@
|
||||
andPredecessorChangeList: predecessorChangeList];
|
||||
}
|
||||
|
||||
//----------------------
|
||||
// Sharing
|
||||
//----------------------
|
||||
|
||||
- (NSString *) creator
|
||||
{
|
||||
return [self owner];
|
||||
}
|
||||
|
||||
- (NSString *) owner
|
||||
{
|
||||
return [sogoObject ownerInContext: nil];
|
||||
}
|
||||
|
||||
- (SOGoUser *) ownerUser
|
||||
{
|
||||
NSString *ownerName;
|
||||
SOGoUser *owner = nil;
|
||||
|
||||
ownerName = [self owner];
|
||||
if ([ownerName length] != 0)
|
||||
owner = [SOGoUser userWithLogin: ownerName];
|
||||
|
||||
return owner;
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanModifyMessage
|
||||
{
|
||||
BOOL rc;
|
||||
NSArray *roles;
|
||||
|
||||
roles = [self activeUserRoles];
|
||||
|
||||
if (isNew)
|
||||
rc = [roles containsObject: SOGoRole_ObjectCreator];
|
||||
else
|
||||
rc = [roles containsObject: SOGoRole_ObjectEditor];
|
||||
|
||||
/* Check if the message is owned and it has permission to edit it */
|
||||
if (!rc && [roles containsObject: MAPIStoreRightEditOwn])
|
||||
rc = [[[container context] activeUser] isEqual: [self ownerUser]];
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanDeleteMessage
|
||||
{
|
||||
BOOL rc;
|
||||
NSArray *roles;
|
||||
|
||||
roles = [self activeUserRoles];
|
||||
rc = [roles containsObject: SOGoRole_ObjectEraser];
|
||||
|
||||
/* Check if the message is owned and it has permission to delete it */
|
||||
if (!rc && [roles containsObject: MAPIStoreRightDeleteOwn])
|
||||
{
|
||||
NSString *currentUser;
|
||||
|
||||
currentUser = [[container context] activeUser];
|
||||
rc = [currentUser isEqual: [self ownerUser]];
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -76,24 +76,24 @@
|
||||
ASSIGN (bodyPart, newBodyPart);
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachMethod: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachMethod: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, 0x00000001); // afByValue
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachTag: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachTag: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [[self mimeAttachTag] asBinaryInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachSize: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachSize: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
uint32_t longValue;
|
||||
|
||||
@@ -103,8 +103,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagRecordKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagRecordKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
static char recordBytes[] = {0xd9, 0xd8, 0x11, 0xa3, 0xe2, 0x90, 0x18, 0x41,
|
||||
0x9e, 0x04, 0x58, 0x46, 0x9d, 0x6d, 0x1b,
|
||||
@@ -121,16 +121,16 @@
|
||||
return [bodyInfo filename];
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachLongFilename: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachLongFilename: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [[self _fileName] asUnicodeInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachFilename: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachFilename: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *fileName, *baseName, *ext;
|
||||
|
||||
@@ -149,8 +149,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *fileName;
|
||||
|
||||
@@ -165,8 +165,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachContentId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachContentId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [[bodyInfo objectForKey: @"bodyId"]
|
||||
asUnicodeInMemCtx: memCtx];
|
||||
@@ -174,8 +174,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachMimeTag: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachMimeTag: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *mimeTag, *fileName;
|
||||
|
||||
@@ -193,8 +193,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAttachDataBinary: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAttachDataBinary: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [[bodyPart fetchBLOBWithPeek: YES] asBinaryInMemCtx: memCtx];
|
||||
|
||||
|
||||
@@ -208,9 +208,9 @@ static Class SOGoMailFolderK, MAPIStoreMailFolderK, MAPIStoreOutboxFolderK;
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) deleteFolder
|
||||
- (enum mapistore_error) deleteFolder
|
||||
{
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
NSException *error;
|
||||
NSString *name;
|
||||
|
||||
@@ -234,8 +234,8 @@ static Class SOGoMailFolderK, MAPIStoreMailFolderK, MAPIStoreOutboxFolderK;
|
||||
return (rc == MAPISTORE_SUCCESS) ? [super deleteFolder] : rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagContentUnreadCount: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagContentUnreadCount: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
EOQualifier *searchQualifier;
|
||||
uint32_t longValue;
|
||||
@@ -250,8 +250,8 @@ static Class SOGoMailFolderK, MAPIStoreMailFolderK, MAPIStoreOutboxFolderK;
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagContainerClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagContainerClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"IPF.Note" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
@@ -1363,15 +1363,14 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
||||
// Move (or eventually copy) the mails identified by
|
||||
// "srcMids" from the source folder into this folder.
|
||||
//
|
||||
- (int) moveCopyMessagesWithMIDs: (uint64_t *) srcMids
|
||||
andCount: (uint32_t) midCount
|
||||
fromFolder: (MAPIStoreFolder *) sourceFolder
|
||||
withMIDs: (uint64_t *) targetMids
|
||||
andChangeKeys: (struct Binary_r **) targetChangeKeys
|
||||
andPredecessorChangeLists: (struct Binary_r **) targetPredecessorChangeLists
|
||||
wantCopy: (uint8_t) wantCopy
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
|
||||
- (enum mapistore_error) moveCopyMessagesWithMIDs: (uint64_t *) srcMids
|
||||
andCount: (uint32_t) midCount
|
||||
fromFolder: (MAPIStoreFolder *) sourceFolder
|
||||
withMIDs: (uint64_t *) targetMids
|
||||
andChangeKeys: (struct Binary_r **) targetChangeKeys
|
||||
andPredecessorChangeLists: (struct Binary_r **) targetPredecessorChangeLists
|
||||
wantCopy: (uint8_t) wantCopy
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NGImap4Connection *connection;
|
||||
NGImap4Client *client;
|
||||
@@ -1657,7 +1656,7 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
||||
- (id) lookupMessage: (NSString *) messageKey
|
||||
{
|
||||
MAPIStoreMailMessage *message;
|
||||
NSData *rawBodyData;
|
||||
NSArray *rawBodyData;
|
||||
|
||||
message = [super lookupMessage: messageKey];
|
||||
if (message)
|
||||
@@ -1731,73 +1730,31 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
||||
- (enum mapistore_error) preloadMessageBodiesWithKeys: (NSArray *) keys
|
||||
ofTableType: (enum mapistore_table_type) tableType
|
||||
{
|
||||
NSEnumerator *enumerator;
|
||||
NSUInteger max;
|
||||
NSString *messageKey;
|
||||
MAPIStoreMailMessage *message;
|
||||
NSMutableSet *bodyPartKeys;
|
||||
NSMutableDictionary *keyAssoc;
|
||||
NSDictionary *response;
|
||||
NSUInteger count, max;
|
||||
NSString *messageKey, *messageUid, *bodyPartKey;
|
||||
NGImap4Client *client;
|
||||
NSArray *fetch;
|
||||
NSData *bodyContent;
|
||||
NSArray* bodyContent;
|
||||
|
||||
if (tableType == MAPISTORE_MESSAGE_TABLE)
|
||||
if (tableType != MAPISTORE_MESSAGE_TABLE)
|
||||
return MAPISTORE_SUCCESS;
|
||||
|
||||
[bodyData removeAllObjects];
|
||||
|
||||
max = [keys count];
|
||||
if (max == 0)
|
||||
return MAPISTORE_SUCCESS;
|
||||
|
||||
enumerator = [keys objectEnumerator];
|
||||
while ((messageKey = [enumerator nextObject]))
|
||||
{
|
||||
[bodyData removeAllObjects];
|
||||
max = [keys count];
|
||||
|
||||
if (max > 0)
|
||||
message = [self lookupMessage: messageKey];
|
||||
if (message)
|
||||
{
|
||||
bodyPartKeys = [NSMutableSet setWithCapacity: max];
|
||||
|
||||
keyAssoc = [NSMutableDictionary dictionaryWithCapacity: max];
|
||||
for (count = 0; count < max; count++)
|
||||
bodyContent = [message getBodyContent];
|
||||
if (bodyContent)
|
||||
{
|
||||
messageKey = [keys objectAtIndex: count];
|
||||
message = [self lookupMessage: messageKey];
|
||||
if (message)
|
||||
{
|
||||
bodyPartKey = [message bodyContentPartKey];
|
||||
if (bodyPartKey)
|
||||
{
|
||||
[bodyPartKeys addObject: bodyPartKey];
|
||||
messageUid = [self messageUIDFromMessageKey: messageKey];
|
||||
/* If the bodyPartKey include peek, remove it as it is not returned
|
||||
as key in the IMAP server response.
|
||||
|
||||
IMAP conversation example:
|
||||
a4 UID FETCH 1 (UID BODY.PEEK[text])
|
||||
* 1 FETCH (UID 1 BODY[TEXT] {1677}
|
||||
*/
|
||||
bodyPartKey = [bodyPartKey stringByReplacingOccurrencesOfString: @"body.peek"
|
||||
withString: @"body"];
|
||||
[keyAssoc setObject: bodyPartKey forKey: messageUid];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
client = [[(SOGoMailFolder *) sogoObject imap4Connection] client];
|
||||
[client select: [sogoObject absoluteImap4Name]];
|
||||
response = [client fetchUids: [keyAssoc allKeys]
|
||||
parts: [bodyPartKeys allObjects]];
|
||||
fetch = [response objectForKey: @"fetch"];
|
||||
max = [fetch count];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
response = [fetch objectAtIndex: count];
|
||||
messageUid = [[response objectForKey: @"uid"] stringValue];
|
||||
bodyPartKey = [keyAssoc objectForKey: messageUid];
|
||||
if (bodyPartKey)
|
||||
{
|
||||
bodyContent = [[response objectForKey: bodyPartKey]
|
||||
objectForKey: @"data"];
|
||||
if (bodyContent)
|
||||
{
|
||||
messageKey = [NSString stringWithFormat: @"%@.eml",
|
||||
messageUid];
|
||||
[bodyData setObject: bodyContent forKey: messageKey];
|
||||
}
|
||||
}
|
||||
[bodyData setObject: bodyContent forKey: messageKey];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1809,8 +1766,8 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
||||
|
||||
@implementation MAPIStoreOutboxFolder
|
||||
|
||||
- (int) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"Outbox" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
|
||||
@@ -25,8 +25,10 @@
|
||||
|
||||
#import "MAPIStoreMessage.h"
|
||||
|
||||
@class NSData;
|
||||
@class NSString;
|
||||
@class NSArray;
|
||||
@class NSMutableArray;
|
||||
@class NSMutableDictionary;
|
||||
|
||||
@class MAPIStoreAppointmentWrapper;
|
||||
@class MAPIStoreMailFolder;
|
||||
@@ -37,12 +39,17 @@
|
||||
BOOL mailIsEvent;
|
||||
BOOL mailIsMeetingRequest;
|
||||
BOOL mailIsSharingObject;
|
||||
NSString *mimeKey;
|
||||
|
||||
NSMutableArray *bodyContentKeys;
|
||||
NSMutableDictionary *bodyPartsEncodings;
|
||||
NSMutableDictionary *bodyPartsCharsets;
|
||||
NSMutableDictionary *bodyPartsMimeTypes;
|
||||
NSMutableDictionary *bodyPartsMixed;
|
||||
|
||||
NSString *headerCharset;
|
||||
NSString *headerEncoding;
|
||||
NSString *headerMimeType;
|
||||
BOOL bodySetup;
|
||||
NSData *bodyContent;
|
||||
NSArray *bodyContent;
|
||||
BOOL fetchedAttachments;
|
||||
|
||||
MAPIStoreAppointmentWrapper *appointmentWrapper;
|
||||
@@ -50,31 +57,31 @@
|
||||
|
||||
- (NSString *) subject;
|
||||
|
||||
- (int) getPidTagIconIndex: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagFlagStatus: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagIconIndex: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagFlagStatus: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
- (int) getPidTagMessageFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagFollowupIcon: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagImportance: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagReceivedByEmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagSenderEmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagDisplayTo: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagDisplayCc: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagDisplayBcc: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagMessageFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagFollowupIcon: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagImportance: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagReceivedByEmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagSenderEmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagDisplayTo: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagDisplayCc: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagDisplayBcc: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
/* batch-mode helpers */
|
||||
- (NSString *) bodyContentPartKey;
|
||||
- (void) setBodyContentFromRawData: (NSData *) rawContent;
|
||||
- (void) setBodyContentFromRawData: (NSArray *) rawContent;
|
||||
- (NSArray *) getBodyContent;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
+499
-249
File diff suppressed because it is too large.
Load diff
@@ -340,10 +340,10 @@ static Class MAPIStoreMailMessageK, NSDataK, NSStringK;
|
||||
[self cleanupCaches];
|
||||
}
|
||||
|
||||
- (int) getRow: (struct mapistore_property_data **) dataP
|
||||
withRowID: (uint32_t) rowId
|
||||
andQueryType: (enum mapistore_query_type) queryType
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getRow: (struct mapistore_property_data **) dataP
|
||||
withRowID: (uint32_t) rowId
|
||||
andQueryType: (enum mapistore_query_type) queryType
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
if (!fetchedCoreInfos)
|
||||
{
|
||||
@@ -352,8 +352,8 @@ static Class MAPIStoreMailMessageK, NSDataK, NSStringK;
|
||||
prefetchCoreInfosForMessageKeys: [self restrictedChildKeys]];
|
||||
}
|
||||
|
||||
return [super getRow: dataP withRowID: rowId
|
||||
andQueryType: queryType inMemCtx: memCtx];
|
||||
return [super getRow: dataP withRowID: rowId
|
||||
andQueryType: queryType inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
@interface MAPIStoreMailVolatileMessage : MAPIStoreMessage
|
||||
|
||||
- (int) submitWithFlags: (enum SubmitFlags) flags;
|
||||
- (enum mapistore_error) submitWithFlags: (enum SubmitFlags) flags;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -290,17 +290,17 @@ static NSString *recTypes[] = { @"orig", @"to", @"cc", @"bcc" };
|
||||
: ULLONG_MAX);
|
||||
}
|
||||
|
||||
- (int) getPidTagMessageClass: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageClass: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"IPM.Note" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagChangeKey: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagChangeKey: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSData *changeKey;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
changeKey = [properties objectForKey: MAPIPropertyKey (PR_CHANGE_KEY)];
|
||||
if (changeKey)
|
||||
@@ -1051,7 +1051,7 @@ MakeMessageBody (NSDictionary *mailProperties, NSDictionary *attachmentParts, NS
|
||||
return messageData;
|
||||
}
|
||||
|
||||
- (int) submitWithFlags: (enum SubmitFlags) flags
|
||||
- (enum mapistore_error) submitWithFlags: (enum SubmitFlags) flags
|
||||
{
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
NSDictionary *recipients;
|
||||
|
||||
@@ -258,7 +258,7 @@ MAPIStoreMappingKeyFromId (uint64_t idNbr)
|
||||
if (oldURL != NULL)
|
||||
{
|
||||
[self errorWithFormat:
|
||||
@"url with idNbr already registered: (oldUrl='%@', newUrl='%@', id=x%.16"PRIx64")",
|
||||
@"url with idNbr already registered: (oldUrl='%@', newUrl='%@', id=0x%.16"PRIx64")",
|
||||
oldURL, urlString, idNbr];
|
||||
return NO;
|
||||
}
|
||||
@@ -306,7 +306,7 @@ MAPIStoreMappingKeyFromId (uint64_t idNbr)
|
||||
}
|
||||
else
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"number of urls and ids do not match"];
|
||||
format: @"number of urls (%d) and ids (%d) do not match", max, [idNbrs count]];
|
||||
}
|
||||
|
||||
- (void) unregisterURLWithID: (uint64_t) idNbr
|
||||
|
||||
@@ -48,27 +48,28 @@
|
||||
- (void) getMessageData: (struct mapistore_message **) dataPtr
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
- (int) modifyRecipientsWithRecipients: (struct mapistore_message_recipient *) recipients
|
||||
andCount: (NSUInteger) max
|
||||
andColumns: (struct SPropTagArray *) columns;
|
||||
- (enum mapistore_error) modifyRecipientsWithRecipients: (struct mapistore_message_recipient *) recipients
|
||||
andCount: (NSUInteger) max
|
||||
andColumns: (struct SPropTagArray *) columns;
|
||||
- (NSArray *) attachmentKeys;
|
||||
- (NSArray *) attachmentKeysMatchingQualifier: (EOQualifier *) qualifier
|
||||
andSortOrderings: (NSArray *) sortOrderings;
|
||||
- (id) lookupAttachment: (NSString *) childKey;
|
||||
|
||||
/* backend methods */
|
||||
- (int) createAttachment: (MAPIStoreAttachment **) attachmentPtr
|
||||
inAID: (uint32_t *) aidPtr;
|
||||
- (int) getAttachment: (MAPIStoreAttachment **) attachmentPtr
|
||||
withAID: (uint32_t) aid;
|
||||
- (int) getAttachmentTable: (MAPIStoreAttachmentTable **) tablePtr
|
||||
andRowCount: (uint32_t *) countPtr;
|
||||
- (enum mapistore_error) createAttachment: (MAPIStoreAttachment **) attachmentPtr
|
||||
inAID: (uint32_t *) aidPtr;
|
||||
- (enum mapistore_error) getAttachment: (MAPIStoreAttachment **) attachmentPtr
|
||||
withAID: (uint32_t) aid;
|
||||
- (enum mapistore_error) getAttachmentTable: (MAPIStoreAttachmentTable **) tablePtr
|
||||
andRowCount: (uint32_t *) countPtr;
|
||||
- (enum mapistore_error) setReadFlag: (uint8_t) flag;
|
||||
- (enum mapistore_error) saveMessage: (TALLOC_CTX *) memCtx;
|
||||
|
||||
- (NSArray *) activeContainerMessageTables;
|
||||
|
||||
- (NSArray *) activeUserRoles;
|
||||
- (NSArray *) expandRoles: (NSArray *) roles;
|
||||
|
||||
/* move & copy internal ops */
|
||||
- (void) copyToMessage: (MAPIStoreMessage *) newMessage inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
@@ -82,6 +83,7 @@
|
||||
|
||||
- (BOOL) subscriberCanReadMessage;
|
||||
- (BOOL) subscriberCanModifyMessage;
|
||||
- (BOOL) subscriberCanDeleteMessage;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
+105
-87
@@ -276,9 +276,9 @@ rtf2html (NSData *compressedRTF)
|
||||
return recipientProperties;
|
||||
}
|
||||
|
||||
- (int) modifyRecipientsWithRecipients: (struct mapistore_message_recipient *) newRecipients
|
||||
andCount: (NSUInteger) max
|
||||
andColumns: (struct SPropTagArray *) columns;
|
||||
- (enum mapistore_error) modifyRecipientsWithRecipients: (struct mapistore_message_recipient *) newRecipients
|
||||
andCount: (NSUInteger) max
|
||||
andColumns: (struct SPropTagArray *) columns;
|
||||
{
|
||||
static NSString *recTypes[] = { @"orig", @"to", @"cc", @"bcc" };
|
||||
NSDictionary *recipientProperties;
|
||||
@@ -318,7 +318,7 @@ rtf2html (NSData *compressedRTF)
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) addPropertiesFromRow: (struct SRow *) aRow
|
||||
- (enum mapistore_error) addPropertiesFromRow: (struct SRow *) aRow
|
||||
{
|
||||
enum mapistore_error rc;
|
||||
MAPIStoreContext *context;
|
||||
@@ -397,11 +397,11 @@ rtf2html (NSData *compressedRTF)
|
||||
return newAttachment;
|
||||
}
|
||||
|
||||
- (int) createAttachment: (MAPIStoreAttachment **) attachmentPtr
|
||||
inAID: (uint32_t *) aidPtr
|
||||
- (enum mapistore_error) createAttachment: (MAPIStoreAttachment **) attachmentPtr
|
||||
inAID: (uint32_t *) aidPtr
|
||||
{
|
||||
MAPIStoreAttachment *attachment;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
|
||||
attachment = [self createAttachment];
|
||||
if (attachment)
|
||||
@@ -422,12 +422,12 @@ rtf2html (NSData *compressedRTF)
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (int) getAttachment: (MAPIStoreAttachment **) attachmentPtr
|
||||
withAID: (uint32_t) aid
|
||||
- (enum mapistore_error) getAttachment: (MAPIStoreAttachment **) attachmentPtr
|
||||
withAID: (uint32_t) aid
|
||||
{
|
||||
MAPIStoreAttachment *attachment;
|
||||
NSArray *keys;
|
||||
int rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
enum mapistore_error rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
keys = [self attachmentKeys];
|
||||
if (aid < [keys count])
|
||||
@@ -443,11 +443,11 @@ rtf2html (NSData *compressedRTF)
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getAttachmentTable: (MAPIStoreAttachmentTable **) tablePtr
|
||||
andRowCount: (uint32_t *) countPtr
|
||||
- (enum mapistore_error) getAttachmentTable: (MAPIStoreAttachmentTable **) tablePtr
|
||||
andRowCount: (uint32_t *) countPtr
|
||||
{
|
||||
MAPIStoreAttachmentTable *attTable;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
|
||||
attTable = [self attachmentTable];
|
||||
if (attTable)
|
||||
@@ -547,7 +547,8 @@ rtf2html (NSData *compressedRTF)
|
||||
for (count = 0; count < max; count++)
|
||||
[[containerTables objectAtIndex: count] restrictedChildKeys];
|
||||
}
|
||||
|
||||
|
||||
/* TODO: Check the save process succeeded */
|
||||
[self save: memCtx];
|
||||
/* We make sure that any change-related properties are removed from the
|
||||
properties dictionary, to make sure that related methods will be
|
||||
@@ -582,8 +583,8 @@ rtf2html (NSData *compressedRTF)
|
||||
}
|
||||
|
||||
/* getters */
|
||||
- (int) getPidTagInstID: (void **) data // TODO: DOUBT
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagInstID: (void **) data // TODO: DOUBT
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
/* we return a unique id based on the key */
|
||||
*data = MAPILongLongValue (memCtx, [[sogoObject nameInContainer] hash]);
|
||||
@@ -591,22 +592,22 @@ rtf2html (NSData *compressedRTF)
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagInstanceNum: (void **) data // TODO: DOUBT
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagInstanceNum: (void **) data // TODO: DOUBT
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagRowType: (void **) data // TODO: DOUBT
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagRowType: (void **) data // TODO: DOUBT
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, TBL_LEAF_ROW);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagDepth: (void **) data // TODO: DOUBT
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDepth: (void **) data // TODO: DOUBT
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongLongValue (memCtx, 0);
|
||||
|
||||
@@ -623,8 +624,8 @@ rtf2html (NSData *compressedRTF)
|
||||
0x00000010 Create Contents Table
|
||||
0x00000020 Create Associated Contents Table
|
||||
*/
|
||||
- (int) getPidTagAccess: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAccess: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
uint32_t access = 0;
|
||||
BOOL userIsOwner;
|
||||
@@ -649,8 +650,7 @@ rtf2html (NSData *compressedRTF)
|
||||
if (userIsOwner
|
||||
|| ([self isKindOfClass: MAPIStoreEmbeddedMessageK]
|
||||
&& [mainMessage subscriberCanModifyMessage])
|
||||
|| [(MAPIStoreFolder *)
|
||||
[mainMessage container] subscriberCanDeleteMessages])
|
||||
|| [mainMessage subscriberCanDeleteMessage])
|
||||
access |= 0x04;
|
||||
|
||||
*data = MAPILongValue (memCtx, access);
|
||||
@@ -664,8 +664,8 @@ rtf2html (NSData *compressedRTF)
|
||||
0x00000000 Read-Only
|
||||
0x00000001 Modify
|
||||
*/
|
||||
- (int) getPidTagAccessLevel: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAccessLevel: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
uint32_t access = 0;
|
||||
BOOL userIsOwner;
|
||||
@@ -684,20 +684,20 @@ rtf2html (NSData *compressedRTF)
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int ) getPidTagHasNamedProperties: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagHasNamedProperties: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getYes: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidSideEffects: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSideEffects: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidCurrentVersion: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidCurrentVersion: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
// *data = MAPILongValue (memCtx, 115608); // Outlook 11.5608
|
||||
*data = MAPILongValue (memCtx, 0x1ce3a); // Outlook 11.8330
|
||||
@@ -705,34 +705,34 @@ rtf2html (NSData *compressedRTF)
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidCurrentVersionName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidCurrentVersionName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"11.0" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidAutoProcessState: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidAutoProcessState: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, 0x00000000);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagFolderId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagFolderId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongLongValue (memCtx, [container objectId]);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagMid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
uint64_t obId;
|
||||
|
||||
obId = [self objectId];
|
||||
@@ -747,24 +747,24 @@ rtf2html (NSData *compressedRTF)
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagMessageLocaleId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageLocaleId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, 0x0409);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagMessageFlags: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageFlags: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, MSGFLAG_FROMME | MSGFLAG_READ | MSGFLAG_UNMODIFIED);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagMessageSize: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageSize: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
/* TODO: choose another name in SOGo for that method */
|
||||
*data = MAPILongValue (memCtx, [[sogoObject davContentLength] intValue]);
|
||||
@@ -772,30 +772,30 @@ rtf2html (NSData *compressedRTF)
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagImportance: (void **) data // TODO -> subclass?
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagImportance: (void **) data // TODO -> subclass?
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, 1);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagPriority: (void **) data // TODO -> subclass?
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagPriority: (void **) data // TODO -> subclass?
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagSensitivity: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSensitivity: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagSubject: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSubject: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
TALLOC_CTX *localMemCtx;
|
||||
char *prefix, *normalizedSubject;
|
||||
|
||||
@@ -816,71 +816,71 @@ rtf2html (NSData *compressedRTF)
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagNormalizedSubject: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagNormalizedSubject: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagOriginalSubject: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagOriginalSubject: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidTagSubject: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagConversationTopic: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagConversationTopic: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidTagNormalizedSubject: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagSubjectPrefix: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSubjectPrefix: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getEmptyString: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagDeleteAfterSubmit: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDeleteAfterSubmit: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagDisplayTo: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDisplayTo: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getEmptyString: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagDisplayCc: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDisplayCc: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getEmptyString: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagDisplayBcc: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDisplayBcc: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getEmptyString: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
// - (int) getPidTagOriginalDisplayTo: (void **) data
|
||||
// - (enum mapistore_error) getPidTagOriginalDisplayTo: (void **) data
|
||||
// {
|
||||
// return [self getPidTagDisplayTo: data];
|
||||
// }
|
||||
|
||||
// - (int) getPidTagOriginalDisplayCc: (void **) data
|
||||
// - (enum mapistore_error) getPidTagOriginalDisplayCc: (void **) data
|
||||
// {
|
||||
// return [self getPidTagDisplayCc: data];
|
||||
// }
|
||||
|
||||
// - (int) getPidTagOriginalDisplayBcc: (void **) data
|
||||
// - (enum mapistore_error) getPidTagOriginalDisplayBcc: (void **) data
|
||||
// {
|
||||
// return [self getPidTagDisplayBcc: data];
|
||||
// }
|
||||
|
||||
- (int) getPidTagLastModifierName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagLastModifierName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSURL *contextUrl;
|
||||
|
||||
@@ -890,22 +890,22 @@ rtf2html (NSData *compressedRTF)
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
|
||||
return MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
- (int) getPidTagOriginalMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagOriginalMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getProperty: data withTag: PidTagMessageClass inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagHasAttachments: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagHasAttachments: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPIBoolValue (memCtx,
|
||||
[[self attachmentKeys] count] > 0);
|
||||
@@ -913,8 +913,8 @@ rtf2html (NSData *compressedRTF)
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagAssociated: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagAssociated: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];;
|
||||
}
|
||||
@@ -981,20 +981,38 @@ rtf2html (NSData *compressedRTF)
|
||||
activeUserRoles = [[context activeUser]
|
||||
rolesForObject: sogoObject
|
||||
inContext: [userContext woContext]];
|
||||
/* We use in this library the roles as flags, so we expand high
|
||||
access rights with the lower ones */
|
||||
activeUserRoles = [self expandRoles: activeUserRoles];
|
||||
[activeUserRoles retain];
|
||||
}
|
||||
|
||||
return activeUserRoles;
|
||||
}
|
||||
|
||||
/* Expand current roles with lower access roles to transform them to
|
||||
flags */
|
||||
- (NSArray *) expandRoles: (NSArray *) roles
|
||||
{
|
||||
return roles;
|
||||
}
|
||||
|
||||
/* Can the current active user read the message? */
|
||||
- (BOOL) subscriberCanReadMessage
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
/* Can the current active user modify the message? */
|
||||
- (BOOL) subscriberCanModifyMessage
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
/* Can the current active user delete the message? */
|
||||
- (BOOL) subscriberCanDeleteMessage
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,6 +1,7 @@
|
||||
/* MAPIStoreNotesContext.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2010-2012 Inverse inc.
|
||||
* Copyright (C) 2016 Enrique J. Hernandez
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
@@ -30,13 +31,30 @@
|
||||
#undef DEBUG
|
||||
#include <mapistore/mapistore.h>
|
||||
|
||||
static Class MAPIStoreNotesFolderK;
|
||||
|
||||
@implementation MAPIStoreNotesContext
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
MAPIStoreNotesFolderK = [MAPIStoreNotesFolder class];
|
||||
}
|
||||
|
||||
+ (NSString *) MAPIModuleName
|
||||
{
|
||||
return @"notes";
|
||||
}
|
||||
|
||||
+ (enum mapistore_context_role) MAPIContextRole
|
||||
{
|
||||
return MAPISTORE_NOTES_ROLE;
|
||||
}
|
||||
|
||||
- (Class) MAPIStoreFolderClass
|
||||
{
|
||||
return MAPIStoreNotesFolderK;
|
||||
}
|
||||
|
||||
+ (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName
|
||||
withIndexing: (struct indexing_context *) indexing
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
@implementation MAPIStoreNotesFolder
|
||||
|
||||
- (int) getPidTagDefaultPostMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDefaultPostMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"IPM.StickyNote" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
@implementation MAPIStoreNotesMessage
|
||||
|
||||
- (int) getPidTagIconIndex: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagIconIndex: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
/* see http://msdn.microsoft.com/en-us/library/cc815472.aspx */
|
||||
// *longValue = 0x00000300 for blue
|
||||
@@ -46,7 +46,7 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagMessageClass: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageClass: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"IPM.StickyNote" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
|
||||
@@ -68,27 +68,27 @@
|
||||
- (NSMutableDictionary *) properties;
|
||||
|
||||
/* ops */
|
||||
- (int) getProperties: (struct mapistore_property_data *) data
|
||||
withTags: (enum MAPITAGS *) tags
|
||||
andCount: (uint16_t) columnCount
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx;
|
||||
- (enum mapistore_error) getProperties: (struct mapistore_property_data *) data
|
||||
withTags: (enum MAPITAGS *) tags
|
||||
andCount: (uint16_t) columnCount
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx;
|
||||
|
||||
- (int) addPropertiesFromRow: (struct SRow *) aRow;
|
||||
- (enum mapistore_error) addPropertiesFromRow: (struct SRow *) aRow;
|
||||
|
||||
- (int) getProperty: (void **) data
|
||||
withTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx;
|
||||
- (enum mapistore_error) getProperty: (void **) data
|
||||
withTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx;
|
||||
|
||||
/* helper getters */
|
||||
- (NSData *) getReplicaKeyFromGlobCnt: (uint64_t) objectCnt;
|
||||
- (int) getReplicaKey: (void **) data
|
||||
fromGlobCnt: (uint64_t) objectCnt
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getReplicaKey: (void **) data
|
||||
fromGlobCnt: (uint64_t) objectCnt
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
- (int) getPidTagCreationTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagLastModificationTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagCreationTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagLastModificationTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
/* move and copy operations */
|
||||
- (void) copyPropertiesToObject: (MAPIStoreObject *) newObject inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
@@ -150,15 +150,15 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
||||
return properties;
|
||||
}
|
||||
|
||||
- (int) getProperty: (void **) data
|
||||
withTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getProperty: (void **) data
|
||||
withTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
MAPIStorePropertyGetter method = NULL;
|
||||
uint16_t propValue;
|
||||
SEL methodSel;
|
||||
id value;
|
||||
int rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
enum mapistore_error rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
NSUInteger count, max;
|
||||
|
||||
value = [properties objectForKey: MAPIPropertyKey (propTag)];
|
||||
@@ -186,16 +186,16 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagCreationTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagCreationTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [[self creationTime] asFileTimeInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagLastModificationTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagLastModificationTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [[self lastModificationTime] asFileTimeInMemCtx: memCtx];
|
||||
|
||||
@@ -219,10 +219,10 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
||||
return canGetProperty;
|
||||
}
|
||||
|
||||
- (int) getProperties: (struct mapistore_property_data *) data
|
||||
withTags: (enum MAPITAGS *) tags
|
||||
andCount: (uint16_t) columnCount
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getProperties: (struct mapistore_property_data *) data
|
||||
withTags: (enum MAPITAGS *) tags
|
||||
andCount: (uint16_t) columnCount
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
uint16_t count;
|
||||
|
||||
@@ -239,7 +239,7 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
||||
[proxies addObject: newProxy];
|
||||
}
|
||||
|
||||
- (int) addPropertiesFromRow: (struct SRow *) aRow
|
||||
- (enum mapistore_error) addPropertiesFromRow: (struct SRow *) aRow
|
||||
{
|
||||
struct SPropValue *cValue;
|
||||
NSUInteger counter;
|
||||
@@ -298,9 +298,9 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
||||
return replicaKey;
|
||||
}
|
||||
|
||||
- (int) getReplicaKey: (void **) data
|
||||
fromGlobCnt: (uint64_t) objectCnt
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getReplicaKey: (void **) data
|
||||
fromGlobCnt: (uint64_t) objectCnt
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [[self getReplicaKeyFromGlobCnt: objectCnt] asBinaryInMemCtx: memCtx];
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
MAPIStorePropertyGetter method;
|
||||
uint16_t propValue;
|
||||
SEL methodSel;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
propValue = (propTag & 0xffff0000) >> 16;
|
||||
methodSel = MAPIStoreSelectorForPropertyGetter (propValue);
|
||||
|
||||
@@ -84,16 +84,16 @@
|
||||
return memberId;
|
||||
}
|
||||
|
||||
- (int) getPidTagMemberId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMemberId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongLongValue (memCtx, memberId);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSData *entryId;
|
||||
struct mapistore_connection_info *connInfo;
|
||||
@@ -110,8 +110,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagMemberName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMemberName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *displayName;
|
||||
|
||||
@@ -127,13 +127,14 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagMemberRights: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMemberRights: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
uint32_t rights;
|
||||
NSArray *roles;
|
||||
|
||||
roles = [[(MAPIStoreFolder *) container aclFolder] aclsForUser: userId];
|
||||
roles = [(MAPIStoreFolder *) container expandRoles: roles];
|
||||
rights = [(MAPIStoreFolder *) container exchangeRightsForRoles: roles];
|
||||
|
||||
*data = MAPILongValue (memCtx, rights);
|
||||
|
||||
+68
-40
@@ -146,6 +146,8 @@ sogo_backend_init (void)
|
||||
NSUserDefaults *ud;
|
||||
SoProductRegistry *registry;
|
||||
char *argv[] = { SAMBA_PREFIX "/sbin/samba", NULL };
|
||||
NSString *debugLevel;
|
||||
uint8_t parentLogLevel;
|
||||
|
||||
GSRegisterCurrentThread();
|
||||
|
||||
@@ -170,6 +172,11 @@ sogo_backend_init (void)
|
||||
|
||||
/* We force the plugin to base its configuration on the SOGo tree. */
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
/* Ensure imap4Connection calls raise Exception if
|
||||
IMAP connection is not established. See NGImap4Connection.m */
|
||||
[ud setBool: YES forKey: @"SoIMAP4ExceptionsEnabled"];
|
||||
|
||||
if (!leakDebugging && [ud boolForKey: @"SOGoDebugLeaks"])
|
||||
{
|
||||
NSLog (@" leak debugging on");
|
||||
@@ -178,6 +185,22 @@ sogo_backend_init (void)
|
||||
leakDebugging = YES;
|
||||
}
|
||||
|
||||
/* Set debug level according to samba */
|
||||
parentLogLevel = DEBUGLEVEL_CLASS[DBGC_ALL]; // FIXME: samba logger specific code
|
||||
if (parentLogLevel >= 4)
|
||||
debugLevel = @"DEBUG";
|
||||
else if (parentLogLevel >= 3)
|
||||
debugLevel = @"INFO";
|
||||
else if (parentLogLevel >= 2)
|
||||
debugLevel = @"WARN";
|
||||
else if (parentLogLevel >= 1)
|
||||
debugLevel = @"ERROR";
|
||||
else
|
||||
debugLevel = @"FATAL";
|
||||
OC_DEBUG(3, "[SOGo] Setting log level to %s", [debugLevel UTF8String]);
|
||||
[ud setObject: debugLevel forKey: @"NGLogDefaultLogLevel"];
|
||||
[ud synchronize];
|
||||
|
||||
registry = [SoProductRegistry sharedProductRegistry];
|
||||
[registry scanForProductsInDirectory: SOGO_BUNDLES_DIR];
|
||||
|
||||
@@ -221,8 +244,13 @@ static void mapiapp_cleanup(void)
|
||||
\details Create a connection context to the sogo backend
|
||||
|
||||
\param mem_ctx pointer to the memory context
|
||||
\param conn_info pointer to the connection information available for this context
|
||||
(database connection, connected user, replica server info)
|
||||
\param indexing pointer to the indexing database connection
|
||||
\param uri pointer to the sogo path
|
||||
\param private_data pointer to the private backend context
|
||||
|
||||
\note the developer must free allocated private_data
|
||||
*/
|
||||
|
||||
static enum mapistore_error
|
||||
@@ -233,7 +261,7 @@ sogo_backend_create_context(TALLOC_CTX *mem_ctx,
|
||||
{
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreContext *context;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
NS_CURRENT_THREAD_REGISTER();
|
||||
pool = [NSAutoreleasePool new];
|
||||
@@ -268,7 +296,7 @@ sogo_backend_create_root_folder (const char *username,
|
||||
NSAutoreleasePool *pool;
|
||||
NSString *userName, *folderName;
|
||||
NSString *mapistoreUri;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
NS_CURRENT_THREAD_REGISTER();
|
||||
pool = [NSAutoreleasePool new];
|
||||
@@ -303,7 +331,7 @@ sogo_backend_list_contexts(const char *username, struct indexing_context *indexi
|
||||
{
|
||||
NSAutoreleasePool *pool;
|
||||
NSString *userName;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
NS_CURRENT_THREAD_REGISTER();
|
||||
pool = [NSAutoreleasePool new];
|
||||
@@ -349,7 +377,7 @@ sogo_context_get_path(void *backend_object, TALLOC_CTX *mem_ctx,
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreContext *context;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (backend_object)
|
||||
{
|
||||
@@ -381,7 +409,7 @@ sogo_context_get_root_folder(void *backend_object, TALLOC_CTX *mem_ctx,
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreContext *context;
|
||||
MAPIStoreFolder *folder;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (backend_object)
|
||||
{
|
||||
@@ -422,7 +450,7 @@ sogo_folder_open_folder(void *folder_object, TALLOC_CTX *mem_ctx, uint64_t fid,
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreFolder *folder, *childFolder;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -464,7 +492,7 @@ sogo_folder_create_folder(void *folder_object, TALLOC_CTX *mem_ctx,
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreFolder *folder, *childFolder;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -505,7 +533,7 @@ sogo_folder_delete(void *folder_object)
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreFolder *folder;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -535,7 +563,7 @@ sogo_folder_get_child_count(void *folder_object, enum mapistore_table_type table
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreFolder *folder;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -569,7 +597,7 @@ sogo_folder_open_message(void *folder_object,
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreFolder *folder;
|
||||
MAPIStoreMessage *message;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -609,7 +637,7 @@ sogo_folder_create_message(void *folder_object,
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreFolder *folder;
|
||||
MAPIStoreMessage *message;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -643,7 +671,7 @@ sogo_folder_delete_message(void *folder_object, uint64_t mid, uint8_t flags)
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreFolder *folder;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -680,7 +708,7 @@ sogo_folder_move_copy_messages(void *folder_object,
|
||||
MAPIStoreFolder *sourceFolder, *targetFolder;
|
||||
NSAutoreleasePool *pool;
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -723,7 +751,7 @@ sogo_folder_move_folder(void *folder_object, void *target_folder_object,
|
||||
MAPIStoreFolder *moveFolder, *targetFolder;
|
||||
NSString *newFolderName;
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -771,7 +799,7 @@ sogo_folder_copy_folder(void *folder_object, void *target_folder_object, TALLOC_
|
||||
MAPIStoreFolder *copyFolder, *targetFolder;
|
||||
NSString *newFolderName;
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -813,7 +841,7 @@ sogo_folder_get_deleted_fmids(void *folder_object, TALLOC_CTX *mem_ctx,
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreFolder *folder;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -850,7 +878,7 @@ sogo_folder_open_table(void *folder_object, TALLOC_CTX *mem_ctx,
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreFolder *folder;
|
||||
MAPIStoreTable *table;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -887,7 +915,7 @@ sogo_folder_modify_permissions(void *folder_object, uint8_t flags,
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreFolder *folder;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -919,7 +947,7 @@ sogo_folder_preload_message_bodies(void *folder_object, enum mapistore_table_typ
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreFolder *folder;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (folder_object)
|
||||
{
|
||||
@@ -952,7 +980,7 @@ sogo_message_get_message_data(void *message_object,
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreMessage *message;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (message_object)
|
||||
{
|
||||
@@ -985,7 +1013,7 @@ sogo_message_create_attachment (void *message_object, TALLOC_CTX *mem_ctx, void
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreMessage *message;
|
||||
MAPIStoreAttachment *attachment;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (message_object)
|
||||
{
|
||||
@@ -1019,7 +1047,7 @@ sogo_message_open_attachment (void *message_object, TALLOC_CTX *mem_ctx,
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreMessage *message;
|
||||
MAPIStoreAttachment *attachment;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (message_object)
|
||||
{
|
||||
@@ -1052,7 +1080,7 @@ sogo_message_get_attachment_table (void *message_object, TALLOC_CTX *mem_ctx, vo
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreMessage *message;
|
||||
MAPIStoreAttachmentTable *table;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (message_object)
|
||||
{
|
||||
@@ -1088,7 +1116,7 @@ sogo_message_modify_recipients (void *message_object,
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreMessage *message;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (message_object)
|
||||
{
|
||||
@@ -1150,7 +1178,7 @@ sogo_message_save (void *message_object, TALLOC_CTX *mem_ctx)
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreMessage *message;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (message_object)
|
||||
{
|
||||
@@ -1180,7 +1208,7 @@ sogo_message_submit (void *message_object, enum SubmitFlags flags)
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreMailVolatileMessage *message;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (message_object)
|
||||
{
|
||||
@@ -1215,7 +1243,7 @@ sogo_message_attachment_open_embedded_message (void *attachment_object,
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreAttachment *attachment;
|
||||
MAPIStoreEmbeddedMessage *message;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (attachment_object)
|
||||
{
|
||||
@@ -1254,7 +1282,7 @@ sogo_message_attachment_create_embedded_message (void *attachment_object,
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreAttachment *attachment;
|
||||
MAPIStoreEmbeddedMessage *message;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (attachment_object)
|
||||
{
|
||||
@@ -1288,7 +1316,7 @@ static enum mapistore_error sogo_table_get_available_properties(void *table_obje
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreTable *table;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (table_object)
|
||||
{
|
||||
@@ -1318,7 +1346,7 @@ sogo_table_set_columns (void *table_object, uint16_t count, enum MAPITAGS *prope
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreTable *table;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (table_object)
|
||||
{
|
||||
@@ -1349,7 +1377,7 @@ sogo_table_set_restrictions (void *table_object, struct mapi_SRestriction *restr
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreTable *table;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (table_object)
|
||||
{
|
||||
@@ -1382,7 +1410,7 @@ sogo_table_set_sort_order (void *table_object, struct SSortOrderSet *sort_order,
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreTable *table;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (table_object)
|
||||
{
|
||||
@@ -1417,7 +1445,7 @@ sogo_table_get_row (void *table_object, TALLOC_CTX *mem_ctx,
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreTable *table;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (table_object)
|
||||
{
|
||||
@@ -1450,7 +1478,7 @@ sogo_table_get_row_count (void *table_object,
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreTable *table;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (table_object)
|
||||
{
|
||||
@@ -1481,7 +1509,7 @@ sogo_table_handle_destructor (void *table_object, uint32_t handle_id)
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreTable *table;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (table_object)
|
||||
{
|
||||
@@ -1513,7 +1541,7 @@ static enum mapistore_error sogo_properties_get_available_properties(void *objec
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreObject *propObject;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (object)
|
||||
{
|
||||
@@ -1546,7 +1574,7 @@ sogo_properties_get_properties (void *object,
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreObject *propObject;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (object)
|
||||
{
|
||||
@@ -1578,7 +1606,7 @@ sogo_properties_set_properties (void *object, struct SRow *aRow)
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreObject *propObject;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
if (object)
|
||||
{
|
||||
@@ -1656,10 +1684,10 @@ sogo_manager_generate_uri (TALLOC_CTX *mem_ctx,
|
||||
|
||||
\return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
|
||||
*/
|
||||
int mapistore_init_backend(void)
|
||||
enum mapistore_error mapistore_init_backend(void)
|
||||
{
|
||||
struct mapistore_backend backend;
|
||||
int ret;
|
||||
enum mapistore_error ret;
|
||||
static BOOL registered = NO;
|
||||
|
||||
if (registered)
|
||||
|
||||
@@ -65,18 +65,18 @@
|
||||
- (uint64_t) objectId;
|
||||
|
||||
/* implemented getters */
|
||||
- (int) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagSearchKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagGenerateExchangeViews: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagParentSourceKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagSourceKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTagChangeKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagSearchKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagGenerateExchangeViews: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagParentSourceKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagSourceKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTagChangeKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
/* subclasses */
|
||||
- (uint64_t) objectVersion;
|
||||
|
||||
@@ -136,16 +136,16 @@ static Class MAPIStoreFolderK;
|
||||
}
|
||||
|
||||
/* getters */
|
||||
- (int) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagDisplayName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [[sogoObject displayName] asUnicodeInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagSearchKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSearchKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
|
||||
@@ -156,31 +156,31 @@ static Class MAPIStoreFolderK;
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagGenerateExchangeViews: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagGenerateExchangeViews: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagParentSourceKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagParentSourceKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getReplicaKey: data fromGlobCnt: [container objectId] >> 16
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagSourceKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSourceKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getReplicaKey: data fromGlobCnt: [self objectId] >> 16
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
/* helper getters */
|
||||
- (int) getPidTagChangeKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagChangeKey: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
uint64_t obVersion;
|
||||
|
||||
obVersion = [self objectVersion];
|
||||
@@ -193,10 +193,10 @@ static Class MAPIStoreFolderK;
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidTagChangeNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagChangeNumber: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
struct mapistore_connection_info *connInfo;
|
||||
uint64_t obVersion;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* MAPIStoreSharingMessage.h - this file is part of SOGo-OpenChange
|
||||
*
|
||||
* Copyright (C) 2015 Enrique J. Hernández
|
||||
* Copyright (C) 2015-2016 Enrique J. Hernández
|
||||
*
|
||||
* Author: Enrique J. Hernández <ejhernandez@zentyal.com>
|
||||
*
|
||||
@@ -39,58 +39,58 @@
|
||||
fromMessage: (MAPIStoreMailMessage *) msg;
|
||||
|
||||
/* getters */
|
||||
- (int) getPidLidSharingCapabilities: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidNameXSharingCapabilities: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingConfigurationUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidNameXSharingConfigUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingFlavor: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidNameXSharingFlavor: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingInitiatorEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingInitiatorName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingInitiatorSmtp: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingLocalType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidNameXSharingLocalType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingProviderGuid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidNameXSharingProviderGuid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingProviderName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidNameXSharingProviderName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingProviderUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidNameXSharingProviderUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingRemoteName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidNameXSharingRemoteName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingRemoteStoreUid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidNameXSharingRemoteStoreUid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingRemoteType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidTypeXSharingRemoteType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingResponseTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidSharingResponseType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidNameContentClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingCapabilities: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidNameXSharingCapabilities: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingConfigurationUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidNameXSharingConfigUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingFlavor: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidNameXSharingFlavor: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingInitiatorEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingInitiatorName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingInitiatorSmtp: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingLocalType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidNameXSharingLocalType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingProviderGuid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidNameXSharingProviderGuid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingProviderName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidNameXSharingProviderName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingProviderUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidNameXSharingProviderUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingRemoteName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidNameXSharingRemoteName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingRemoteStoreUid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidNameXSharingRemoteStoreUid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingRemoteType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidTypeXSharingRemoteType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingResponseTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidLidSharingResponseType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getPidNameContentClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
/* Save */
|
||||
- (void) saveWithMessage: (MAPIStoreMailMessage *) msg
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* MAPIStoreSharingMessage.m - this file is part of SOGo-OpenChange
|
||||
*
|
||||
* Copyright (C) 2015 Enrique J. Hernández
|
||||
* Copyright (C) 2015-2016 Enrique J. Hernández
|
||||
*
|
||||
* Author: Enrique J. Hernández <ejhernandez@zentyal.com>
|
||||
*
|
||||
@@ -108,8 +108,8 @@
|
||||
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingCapabilities: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingCapabilities: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
|
||||
enum mapistore_error rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
@@ -125,8 +125,8 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidNameXSharingCapabilities: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidNameXSharingCapabilities: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
|
||||
enum mapistore_error rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
@@ -143,22 +143,22 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingConfigurationUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingConfigurationUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
|
||||
*data = [@"" asUnicodeInMemCtx: memCtx];
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidNameXSharingConfigUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidNameXSharingConfigUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidLidSharingConfigurationUrl: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingFlavor: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingFlavor: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
/* See [MS-OXSHARE] Section 2.2.2.5 for details */
|
||||
enum mapistore_error rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
@@ -206,8 +206,8 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidNameXSharingFlavor: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidNameXSharingFlavor: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
enum mapistore_error rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
id value;
|
||||
@@ -223,8 +223,8 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingInitiatorEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingInitiatorEntryId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
enum mapistore_error rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
id value;
|
||||
@@ -244,38 +244,38 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingInitiatorName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingInitiatorName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getStringProperty: @"x-ms-sharing-initiatorname"
|
||||
inData: data
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingInitiatorSmtp: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingInitiatorSmtp: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getStringProperty: @"x-ms-sharing-initiatorsmtp"
|
||||
inData: data
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingLocalType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingLocalType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getStringProperty: @"x-ms-sharing-localtype"
|
||||
inData: data
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidNameXSharingLocalType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidNameXSharingLocalType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidLidSharingLocalType: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingProviderGuid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingProviderGuid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
const unsigned char providerGuidBytes[] = {0xAE, 0xF0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46};
|
||||
@@ -284,15 +284,15 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidNameXSharingProviderGuid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidNameXSharingProviderGuid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"AEF0060000000000C000000000000046" asUnicodeInMemCtx: memCtx];
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingProviderName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingProviderName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
|
||||
return [self _getStringProperty: @"x-ms-sharing-providername"
|
||||
@@ -300,84 +300,84 @@
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidNameXSharingProviderName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidNameXSharingProviderName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidLidSharingProviderName: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingProviderUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingProviderUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getStringProperty: @"x-ms-sharing-providerurl"
|
||||
inData: data
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidNameXSharingProviderUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidNameXSharingProviderUrl: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidLidSharingProviderUrl: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingRemoteName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingRemoteName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getStringProperty: @"x-ms-sharing-remotename"
|
||||
inData: data
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidNameXSharingRemoteName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidNameXSharingRemoteName: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidLidSharingRemoteName: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingRemoteStoreUid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingRemoteStoreUid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getStringProperty: @"x-ms-sharing-remotestoreuid"
|
||||
inData: data
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidNameXSharingRemoteStoreUid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidNameXSharingRemoteStoreUid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidLidSharingRemoteStoreUid: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingRemoteType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingRemoteType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getStringProperty: @"x-ms-sharing-remotetype"
|
||||
inData: data
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTypeXSharingRemoteType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTypeXSharingRemoteType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidLidSharingRemoteType: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingRemoteUid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingRemoteUid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self _getStringProperty: @"x-ms-sharing-remoteuid"
|
||||
inData: data
|
||||
inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidUidXSharingRemoteUid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidUidXSharingRemoteUid: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidLidSharingRemoteUid: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingResponseTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingResponseTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
enum mapistore_error rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
id value;
|
||||
@@ -403,8 +403,8 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidLidSharingResponseType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidSharingResponseType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
|
||||
enum mapistore_error rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
@@ -423,8 +423,8 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidNameContentClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidNameContentClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = talloc_strdup (memCtx, "Sharing");
|
||||
return MAPISTORE_SUCCESS;
|
||||
|
||||
+10
-10
@@ -88,17 +88,17 @@ typedef enum {
|
||||
|
||||
- (void) cleanupCaches;
|
||||
|
||||
- (int) getAvailableProperties: (struct SPropTagArray **) propertiesP
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx;
|
||||
- (enum mapistore_error) getAvailableProperties: (struct SPropTagArray **) propertiesP
|
||||
inMemCtx: (TALLOC_CTX *) localMemCtx;
|
||||
- (void) setRestrictions: (const struct mapi_SRestriction *) res;
|
||||
- (int) setColumns: (enum MAPITAGS *) newColumns
|
||||
withCount: (uint16_t) newColumCount;
|
||||
- (int) getRow: (struct mapistore_property_data **) dataP
|
||||
withRowID: (uint32_t) rowId
|
||||
andQueryType: (enum mapistore_query_type) queryType
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getRowCount: (uint32_t *) countP
|
||||
withQueryType: (enum mapistore_query_type) queryType;
|
||||
- (enum mapistore_error) setColumns: (enum MAPITAGS *) newColumns
|
||||
withCount: (uint16_t) newColumCount;
|
||||
- (enum mapistore_error) getRow: (struct mapistore_property_data **) dataP
|
||||
withRowID: (uint32_t) rowId
|
||||
andQueryType: (enum mapistore_query_type) queryType
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getRowCount: (uint32_t *) countP
|
||||
withQueryType: (enum mapistore_query_type) queryType;
|
||||
|
||||
/* helpers */
|
||||
|
||||
|
||||
+11
-11
@@ -366,8 +366,8 @@ static Class NSDataK, NSStringK;
|
||||
currentRow = (uint32_t) -1;
|
||||
}
|
||||
|
||||
- (int) getAvailableProperties: (struct SPropTagArray **) propertiesP
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getAvailableProperties: (struct SPropTagArray **) propertiesP
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [[isa childObjectClass] getAvailableProperties: propertiesP
|
||||
inMemCtx: memCtx];
|
||||
@@ -749,8 +749,8 @@ static Class NSDataK, NSStringK;
|
||||
}
|
||||
|
||||
/* proof of concept */
|
||||
- (int) setColumns: (enum MAPITAGS *) newColumns
|
||||
withCount: (uint16_t) newColumnsCount
|
||||
- (enum mapistore_error) setColumns: (enum MAPITAGS *) newColumns
|
||||
withCount: (uint16_t) newColumnsCount
|
||||
{
|
||||
NSUInteger count;
|
||||
|
||||
@@ -831,15 +831,15 @@ static Class NSDataK, NSStringK;
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (int) getRow: (struct mapistore_property_data **) dataP
|
||||
withRowID: (uint32_t) rowId
|
||||
andQueryType: (enum mapistore_query_type) queryType
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getRow: (struct mapistore_property_data **) dataP
|
||||
withRowID: (uint32_t) rowId
|
||||
andQueryType: (enum mapistore_query_type) queryType
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSUInteger count;
|
||||
MAPIStoreObject *child;
|
||||
struct mapistore_property_data *rowData;
|
||||
int rc;
|
||||
enum mapistore_error rc;
|
||||
|
||||
child = [self childAtRowID: rowId forQueryType: queryType];
|
||||
if (child)
|
||||
@@ -858,8 +858,8 @@ static Class NSDataK, NSStringK;
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getRowCount: (uint32_t *) countP
|
||||
withQueryType: (enum mapistore_query_type) queryType
|
||||
- (enum mapistore_error) getRowCount: (uint32_t *) countP
|
||||
withQueryType: (enum mapistore_query_type) queryType
|
||||
{
|
||||
NSArray *children;
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
#ifndef MAPISTORETASKSFOLDER_H
|
||||
#define MAPISTORETASKSFOLDER_H
|
||||
|
||||
#import "MAPIStoreGCSFolder.h"
|
||||
#import "MAPIStoreCalTaskFolder.h"
|
||||
|
||||
@interface MAPIStoreTasksFolder : MAPIStoreGCSFolder
|
||||
@interface MAPIStoreTasksFolder : MAPIStoreCalTaskFolder
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -75,6 +75,10 @@
|
||||
return newMessage;
|
||||
}
|
||||
|
||||
// --------------------------------------------
|
||||
// Permissions and sharing
|
||||
// --------------------------------------------
|
||||
|
||||
- (NSArray *) rolesForExchangeRights: (uint32_t) rights
|
||||
{
|
||||
NSMutableArray *roles;
|
||||
@@ -82,21 +86,34 @@
|
||||
roles = [NSMutableArray arrayWithCapacity: 6];
|
||||
if (rights & RightsCreateItems)
|
||||
[roles addObject: SOGoRole_ObjectCreator];
|
||||
|
||||
if (rights & RightsDeleteAll)
|
||||
[roles addObject: SOGoRole_ObjectEraser];
|
||||
if (rights & RightsDeleteOwn)
|
||||
[roles addObject: MAPIStoreRightDeleteOwn];
|
||||
|
||||
if (rights & RightsEditAll)
|
||||
{
|
||||
[roles addObject: SOGoCalendarRole_PublicModifier];
|
||||
[roles addObject: SOGoCalendarRole_PrivateModifier];
|
||||
[roles addObject: SOGoCalendarRole_ConfidentialModifier];
|
||||
}
|
||||
else if (rights & RightsReadItems)
|
||||
if (rights & RightsEditOwn)
|
||||
[roles addObject: MAPIStoreRightEditOwn];
|
||||
|
||||
if (rights & RightsReadItems)
|
||||
{
|
||||
[roles addObject: SOGoCalendarRole_PublicViewer];
|
||||
[roles addObject: SOGoCalendarRole_PrivateViewer];
|
||||
[roles addObject: SOGoCalendarRole_ConfidentialViewer];
|
||||
}
|
||||
|
||||
if (rights & RightsFolderOwner)
|
||||
[roles addObject: MAPIStoreRightFolderOwner];
|
||||
|
||||
if (rights & RightsFolderContact)
|
||||
[roles addObject: MAPIStoreRightFolderContact];
|
||||
|
||||
return roles;
|
||||
}
|
||||
|
||||
@@ -116,20 +133,65 @@
|
||||
&& [roles containsObject: SOGoCalendarRole_PrivateViewer]
|
||||
&& [roles containsObject: SOGoCalendarRole_ConfidentialViewer])
|
||||
rights |= RightsReadItems;
|
||||
|
||||
if ([roles containsObject: MAPIStoreRightEditOwn])
|
||||
rights |= RightsEditOwn;
|
||||
if ([roles containsObject: MAPIStoreRightDeleteOwn])
|
||||
rights |= RightsDeleteOwn;
|
||||
|
||||
if (rights != 0)
|
||||
rights |= RoleNone; /* actually "folder visible" */
|
||||
|
||||
if ([roles containsObject: MAPIStoreRightFolderOwner])
|
||||
rights |= RightsFolderOwner | RoleNone;
|
||||
|
||||
if ([roles containsObject: MAPIStoreRightFolderContact])
|
||||
rights |= RightsFolderContact;
|
||||
|
||||
return rights;
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanModifyMessages
|
||||
{
|
||||
static NSArray *modifierRoles = nil;
|
||||
|
||||
if (!modifierRoles)
|
||||
modifierRoles = [[NSArray alloc] initWithObjects:
|
||||
SOGoCalendarRole_PublicModifier,
|
||||
SOGoCalendarRole_PrivateModifier,
|
||||
SOGoCalendarRole_ConfidentialModifier,
|
||||
nil];
|
||||
|
||||
return ([[self activeUserRoles] firstObjectCommonWithArray: modifierRoles]
|
||||
!= nil);
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanReadMessages
|
||||
{
|
||||
static NSArray *viewerRoles = nil;
|
||||
|
||||
if (!viewerRoles)
|
||||
viewerRoles = [[NSArray alloc] initWithObjects:
|
||||
SOGoCalendarRole_PublicViewer,
|
||||
SOGoCalendarRole_PrivateViewer,
|
||||
SOGoCalendarRole_ConfidentialViewer,
|
||||
nil];
|
||||
|
||||
return ([[self activeUserRoles] firstObjectCommonWithArray: viewerRoles]
|
||||
!= nil);
|
||||
}
|
||||
|
||||
- (EOQualifier *) aclQualifier
|
||||
{
|
||||
return [EOQualifier qualifierWithQualifierFormat:
|
||||
[(SOGoAppointmentFolder *) sogoObject aclSQLListingFilter]];
|
||||
}
|
||||
|
||||
- (int) getPidTagDefaultPostMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
// --------------------------------------------
|
||||
// Property getters
|
||||
// --------------------------------------------
|
||||
- (enum mapistore_error) getPidTagDefaultPostMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"IPM.Task" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
#ifndef MAPISTORETASKSMESSAGE_H
|
||||
#define MAPISTORETASKSMESSAGE_H
|
||||
|
||||
#import "MAPIStoreGCSMessage.h"
|
||||
#import "MAPIStoreCalTaskMessage.h"
|
||||
|
||||
@interface MAPIStoreTasksMessage : MAPIStoreGCSMessage
|
||||
@interface MAPIStoreTasksMessage : MAPIStoreCalTaskMessage
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -68,8 +68,8 @@
|
||||
|
||||
@implementation MAPIStoreTasksMessage
|
||||
|
||||
- (int) getPidTagIconIndex: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagIconIndex: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
/* see http://msdn.microsoft.com/en-us/library/cc815472.aspx */
|
||||
// Unassigned recurring task 0x00000501
|
||||
@@ -83,16 +83,16 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = talloc_strdup(memCtx, "IPM.Task");
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidTagNormalizedSubject: (void **) data // SUMMARY
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagNormalizedSubject: (void **) data // SUMMARY
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
iCalToDo *task;
|
||||
|
||||
@@ -103,10 +103,10 @@
|
||||
}
|
||||
|
||||
/* FIXME: Should be combined somehow with the code in MAPIStoreAppointmentWrapper.m */
|
||||
- (int) getPidTagBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
NSString *stringValue;
|
||||
iCalToDo *task;
|
||||
|
||||
@@ -122,21 +122,32 @@
|
||||
}
|
||||
|
||||
/* FIXME: Should be combined somehow with the code in MAPIStoreAppointmentWrapper.m */
|
||||
- (int) getPidLidPrivate: (void **) data // private (bool), should depend on CLASS and permissions
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidPrivate: (void **) data // private (bool), should depend on CLASS and permissions
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
iCalToDo *task;
|
||||
|
||||
task = [sogoObject component: NO secure: YES];
|
||||
|
||||
if ([task symbolicAccessClass] == iCalAccessPublic)
|
||||
if ([task isPublic])
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
|
||||
return [self getYes: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagImportance: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagSensitivity: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
uint32_t v;
|
||||
|
||||
v = (uint32_t) [self sensitivity];
|
||||
|
||||
*data = MAPILongValue (memCtx, v);
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (enum mapistore_error) getPidTagImportance: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
uint32_t v;
|
||||
iCalToDo *task;
|
||||
@@ -154,8 +165,11 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidTaskComplete: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
//------------------------------------
|
||||
// Specific task related properties
|
||||
//------------------------------------
|
||||
- (enum mapistore_error) getPidLidTaskComplete: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
iCalToDo *task;
|
||||
|
||||
@@ -166,8 +180,8 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidPercentComplete: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidPercentComplete: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
double doubleValue;
|
||||
iCalToDo *task;
|
||||
@@ -180,10 +194,10 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidTaskDateCompleted: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidTaskDateCompleted: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
NSCalendarDate *dateValue;
|
||||
iCalToDo *task;
|
||||
|
||||
@@ -198,54 +212,54 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidLidTaskState: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidTaskState: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, 0x1); // not assigned
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidTaskMode: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidTaskMode: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidTaskFRecurring: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidTaskFRecurring: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidTaskAccepted: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidTaskAccepted: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidTaskActualEffort: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidTaskActualEffort: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidTaskEstimatedEffort: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidTaskEstimatedEffort: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidTagHasAttachments: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagHasAttachments: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidTaskDueDate: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidTaskDueDate: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
NSCalendarDate *dateValue;
|
||||
iCalToDo *task;
|
||||
|
||||
@@ -259,10 +273,10 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidLidTaskStartDate: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidTaskStartDate: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
NSCalendarDate *dateValue;
|
||||
iCalToDo *task;
|
||||
|
||||
@@ -277,26 +291,26 @@
|
||||
}
|
||||
|
||||
|
||||
- (int) getPidTagMessageDeliveryTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidTagMessageDeliveryTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidTagLastModificationTime: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getClientSubmitTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getClientSubmitTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidTagLastModificationTime: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getLocalCommitTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getLocalCommitTime: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPidTagLastModificationTime: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidTaskStatus: (void **) data // status
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidTaskStatus: (void **) data // status
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *status;
|
||||
uint32_t longValue;
|
||||
@@ -318,11 +332,12 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidTaskOwner: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidTaskOwner: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *owner;
|
||||
|
||||
/* FIXME: This is wrong when setting task's request */
|
||||
owner = [sogoObject ownerInContext: nil];
|
||||
|
||||
*data = [owner asUnicodeInMemCtx: memCtx];
|
||||
@@ -330,31 +345,51 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidTaskOwnership: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getPidLidTaskOwnership: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanReadMessage
|
||||
// ----------------------------------
|
||||
// Sharing
|
||||
// ----------------------------------
|
||||
- (NSUInteger) sensitivity
|
||||
{
|
||||
return ([[self activeUserRoles]
|
||||
containsObject: SOGoCalendarRole_ComponentViewer]
|
||||
|| [self subscriberCanModifyMessage]);
|
||||
iCalToDo *task;
|
||||
NSUInteger v;
|
||||
|
||||
task = [sogoObject component: NO secure: YES];
|
||||
/* FIXME: Use OpenChange constants names */
|
||||
switch ([task symbolicAccessClass])
|
||||
{
|
||||
case iCalAccessPrivate:
|
||||
v = 0x2;
|
||||
break;
|
||||
case iCalAccessConfidential:
|
||||
v = 0x3;
|
||||
break;
|
||||
default:
|
||||
v = 0x0;
|
||||
break;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
- (BOOL) subscriberCanModifyMessage
|
||||
- (NSString *) creator
|
||||
{
|
||||
BOOL rc;
|
||||
NSArray *roles = [self activeUserRoles];
|
||||
iCalToDo *task;
|
||||
|
||||
if (isNew)
|
||||
rc = [roles containsObject: SOGoRole_ObjectCreator];
|
||||
else
|
||||
rc = ([roles containsObject: SOGoCalendarRole_ComponentModifier]
|
||||
|| [roles containsObject: SOGoCalendarRole_ComponentResponder]);
|
||||
task = [sogoObject component: NO secure: YES];
|
||||
return [[task uniqueChildWithTag: @"x-sogo-component-created-by"]
|
||||
flattenedValuesForKey: @""];
|
||||
}
|
||||
|
||||
return rc;
|
||||
- (NSString *) owner
|
||||
{
|
||||
/* This is not true but to allow a user edit its own tasks is required.
|
||||
FIXME: When PidLidTaskOwner getter is properly implemented for Task Requests */
|
||||
return [self creator];
|
||||
}
|
||||
|
||||
- (void) save:(TALLOC_CTX *) memCtx
|
||||
@@ -524,10 +559,16 @@
|
||||
[vToDo setAccessClass: @"PUBLIC"];
|
||||
}
|
||||
|
||||
/* Creation */
|
||||
now = [NSCalendarDate date];
|
||||
if ([sogoObject isNew])
|
||||
{
|
||||
[vToDo setCreated: now];
|
||||
/* Creator is used for sharing purposes */
|
||||
value = [properties objectForKey: MAPIPropertyKey (PidTagLastModifierName)];
|
||||
if (value)
|
||||
[[vToDo uniqueChildWithTag: @"x-sogo-component-created-by"] setSingleValue: value
|
||||
forKey: @""];
|
||||
}
|
||||
[vToDo setTimeStampAsDate: now];
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* MAPIStoreUserContext.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2012 Inverse inc
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2012-2016 Inverse inc
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -35,6 +33,7 @@
|
||||
#import <NGImap4/NGImap4Connection.h>
|
||||
|
||||
#import <GDLContentStore/GCSChannelManager.h>
|
||||
#import <GDLContentStore/GCSFolderManager.h>
|
||||
#import <SOGo/SOGoDomainDefaults.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserFolder.h>
|
||||
@@ -339,6 +338,9 @@ static NSMapTable *contextsTable = nil;
|
||||
NSString *tableName, *query;
|
||||
GCSSpecialQueries *queries;
|
||||
|
||||
if ([GCSFolderManager singleStoreMode])
|
||||
return;
|
||||
|
||||
[self folderTableURL];
|
||||
|
||||
cm = [GCSChannelManager defaultChannelManager];
|
||||
|
||||
@@ -41,16 +41,16 @@ struct MAPIStoreTallocWrapper
|
||||
|
||||
@interface NSObject (MAPIStoreDataTypes)
|
||||
|
||||
- (int) getValue: (void **) data
|
||||
forTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getValue: (void **) data
|
||||
forTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
/* getter helpers */
|
||||
- (int) getEmptyString: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getLongZero: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getYes: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getNo: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getSMTPAddrType: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getEmptyString: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getLongZero: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getYes: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getNo: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (enum mapistore_error) getSMTPAddrType: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -74,12 +74,12 @@ MAPIStoreTallocWrapperDestroy (void *data)
|
||||
|
||||
@implementation NSObject (MAPIStoreDataTypes)
|
||||
|
||||
- (int) getValue: (void **) data
|
||||
forTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getValue: (void **) data
|
||||
forTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
uint16_t valueType;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
enum mapistore_error rc = MAPISTORE_SUCCESS;
|
||||
|
||||
// [self logWithFormat: @"property %.8x found", propTag];
|
||||
valueType = (propTag & 0xffff);
|
||||
@@ -139,35 +139,35 @@ MAPIStoreTallocWrapperDestroy (void *data)
|
||||
}
|
||||
|
||||
/* helper getters */
|
||||
- (int) getEmptyString: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getEmptyString: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getLongZero: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getLongZero: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPILongValue (memCtx, 0);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getYes: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getYes: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPIBoolValue (memCtx, YES);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getNo: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getNo: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = MAPIBoolValue (memCtx, NO);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getSMTPAddrType: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (enum mapistore_error) getSMTPAddrType: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
*data = [@"SMTP" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
|
||||
+30
-22
@@ -32,7 +32,7 @@
|
||||
|
||||
#define DEFAULT_CHARSET 1
|
||||
#define FONTNAME_LEN_MAX 100
|
||||
#define UTF8_FIRST_BYTE_LAST_CODEPOINT 0x7F
|
||||
|
||||
//
|
||||
// Charset definitions. See http://msdn.microsoft.com/en-us/goglobal/bb964654 for all details.
|
||||
//
|
||||
@@ -608,7 +608,6 @@ static void _init_fontCws_table()
|
||||
word and is not part of the control word. */
|
||||
|
||||
end = _bytes;
|
||||
|
||||
*len = end-start-1;
|
||||
|
||||
return start+1;
|
||||
@@ -1215,7 +1214,6 @@ inline static void parseUl(RTFHandler *self, BOOL hasArg, int arg, RTFFormatting
|
||||
unsigned char c;
|
||||
NSData *d;
|
||||
NSString *s;
|
||||
unichar uch;
|
||||
|
||||
stack = [[RTFStack alloc] init];
|
||||
fontTable = nil;
|
||||
@@ -1223,7 +1221,7 @@ inline static void parseUl(RTFHandler *self, BOOL hasArg, int arg, RTFFormatting
|
||||
defaultCharset = ansicpg1252;
|
||||
formattingOptions = nil;
|
||||
|
||||
_html = [[NSMutableData alloc] init];
|
||||
_html = [[[NSMutableData alloc] init] autorelease];
|
||||
[_html appendBytes: "<html><meta charset='utf-8'><body>" length: 34];
|
||||
|
||||
|
||||
@@ -1251,10 +1249,10 @@ inline static void parseUl(RTFHandler *self, BOOL hasArg, int arg, RTFFormatting
|
||||
{
|
||||
// A hexadecimal value, based on the specified character set (may be used to identify 8-bit values).
|
||||
const char *b1, *b2;
|
||||
unsigned short index;
|
||||
short index;
|
||||
short tmp;
|
||||
|
||||
const unsigned short * active_charset;
|
||||
|
||||
if (formattingOptions && formattingOptions->charset)
|
||||
active_charset = formattingOptions->charset;
|
||||
else
|
||||
@@ -1267,8 +1265,21 @@ inline static void parseUl(RTFHandler *self, BOOL hasArg, int arg, RTFFormatting
|
||||
b1 = ADVANCE;
|
||||
b2 = ADVANCE;
|
||||
|
||||
index = (isdigit(*b1) ? *b1 - 48 : toupper(*b1) - 55) * 16;
|
||||
index += (isdigit(*b2) ? *b2 - 48 : toupper(*b2) - 55);
|
||||
tmp = (isdigit(*b1) ? *b1 - 48 : toupper(*b1) - 55);
|
||||
if (tmp < 0 || tmp > 16)
|
||||
{
|
||||
// Incorrect first hexadecimal character. Skipping.
|
||||
continue;
|
||||
}
|
||||
index = tmp*16;
|
||||
|
||||
tmp = (isdigit(*b2) ? *b2 - 48 : toupper(*b2) - 55);
|
||||
if (tmp < 0 || tmp > 16)
|
||||
{
|
||||
// Incorrect second hexadecimal character. Skipping.
|
||||
continue;
|
||||
}
|
||||
index += tmp;
|
||||
|
||||
s = [NSString stringWithCharacters: &(active_charset[index]) length: 1];
|
||||
d = [s dataUsingEncoding: NSUTF8StringEncoding];
|
||||
@@ -1437,20 +1448,17 @@ inline static void parseUl(RTFHandler *self, BOOL hasArg, int arg, RTFFormatting
|
||||
{
|
||||
c = *_bytes;
|
||||
// We avoid appending NULL bytes or endlines
|
||||
if (c && (c != '\n'))
|
||||
if (c && (c != '\n') && (c != '\r'))
|
||||
{
|
||||
if (c <= UTF8_FIRST_BYTE_LAST_CODEPOINT)
|
||||
{
|
||||
// in this case utf8 and ascii encoding are the same
|
||||
[_html appendBytes: &c length: 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
uch = c;
|
||||
s = [NSString stringWithCharacters: &uch length: 1];
|
||||
d = [s dataUsingEncoding: NSUTF8StringEncoding];
|
||||
[_html appendData: d];
|
||||
}
|
||||
const unsigned short * active_charset;
|
||||
if (formattingOptions && formattingOptions->charset)
|
||||
active_charset = formattingOptions->charset;
|
||||
else
|
||||
active_charset = defaultCharset;
|
||||
|
||||
s = [NSString stringWithCharacters: &(active_charset[c]) length: 1];
|
||||
d = [s dataUsingEncoding: NSUTF8StringEncoding];
|
||||
[_html appendData: d];
|
||||
}
|
||||
ADVANCE;
|
||||
}
|
||||
@@ -1459,7 +1467,7 @@ inline static void parseUl(RTFHandler *self, BOOL hasArg, int arg, RTFFormatting
|
||||
[_html appendBytes: "</body></html>" length: 14];
|
||||
|
||||
[stack release];
|
||||
return [_html autorelease];
|
||||
return _html;
|
||||
}
|
||||
|
||||
/* This method is for ease of testing and should not be used in normal operations */
|
||||
|
||||
Loaded 100 of 1129 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user