Compare commits

...
388 Commits
Author SHA1 Message Date
Ludovic Marcotte 329552030b Merge to 2.2.8 2014-09-10 14:17:14 -04:00
Ludovic Marcotte 38cb86bdb1 Update ChangeLog 2014-09-10 14:15:34 -04:00
Alexandre Cloutier 69c8aa0743 quickfix for IE for searchInbox 2014-09-10 13:22:36 -04:00
Alexandre Cloutier 60e3c1c822 Merge branch 'master' of https://github.com/inverse-inc/sogo 2014-09-10 13:02:45 -04:00
Alexandre Cloutier 36b833ccb5 bugFix InboxSearch IMAP query keywords 2014-09-10 13:02:13 -04:00
Francis Lachapelle 9d6bcb00bc Fix compilation warning 2014-09-10 11:58:47 -04:00
Francis Lachapelle 1dd3dbacb5 Various fixes and improvements to the Mail module 2014-09-10 11:37:52 -04:00
Francis Lachapelle c441fa5b80 Various fix and improvements to Scheduler module 2014-09-10 10:58:58 -04:00
Francis Lachapelle 7e297ad56c Remove spaces 2014-09-10 10:58:46 -04:00
Francis Lachapelle 8eb4212f5d Various fix and improvements to Mail module 2014-09-10 10:49:54 -04:00
Luc Charland 3ad9327d17 putting test-prevent-invitations back in 2014-09-10 10:25:42 -04:00
Ludovic Marcotte 0483794f45 Updated the documentation for the release 2014-09-10 09:20:47 -04:00
Alexandre Cloutier 3c1d6d7d89 bugfix; UserSettings was not refresh properly after toggling threads 2014-09-09 16:05:12 -04:00
Francis Lachapelle 1dcf631ad6 Update translations 2014-09-09 15:50:39 -04:00
Ludovic Marcotte cbc53b3a52 Updated NEWS file 2014-09-09 15:38:15 -04:00
Alexandre Cloutier 574c245758 bugfix PreventInvitation; fix object parsing on a blank user 2014-09-09 15:36:14 -04:00
Alexandre Cloutier f3ca4ea7fc bugfix foldingThread; Renaming a foldername with a space was not correctly handled 2014-09-09 15:36:14 -04:00
Ludovic Marcotte e542ff5646 Fix for bug #1240 2014-09-09 15:15:56 -04:00
Francis Lachapelle bbe1e09ab9 Merge pull request #52 from alexcloutier/feature/RefreshViewCheck
All modules can now be automatically refreshed
2014-09-09 15:12:21 -04:00
Alexandre Cloutier 9daab5a9a1 update NEWS file 2014-09-09 14:28:05 -04:00
Alexandre Cloutier 1fb3198dbc applied comments 2014-09-09 14:27:05 -04:00
Alexandre Cloutier d62c504763 Changed the configurable variable SOGoMailMessageCheck to a general refresh associated to the current view 2014-09-09 14:27:05 -04:00
extrafu 126a05d391 Merge pull request #54 from alexcloutier/feature/FoldingThreads
Feature/folding threads
2014-09-09 14:06:30 -04:00
extrafu 42ffe14052 Merge pull request #55 from alexcloutier/bugfix/LabelsTagging
Bugfix/labels tagging
2014-09-09 14:06:19 -04:00
Alexandre Cloutier 7db526a5d9 bugfix for new user without userSettings.mail 2014-09-09 13:51:02 -04:00
Alexandre Cloutier 06f81a032c applied comments 2014-09-09 13:51:02 -04:00
Alexandre Cloutier df42c31618 Update NEWS file 2014-09-09 13:51:02 -04:00
Alexandre Cloutier e6002c9b2a applied comments 2014-09-09 13:51:02 -04:00
Alexandre Cloutier 0c88edc61b bugfix where an exception was raised if threadsCollapsed is undefined 2014-09-09 13:51:02 -04:00
Alexandre Cloutier 267a689683 Applied comments 2014-09-09 13:51:02 -04:00
Alexandre Cloutier c9d1294a8a Manage the collapse UIDs save in the user settings 2014-09-09 13:51:02 -04:00
Alexandre Cloutier 59023da7f0 applied comments and fix bug where the folded threads were saved only after refreshing the entire page 2014-09-09 13:51:02 -04:00
Alexandre Cloutier c5f9dd086b Possibility to collapsed threads with persistance 2014-09-09 13:51:02 -04:00
Alexandre Cloutier 0bfaceb398 applied comments 2014-09-09 12:51:59 -04:00
Alexandre Cloutier 9a380f711c bugfix PreventInvitation 2014-09-09 11:30:00 -04:00
Ludovic Marcotte 8c8e7d24a7 Modified Apache's config file to handle Apache > 2.3 2014-09-08 15:25:21 -04:00
Alexandre Cloutier 77c50e5232 applied comments; fix errors from merge and update NEWS file 2014-09-08 14:11:42 -04:00
Francis Lachapelle 56ef00661c Merge pull request #50 from alexcloutier/feature/SearchInbox
New feature to search multiple mailboxes
2014-09-05 16:09:59 -04:00
Francis Lachapelle b639c2d251 Fixes for IE 2014-09-05 16:04:29 -04:00
Alexandre Cloutier 984e208dd9 IE bugfixes 2014-09-05 11:01:57 -04:00
Luc Charland 606ee9780e dont test prevent invitations 2014-09-04 22:36:02 -04:00
Luc Charland c6f82dac01 catch specific exception 2014-09-04 22:24:32 -04:00
Luc Charland e37a603632 should help some builds that might timeout 2014-09-04 21:59:36 -04:00
Alexandre Cloutier ca8351d1f9 fix IE7, IE8, IE9, IE10, IE11 GUI 2014-09-04 10:50:03 -04:00
Luc Charland 031e4c9409 more of the same 2014-09-03 22:43:49 -04:00
Luc Charland c621bbcd56 Those need the same adjustments 2014-09-03 22:32:46 -04:00
Luc Charland 4b94a183be urllib.quote needs a string 2014-09-03 13:50:13 -04:00
Alexandre Cloutier 32476b16cc applied comments and fix bug when tagging msgs already tagged 2014-09-02 14:31:46 -04:00
Alexandre Cloutier 3b65eaea0b Tagging labels with 1 AJAX request 2014-09-02 13:42:04 -04:00
Alexandre Cloutier 7e26d80c77 merge conflicts 2014-09-02 10:11:27 -04:00
Francis Lachapelle 1af52e6d6b Fix message labels handling
Selecting "none" from the label submenu on a multiple selection of
messages is now working. When changing the label of multiple messages,
the display is now properly updated.

Fixes #2902
2014-08-29 15:39:06 -04:00
Alexandre Cloutier eaf815eae6 update NEWS file 2014-08-29 14:55:21 -04:00
Alexandre Cloutier 9bd09cc55d add the location column 2014-08-28 13:20:43 -04:00
Luc Charland ced0962894 Added white_listed_attendee to the config file 2014-08-28 10:43:32 -04:00
Francis Lachapelle dadad3df2a Fix some compilation warnings 2014-08-28 09:38:09 -04:00
Alexandre Cloutier da184f8459 bugfix#2864 2014-08-27 16:50:45 -04:00
Alexandre Cloutier 03152ea3d4 bugfix with DND from calendar view to calendar list 2014-08-27 16:01:35 -04:00
Alexandre Cloutier 8fbd2384a4 Merge branch 'master' of https://github.com/inverse-inc/sogo 2014-08-27 13:55:02 -04:00
Alexandre Cloutier 84a08659ec bugfix where it is not possible to delete msg when mailbox is full 2014-08-27 13:50:56 -04:00
Luc Charland d749d5c2fb Added tests for prevent invitation and whitelist 2014-08-27 13:31:49 -04:00
Alexandre Cloutier 07a138e0d6 applied comments and add the possibility to resize the search inbox window 2014-08-27 12:30:33 -04:00
Alexandre Cloutier 76c9b45fd0 update Localizable.strings
Update the print window options strings
2014-08-26 14:25:27 -04:00
Alexandre Cloutier 1ab3a588f3 Merge branch 'master' of https://github.com/inverse-inc/sogo 2014-08-26 13:41:58 -04:00
Alexandre Cloutier 38a3b7bb4f print calendars events&Tasks with colors - either borders or backgrounds 2014-08-26 13:36:42 -04:00
Francis Lachapelle b2b77c65d3 Fix folders paths of "sogo-tool restore -l" 2014-08-26 09:00:13 -04:00
Alexandre Cloutier 6aecccf6ca indentations 2014-08-25 13:46:35 -04:00
Francis Lachapelle e4a84d4920 Fix usage of SOGoSubscriptionFolderFormat default 2014-08-25 12:15:05 -04:00
Francis Lachapelle 28f26ec08e Fix display of users with no possible subscription 2014-08-25 10:16:10 -04:00
Francis Lachapelle 74bd96e5a6 Fix encoding of new calendars + new subscriptions 2014-08-25 10:12:09 -04:00
Alexandre Cloutier e044476772 bugFix #2827 2014-08-15 13:41:30 -04:00
Alexandre Cloutier c76cb36461 Disable the search button on toolbar once it is opened 2014-08-15 13:06:46 -04:00
Alexandre Cloutier 73fcdc2306 adjust css for other browser, fix display bug 2014-08-15 11:41:37 -04:00
Ludovic Marcotte b9dd1ddc5a Fix for bug #2892 2014-08-15 09:57:19 -04:00
Alexandre Cloutier 8783f09a4a fix leak 2014-08-14 15:01:40 -04:00
Alexandre Cloutier 52476251b8 applied comments, fix bug and add sortable results 2014-08-14 14:49:44 -04:00
Alexandre Cloutier f6c7ca3379 applied comments 2014-08-13 17:41:58 -04:00
Alexandre Cloutier c3e46e4baf code refactoring and GUI improvement 2014-08-11 09:25:09 -04:00
Alexandre Cloutier 7794d716b9 version 1 of the inbox search 2014-08-06 14:49:36 -04:00
Francis Lachapelle 5b886e5c4d Fix issue with DnD of tasks with FireFox 2014-08-01 12:26:53 -04:00
Ludovic Marcotte cde1db9324 Refactored GCSFolder: -writeContent and fixed sogo-tool restore 2014-08-01 09:40:45 -04:00
Ludovic Marcotte f43341c100 Fixed JSON'ification of the admin module 2014-07-31 16:19:49 -04:00
Ludovic Marcotte b05fcc7d82 Fat commit to refactor the quick record generation 2014-07-30 14:51:00 -04:00
Francis Lachapelle 07324e56a0 Update ChangeLog 2014-07-30 11:16:35 -04:00
Francis Lachapelle 397a36cc89 Preparation for release 2.2.7 2014-07-30 11:16:10 -04:00
Francis Lachapelle c240931c54 Update CKEditor to version 4.4.3 2014-07-30 11:15:05 -04:00
Francis Lachapelle ef2432e10f Update NEWS file 2014-07-30 10:36:31 -04:00
Francis Lachapelle 571322958a Update fi, fr, de, and es_ES translations 2014-07-30 10:33:15 -04:00
Francis Lachapelle bd5c05cca2 Indentation in JavaScript files 2014-07-30 10:31:25 -04:00
Francis Lachapelle ea44308aa3 Fix all-day events display in IE
It also fixes the display of the event categories for all-day events in
IE.
2014-07-29 16:05:46 -04:00
Ludovic Marcotte 94f3246658 Improved error message when you cannot invite users 2014-07-29 10:36:20 -04:00
Ludovic Marcotte 1df7e989e0 Removed worthless declaration 2014-07-25 14:48:25 -04:00
Francis Lachapelle d9ca1051b3 Improve headers of multicolumns view 2014-07-25 11:34:33 -04:00
Ludovic Marcotte 4eefa4c269 Fixed test since we now return a 200 instead of a 204 2014-07-25 08:12:12 -04:00
Ludovic Marcotte 4c21a050d9 JSON interface to folder subscriptions 2014-07-24 14:00:57 -04:00
Alexandre Cloutier b52289904f task.png for DnD taskList 2014-07-24 13:48:41 -04:00
Alexandre Cloutier d5b71526ed Merge branch 'master' of https://github.com/inverse-inc/sogo 2014-07-24 13:44:02 -04:00
Alexandre Cloutier c389630d76 DnD tasksList 2014-07-24 13:35:14 -04:00
Ludovic Marcotte f6ef94a631 improved handling of SOGoSubscriptionFolderFormat 2014-07-24 12:48:03 -04:00
Francis Lachapelle 5de51e8aa1 Fix missing argument with new DnD controller 2014-07-24 09:30:19 -04:00
Ludovic Marcotte 006727a74b Properly destroy cache objects of vanished folders 2014-07-24 08:39:41 -04:00
extrafu 037dd67635 Merge pull request #47 from dekkers/mailpartviewers-requires
Add Mailer and Appointments to product.list requires of MailPartViewers
2014-07-22 14:00:35 -04:00
Jeroen Dekkers 6619840f80 Add Mailer and Appointments to product.list requires of MailPartViewers 2014-07-22 19:54:18 +02:00
Francis Lachapelle 08fd2fcfaa Fix JavaScript after bad merge 2014-07-22 13:26:28 -04:00
Alexandre Cloutier a43dd97fc9 Fix bug with DnD; leftPanelController.stopEvent() 2014-07-22 11:37:45 -04:00
Francis Lachapelle 192659fdd9 Add missing localizable string 2014-07-21 16:12:27 -04:00
Francis Lachapelle 06fe36fd75 Add missing localizable strings 2014-07-21 16:07:13 -04:00
Francis Lachapelle 24f9d83ff7 Fix JavaScript from merge leftover 2014-07-21 16:06:24 -04:00
Ludovic Marcotte 8dd967d0a8 Updated NEWS file for two merged pull requests 2014-07-21 15:38:23 -04:00
Ludovic Marcotte 08cd080d47 Fixed charset substitution in meta tags 2014-07-21 15:34:56 -04:00
Francis Lachapelle 11920f592c Merge pull request #46 from alexcloutier/feature/DragNDropCalendars
Improve drag'n'drop of events in multi-column view
2014-07-21 11:00:27 -04:00
Alexandre Cloutier 28e6bb8b9d Applied comments 2014-07-21 09:52:09 -04:00
Alexandre Cloutier b892b3f794 Add RegEx 2014-07-21 09:52:09 -04:00
Alexandre Cloutier cdf4cc1acb fix DnD from eventList to calendarList for repeated event 2014-07-21 09:52:08 -04:00
Alexandre Cloutier 3cac794de5 move line 2014-07-21 09:52:08 -04:00
Alexandre Cloutier 8f9b24a23f visual helper while dragging from calendar view to calendarList 2014-07-21 09:52:08 -04:00
Alexandre Cloutier a2a7014140 fix dnd repeated event bug + applied comments 2014-07-21 09:52:08 -04:00
Alexandre Cloutier a5ecb2063f added event7.png and adjust javascript indentation 2014-07-21 09:52:08 -04:00
Alexandre Cloutier 9bd7aeebfb DnD from calendarView to CalendarList 2014-07-21 09:40:04 -04:00
Alexandre Cloutier 01af72cfe9 DnD from eventList to the calendarList 2014-07-21 09:40:04 -04:00
Alexandre Cloutier 6dddb5c98c dragNdrop from the events table to the calendars list 2014-07-21 09:40:04 -04:00
Alexandre Cloutier ccf181bcf9 applied comments and fix repeated events dragNdrop between calendars 2014-07-21 09:40:04 -04:00
Alexandre Cloutier e478b29c2e creating and dragNDrop between calendars in multicolumndayview 2014-07-21 09:40:04 -04:00
Francis Lachapelle f3ded6ce2a Merge pull request #45 from alexcloutier/feature/PreventInvitations
New user preference to prevent invitations
2014-07-21 09:38:42 -04:00
Alexandre Cloutier c2027f072d indentation 2014-07-21 09:29:00 -04:00
Alexandre Cloutier ce6a31dd38 Adjust line of code to make it easier to read 2014-07-21 09:27:02 -04:00
Alexandre Cloutier a71013eebf javascript indentation 2014-07-21 09:27:02 -04:00
Alexandre Cloutier eaec5a614d Change exception 403 to 409 and fix indentation in the javascript 2014-07-21 09:27:02 -04:00
Alexandre Cloutier 5217bed5ae Organized the categories and appointments invitations inside a tabContainer 2014-07-21 09:27:02 -04:00
Alexandre Cloutier 17319cc8dd reverted UIxListEditor.wox 2014-07-21 09:27:02 -04:00
Alexandre Cloutier 89d116363c replace ampersands with commas 2014-07-21 09:27:02 -04:00
Alexandre Cloutier 7c3e85f517 applied comments 2014-07-21 09:27:02 -04:00
Alexandre Cloutier 05fb7ae0c8 applied comments 2014-07-21 09:27:02 -04:00
Alexandre Cloutier ef20108e32 fix bug where the user could enter any names in the whitelist 2014-07-21 09:27:02 -04:00
Alexandre Cloutier b5c0363400 applied comment and refactor code 2014-07-21 09:27:02 -04:00
Alexandre Cloutier f0b8eb8dfb server side code to integrate the whitelist 2014-07-21 09:27:02 -04:00
Alexandre Cloutier 16d02455bd Serialization of the whiteList 2014-07-21 09:27:02 -04:00
Alexandre Cloutier 8ded5a8aaf Prevent Invitations and whitelist GUI 2014-07-21 09:27:02 -04:00
Ludovic Marcotte 1cc93c700a Updated NEWS file for changes occurred right after v2.2.6 was released 2014-07-09 14:08:31 -04:00
Francis Lachapelle 44d0cb5c0d Fix refresh of list when forwarding a message
Fixes #2818
2014-07-09 11:19:35 -04:00
Ludovic Marcotte dbdb7d9051 Fix sending of METHOD:REPLY for DAV clients 2014-07-09 10:04:44 -04:00
Francis Lachapelle e343ed240b Fix regression of word breaking
Fixes #2845
2014-07-08 22:01:41 -04:00
Francis Lachapelle 45553be122 Fix rename of calendars, improve tasks count badge 2014-07-08 17:19:55 -04:00
Alexandre Cloutier 1cf4841477 fix display glitch 2014-07-04 11:23:59 -04:00
Alexandre Cloutier 017a85b7f2 fix month events categories display 2014-07-04 10:46:49 -04:00
Alexandre Cloutier 103bb6803a Merge branch 'master' of https://github.com/inverse-inc/sogo 2014-07-04 10:38:24 -04:00
Alexandre Cloutier 8c8e47daf6 fix spacing between events and categorie display 2014-07-04 10:37:35 -04:00
Ludovic Marcotte 8a17246725 Cleaned up code and fixed the translation of the weekdays in the datepicker 2014-07-04 10:18:56 -04:00
Ludovic Marcotte 4843c6b6d7 Renamed Multi-Column to Multicolumn and refactored some code 2014-07-04 08:55:35 -04:00
Ludovic Marcotte 04904d8c61 Merge to 2.2.6 2014-07-02 11:41:46 -04:00
Ludovic Marcotte 6e13f15477 Update ChangeLog 2014-07-02 11:32:18 -04:00
Ludovic Marcotte 5dd2088d42 Updated for the release 2014-07-02 11:32:06 -04:00
Ludovic Marcotte 9c3c2cb926 Updated the doc for the release 2014-07-02 11:23:57 -04:00
Ludovic Marcotte 55422b5f03 Fixed typo 2014-07-02 10:11:13 -04:00
Ludovic Marcotte 899a1eb026 Updated NEWS file 2014-07-02 08:39:01 -04:00
Alexandre Cloutier 660f39a980 delete notice and put grey background for multi-columns view 2014-06-30 14:13:52 -04:00
Alexandre Cloutier 8335c38830 fix infinite loop bug 2014-06-30 13:57:10 -04:00
Alexandre Cloutier 0fb7135335 bugfixes 2014-06-30 13:36:12 -04:00
extrafu 70b0cb78cd Merge pull request #44 from alexcloutier/fix/DailyViewByCalendars
Fix/daily view by calendars
2014-06-30 11:01:06 -04:00
Alexandre Cloutier d197ab71b7 merging conflicts 2014-06-30 10:55:55 -04:00
Alexandre Cloutier 6b58e034f3 printView display the parentView by default 2014-06-30 10:42:07 -04:00
Ludovic Marcotte ff015afde8 Fixed indent 2014-06-30 10:35:55 -04:00
Ludovic Marcotte 6da03bc75c Cleaned up code for older gcc 2014-06-28 08:31:07 -04:00
Alexandre Cloutier 2b119c63e0 Applied comments 2014-06-27 17:21:18 -04:00
Alexandre Cloutier 5b61df8ca4 activeTasks updates dynamically 2014-06-27 17:00:32 -04:00
Alexandre Cloutier 659e2f3aa8 Merge branch 'master' of https://github.com/inverse-inc/sogo 2014-06-27 10:30:10 -04:00
extrafu 8191576361 Merge pull request #41 from alexcloutier/fix/displayTaskNumber
Display the number of active tasks in calendar view
2014-06-27 09:07:07 -04:00
Alexandre Cloutier 5b9c7e07d1 text wraping and text alignment in list view 2014-06-26 21:22:12 -04:00
Alexandre Cloutier cafb896e8c Merge branch 'fix/displayTaskNumber' of https://github.com/alexcloutier/SOGo into fix/displayTaskNumber 2014-06-26 16:43:10 -04:00
Alexandre Cloutier 7a69bc46eb applied comments 2014-06-26 16:42:05 -04:00
Alexandre Cloutier 302e40a1c3 bugFix#2823 2014-06-26 16:08:47 -04:00
Ludovic Marcotte b6be4e6e2f Applied patch from bug #2810 2014-06-26 11:01:16 -04:00
Alexandre Cloutier dabd8d3282 Fix list view printing with multiColumns view 2014-06-26 10:05:48 -04:00
Alexandre Cloutier d7d458a934 multiColumns print view + bugFixes 2014-06-25 17:39:48 -04:00
Ludovic Marcotte 5419f411e5 Fix for bug #2734 2014-06-25 15:05:25 -04:00
Ludovic Marcotte 22f5ed62fe Fixed tests regarding default permissions on CalDAV collections 2014-06-25 10:14:28 -04:00
Ludovic Marcotte 3523dc489f Fix for bug #2825 2014-06-23 12:19:02 -04:00
Alexandre Cloutier 5b3de04fc1 Fix error from the last commit 2014-06-20 13:27:04 -04:00
Alexandre Cloutier eb3cc8916d The multiColumns view 2014-06-20 13:16:55 -04:00
Ludovic Marcotte 9fa0b42e19 Ignore SCHEDULE-AGENT for Thunderbird/Lightning 2014-06-20 11:25:02 -04:00
Ludovic Marcotte e048346cb7 Include, in our private NS, all ACLs defined on a calendar collectiob 2014-06-19 16:08:15 -04:00
Ludovic Marcotte 333b561a59 Applied patch from bug #2736 2014-06-16 15:30:26 -04:00
Ludovic Marcotte 50c0b49a6f Fix for bug #2813 2014-06-16 11:00:39 -04:00
Francis Lachapelle 8202d0588f Add documentation for SOGoSubscriptionFolderFormat
Fixes #2799
2014-06-16 10:20:34 -04:00
Francis Lachapelle d9b578b869 Wait 20 seconds before deleting temporary forms
Those temporary forms are created to download attachments.
Fixes #2811
2014-06-16 09:52:29 -04:00
Francis Lachapelle 5bb64916c6 Fix regression when attaching files to a reply 2014-06-12 09:09:08 -04:00
Ludovic Marcotte e7ddfb0546 Fix for bug #2805 2014-06-11 12:55:51 -04:00
Alexandre Cloutier 0e182f8436 Update SOGoAppointmentFolder.m
Fix the status filtering from 2 to 1
2014-06-11 11:25:17 -04:00
Alexandre Cloutier de2ee2322a Change the NSString with NSNumber and add some JavaScript 2014-06-11 10:24:04 -04:00
Ludovic Marcotte ce07695a55 Make sure to keep the / path prefix 2014-06-10 16:35:36 -04:00
Alexandre Cloutier 43ac57b671 display the number of active tasks in calendar view 2014-06-10 16:18:12 -04:00
Francis Lachapelle 7f7e3cb06a Fix folder name of new subscriptions
Fixes #2801
2014-06-10 14:48:25 -04:00
Francis Lachapelle 6b3a3f858b Update prototype.js to version 1.7.2 2014-06-10 14:32:35 -04:00
Ludovic Marcotte 0133bb3b6b Correctly update the cache on folder update/delete ops. 2014-06-10 13:07:14 -04:00
Ludovic Marcotte 91e3e19e40 Added the Ping ActiveSync command 2014-06-10 11:04:27 -04:00
Ludovic Marcotte 19a95a1818 Applied fix from #2809 2014-06-10 08:58:44 -04:00
Ludovic Marcotte 1292c191ec Make sure we don't have '-' in table names. 2014-06-10 08:46:35 -04:00
Ludovic Marcotte 77dad178d1 Make sure we don't have '-' in table names. 2014-06-10 08:45:35 -04:00
Ludovic Marcotte f48839bf55 Added (slightly modified) patch from #2806 2014-06-09 09:34:00 -04:00
Ludovic Marcotte 0f04be2bcb Added patch from #2808 2014-06-09 09:25:06 -04:00
Ludovic Marcotte 3f8bbe8c60 Applied patch from #2807 2014-06-09 09:14:30 -04:00
Francis Lachapelle f0b4a05c70 Merge to 2.2.5 2014-06-05 13:35:45 -04:00
Francis Lachapelle 6b6ec8a2ae Update ChangeLog 2014-06-05 13:35:17 -04:00
Francis Lachapelle ad30df26af Preparation for release 2.2.5 2014-06-05 13:34:40 -04:00
Francis Lachapelle 6e56f46f86 Update Dutch, Finnish, German, Polish translations 2014-06-05 13:29:10 -04:00
Francis Lachapelle fe38518a36 Minor syntax and comments improvements 2014-06-05 12:14:34 -04:00
Francis Lachapelle e118a72eab Add meta tag to tell IE to use the highest mode 2014-06-05 10:32:13 -04:00
Ludovic Marcotte 72bec939d6 Fixed text/plain reencoding issues for Outlook 2014-06-04 15:56:22 -04:00
Ludovic Marcotte ba258ca806 Fixed repetitive events issues 2014-06-04 15:23:41 -04:00
Ludovic Marcotte 0c2e2f28f7 Don't try to add attachments during reply operations 2014-05-30 13:53:20 -04:00
Ludovic Marcotte f0dfe37a55 Avoid crashing when forwarding mails with no Subject header 2014-05-30 08:41:42 -04:00
Francis Lachapelle 95d6911f1a Merge to 2.2.4 2014-05-29 11:17:46 -04:00
Francis Lachapelle dace1439df Update ChangeLog 2014-05-29 11:16:59 -04:00
Francis Lachapelle d91b37413f Preparation for release 2.2.4 2014-05-29 11:16:40 -04:00
Francis Lachapelle bd916f06eb Update ChangeLog 2014-05-29 11:15:13 -04:00
Francis Lachapelle ecbe0858f7 Update translations 2014-05-29 11:14:23 -04:00
Francis Lachapelle 24095a464c Update CKEditor to version 4.4.1 2014-05-29 10:50:48 -04:00
Francis Lachapelle 9ce3b8ff8f Merge pull request #40 from dekkers/fix-unit-test
Fix unit test with gnustep 1.24
2014-05-29 10:32:30 -04:00
Jeroen Dekkers efc33d8174 Fix unit test by also checking for the different gnustep 1.24 ordering of elements 2014-05-29 15:53:13 +02:00
Jeroen Dekkers 93971dc434 Add $(TEST_TOOL) as dependency of make check 2014-05-29 15:35:46 +02:00
Francis Lachapelle fac9520f64 Fix update of participation status via CalDAV
Fixes #2786
2014-05-28 11:39:25 -04:00
Francis Lachapelle 9eb075cc3f Rename "Archive" to "Export" in Webmail
Fixes #2758
2014-05-28 11:24:10 -04:00
Francis Lachapelle c5922b07aa Restore options when editing a draft
Fixes #193
2014-05-28 11:21:11 -04:00
Ludovic Marcotte 51e07fc306 Fix over previous commit 2014-05-27 15:33:39 -04:00
Ludovic Marcotte d35c52bb38 Fix for bug #2688 2014-05-27 14:44:57 -04:00
Ludovic Marcotte 6bab4c94f2 Added an empty stub for the Provision command 2014-05-27 09:42:02 -04:00
Ludovic Marcotte c31429a5d5 Also include the BS character in non-safe ones. 2014-05-27 08:45:00 -04:00
Ludovic Marcotte 04bb88a470 Updated NEWS file regarding pull request #39 2014-05-26 13:25:39 -04:00
extrafu c79cd750d8 Merge pull request #39 from alexcloutier/fix/publicFolder_ConfigNaming
Added new SOGo configurable variable
2014-05-26 13:24:50 -04:00
Ludovic Marcotte 6fc81e61ec Fixed documentation: NGImap4ConnectionGroupPrefix -> NGImap4ConnectionGroupIdPrefix 2014-05-23 11:30:28 -04:00
Francis Lachapelle d9ad286650 Fix newline in signature of attachment
Fixes #2787
2014-05-23 11:23:02 -04:00
Alexandre Cloutier dd57d56cf9 remove crufts and applies comments 2014-05-23 10:15:21 -04:00
Ludovic Marcotte ab7780d617 Prevent a crash when someone tries to access /SOGo/Microsoft-Server-ActiveSync directly 2014-05-22 14:39:58 -04:00
Ludovic Marcotte cb9332f240 Updated NEWS file regarding #2775 2014-05-22 10:26:58 -04:00
Ludovic Marcotte 7b60ad4797 Added patch from #2775 2014-05-22 09:20:05 -04:00
Alexandre Cloutier 3261c21549 fix case where the displayed name for the subscribed folders is duplicated 2014-05-21 14:26:08 -04:00
Francis Lachapelle 364b409501 FIx mail templates for Brazilian Portuguese
Fixes #2738
2014-05-21 08:44:35 -04:00
Alexandre Cloutier 064565e1a9 Added new SOGo configurable variable for which you can change the default display when adding a shared calendar or a shared addressBook 2014-05-20 17:05:13 -04:00
Alexandre Cloutier f92d280fbb remove unneeded condition to fix navigation in print preview 2014-05-20 11:24:27 -04:00
Francis Lachapelle ea2bce706c Update NEWS file 2014-05-16 21:15:38 -04:00
Francis Lachapelle d74afaf295 Update French translation 2014-05-16 21:15:28 -04:00
Francis Lachapelle 5e7beb3345 Remove unused localizable strings 2014-05-16 21:14:59 -04:00
Francis Lachapelle 2df5887eec Merge pull request #36 from alexcloutier/feat/calendarPrint
New print option in Calendar module
2014-05-16 16:56:51 -04:00
Francis Lachapelle 3d1bdf1a09 Update French translation 2014-05-16 16:52:44 -04:00
Francis Lachapelle 5de1343506 Remove unused localizable string 2014-05-16 16:44:25 -04:00
Francis Lachapelle 1eaa3f3891 Update NEWS file 2014-05-16 16:34:17 -04:00
Francis Lachapelle c2d3a827bd Merge branch 'alexcloutier-feat/searchCapabilities' 2014-05-16 16:30:24 -04:00
Francis Lachapelle 6b72a8d126 Merge branch 'feat/searchCapabilities' 2014-05-16 16:28:43 -04:00
Francis Lachapelle 819d0641b7 Remove common localizable strings from UI/Contacts 2014-05-16 16:19:40 -04:00
Francis Lachapelle 5d7f4ba6c6 Restore localizable string
To avoid new translation ..
2014-05-16 15:59:52 -04:00
Francis Lachapelle 34a7e28858 Rename 'Properties' button of contacts to 'Edit' 2014-05-16 15:58:34 -04:00
Francis Lachapelle 87b010c700 Indentation 2014-05-16 15:57:33 -04:00
Francis Lachapelle a44b183b7e Merge pull request #38 from alexcloutier/fix/link_address
New AddressBook properties popup window
2014-05-16 15:33:23 -04:00
Alexandre Cloutier b488721f83 Reverse loop to make sure no objects is skipped 2014-05-16 15:00:47 -04:00
Alexandre Cloutier 8a03f3bd63 remove start date in tasks 2014-05-16 14:36:51 -04:00
Alexandre Cloutier f8c8abc989 Function isPublicAccessEnabled was missing 2014-05-16 13:50:52 -04:00
Alexandre Cloutier db8d9bb16c Repair broken logic 2014-05-16 11:29:37 -04:00
Alexandre Cloutier 2794425a3f added last changes from cgx 2014-05-16 10:04:37 -04:00
Ludovic Marcotte 2f7979c796 Fix for bug #2709 2014-05-16 08:33:06 -04:00
Ludovic Marcotte c426afd7f2 New cache subsystem for ActiveSync. 2014-05-15 15:03:24 -04:00
Alexandre Cloutier 07445eb069 Created a window for address book properties and add the cardDav URL 2014-05-15 14:45:53 -04:00
Ludovic Marcotte 93bf98c326 Fixed copyright 2014-05-15 14:45:32 -04:00
Ludovic Marcotte c08c3e27d5 Improved modseq code 2014-05-15 14:44:53 -04:00
Ludovic Marcotte c8860dc92b Dropped old user-settings for ActiveSync 2014-05-15 14:32:46 -04:00
Ludovic Marcotte 1a1543a380 Updated script to reflect new table names 2014-05-15 14:29:39 -04:00
Ludovic Marcotte d2d5467317 Removed unused fluff in the file. 2014-05-14 10:51:16 -04:00
Ludovic Marcotte 18443de9bf Updated copyright info 2014-05-14 09:58:05 -04:00
Ludovic Marcotte be72456a9a Renamed folder cache creation method 2014-05-14 09:56:10 -04:00
Ludovic Marcotte a54b3e4289 Renamed the default table name from socfs_ to sogo_cache_folder_ 2014-05-14 08:56:35 -04:00
Ludovic Marcotte 7a4feae8b8 Updated code to reflect cache regorg. 2014-05-14 06:56:05 -04:00
Ludovic Marcotte 99d49b9bd9 Updated code to use the category 2014-05-13 21:14:57 -04:00
Ludovic Marcotte 5f9fb4e1c4 Big refactor for new caching mechanism. 2014-05-13 21:06:59 -04:00
Ludovic Marcotte ef2188962a Renamed cache files for generalization.
The upcoming commit will rename the content.
2014-05-13 19:58:19 -04:00
Ludovic Marcotte 2922f15ca7 More rename 2014-05-13 18:03:37 -04:00
Ludovic Marcotte 41e6fb89d3 Renamed constants in preparation for the big cache cleanup 2014-05-13 17:54:02 -04:00
Ludovic Marcotte c4a3843695 Removed unused configuration parameters 2014-05-13 13:52:20 -04:00
Alexandre Cloutier bf67b6435f applies comments 2014-05-13 13:21:18 -04:00
Alexandre Cloutier b5319446db display and printing modification 2014-05-13 10:36:26 -04:00
Francis Lachapelle d58184af15 Fix synchronization of seen/unseen status of msgs 2014-05-13 10:15:02 -04:00
Francis Lachapelle fbc6856fd5 Improve contextual menu in events list 2014-05-12 16:06:49 -04:00
Francis Lachapelle 5c41915080 Fix focus of popup windows with FF on Windows 2014-05-12 15:25:50 -04:00
Francis Lachapelle 698524b39f Fix synchronization of seen/unseen status of msgs
Fixes #2715
2014-05-09 17:28:02 -04:00
Ludovic Marcotte 1f5a2a4c62 Fixed IMAP copy/move op between subfolder in different accounts 2014-05-09 15:40:57 -04:00
Alexandre Cloutier fc3cfa5484 applied comments 2014-05-08 19:14:39 -04:00
Alexandre Cloutier 593b44ed01 forgotten code 2014-05-08 17:53:20 -04:00
Alexandre Cloutier b2ed7e3f6b search capabilites 2014-05-08 17:17:05 -04:00
Ludovic Marcotte bc2b41f383 Fixed unit test. 2014-05-08 09:13:37 -04:00
Ludovic Marcotte 7d7961ffcf Fix for bug #2492 2014-05-02 13:35:21 -04:00
Francis Lachapelle 0b9afec635 Fix saving preferences with no Sieve requirements
Fixes #2746
2014-05-01 14:07:25 -04:00
Francis Lachapelle 4e42a6a689 Don't limit Sieve script to 8KB
Fixes #2745
2014-04-30 12:36:51 -04:00
Alexandre Cloutier da8febf138 Printing display appear on one page only, fix issues with browsers 2014-04-29 15:42:50 -04:00
Francis Lachapelle 8c563c2922 Fix possible exception when retrieving reminder
Fixes #2744
2014-04-29 14:26:18 -04:00
Alexandre Cloutier fa5cf55367 Update GNUmakefile 2014-04-28 15:42:17 -04:00
Alexandre Cloutier e43b704858 Update UIxCalViewPrint.js 2014-04-28 15:32:47 -04:00
Alexandre Cloutier 44a4baca7f fix the comments in the headers 2014-04-28 15:30:32 -04:00
Alexandre Cloutier 78447d81ae Code refactoring and retouch 2014-04-28 13:54:29 -04:00
Alexandre Cloutier 9dc07fccc0 It is now possible to print the calendar as a list, dayView or weekView 2014-04-25 18:04:24 -04:00
Ludovic Marcotte ba7b65cf7b Fix for bug #2733 2014-04-24 07:59:07 -04:00
Francis Lachapelle 66bfbeaac1 MailEditor: fix text conversion with HTML entities 2014-04-23 10:55:04 -04:00
Ludovic Marcotte 619cb2c0ec Fix for bug #2721 2014-04-23 09:22:20 -04:00
Alexandre Cloutier f9869d19b4 Finished the view, need to display the eventsblock 2014-04-22 17:47:29 -04:00
Alexandre Cloutier 57b747c24a Events list is done. 2014-04-17 17:33:30 -04:00
Alexandre Cloutier 8f6b0f80a7 Creation of the first version of the printing interface 2014-04-14 10:32:08 -04:00
Alexandre Cloutier cb5e6e7ef2 adding button print calendar toolbar, adding template for the print window, ajusting indentation 2014-04-14 10:32:08 -04:00
Francis Lachapelle 49363cfe36 Update datepicker to latest version
From https://github.com/eternicode/bootstrap-datepicker/
2014-04-11 21:37:55 -04:00
Francis Lachapelle c345fc2b8d Fix display of category of events
Fixes #2703
2014-04-10 12:25:42 -04:00
Francis Lachapelle d200629b01 Fix CSS in contact editor and preferences module 2014-04-10 10:05:28 -04:00
Francis Lachapelle cfc1ac6b3b Add missing localizable string 2014-04-10 10:02:51 -04:00
Ludovic Marcotte e66ceaad07 Fixed gcc warnings and added some rationale around yesterday's fix 2014-04-10 09:40:25 -04:00
Ludovic Marcotte f370ac114a Now include message/rfc822 parts as attachments when forwarding mails 2014-04-10 09:24:43 -04:00
Ludovic Marcotte 75ee6b4806 Fixed once more true/false errors 2014-04-10 08:44:44 -04:00
Ludovic Marcotte 0961fbbab3 Properly escape attendee names in case they contain HTML entities 2014-04-10 06:59:18 -04:00
Ludovic Marcotte 0d1c39ca71 Added new configuration parameter to limit the window size 2014-04-09 20:12:19 -04:00
Ludovic Marcotte 5739356f88 Fix tests to handle list-component 2014-04-09 19:27:38 -04:00
Ludovic Marcotte 33467093c1 Fix for #2695 2014-04-09 18:03:33 -04:00
Ludovic Marcotte 96ece873ca Fix for bug #2654 2014-04-09 14:49:31 -04:00
Ludovic Marcotte 8909775cf6 Fix for #2680 2014-04-09 12:19:23 -04:00
Ludovic Marcotte 0ba59de88e Fixed formatting/warnings in previous commit. 2014-04-09 11:09:13 -04:00
extrafu 4fbe937f6d Merge pull request #22 from alexcloutier/fix/1046
BugFix #1046; Whenever the sieve server is unavailable an error message will appear
2014-04-09 11:01:19 -04:00
Ludovic Marcotte ab80e87a3f Applied patches from #2700 2014-04-09 10:57:56 -04:00
Alexandre Cloutier 068eb921aa rebase and fix comments made by extrafu 2014-04-09 10:48:47 -04:00
Alexandre Cloutier 5c13fade22 Fix merge 2014-04-09 10:35:10 -04:00
Ludovic Marcotte 371e5ead08 Updated the doc in prepration for the release 2014-04-09 10:34:48 -04:00
Alexandre Cloutier c5e6ccf332 Fix function sieveClient and the way the iVar Client is handled. Change behaviour of saveMailAccounts()so sogo wont crash if the user tries to resave his preferences after a connection error. 2014-04-09 10:31:34 -04:00
Alexandre Cloutier ec9d48c3a9 Change the function name getClient to sieveClient 2014-04-09 10:29:23 -04:00
Alexandre Cloutier 877082f042 Added missing functions getClient and IsSieveServerConnected and the changes that comes with it 2014-04-09 10:24:35 -04:00
Alexandre Cloutier 342b68fd44 Erase the merging conflicts writings 2014-04-09 10:23:43 -04:00
Alexandre Cloutier e24c22e3dc BugFix #1046; Whenever the sieve server is unavailable an error message will appear. 2014-04-09 10:23:43 -04:00
Ludovic Marcotte 7997448d41 Fixed issus in previous commits 2014-04-09 06:33:02 -04:00
Ludovic Marcotte 3629670fca Fix for #2489 2014-04-08 15:35:36 -04:00
Alexandre Cloutier c250b9a6d4 Fix deleting calendar
Added a "/" inside the function: deletePersonalCalendarConfirm().
2014-04-08 15:32:13 -04:00
extrafu afa564a6a6 Merge pull request #23 from alexcloutier/fix/1636
BugFix#1636; fix the issue where the user could add any birthday for his contact.
2014-04-08 13:17:54 -04:00
Alexandre Cloutier d9b99f536c Erased strings no longer used 2014-04-08 12:48:59 -04:00
Alexandre Cloutier 5699e5e1b4 Add datepicker for contact birthday 2014-04-08 12:12:30 -04:00
Francis Lachapelle e869406081 Minor CSS improvement in mail headers 2014-04-08 11:51:47 -04:00
Ludovic Marcotte 3e221253ad Fix for feature #1496 2014-04-08 11:19:53 -04:00
Alexandre Cloutier 446ef3467a Fix typo 2014-04-08 09:14:00 -04:00
extrafu bf64076b87 Merge pull request #29 from alexcloutier/feat/1496
New feature : 1496

Don't forget to fix the typo.
2014-04-07 19:42:31 -04:00
Alexandre Cloutier c9cbcf2566 applied Morgan's law 2014-04-07 16:40:44 -04:00
extrafu 4fe0358581 Merge pull request #20 from alexcloutier/fix/2616
bugFix #0002616 : change the behavior of ApplicationBaseURL.
2014-04-07 15:44:07 -04:00
Francis Lachapelle 534e4e3d4d Fix text nodes of message with HTML entitites 2014-04-07 11:21:52 -04:00
Alexandre Cloutier 09bcd2aee2 fix code 2014-04-07 10:59:38 -04:00
extrafu 526e21e837 Merge pull request #32 from dekkers/cleanup-generated-files
Delete generated source files when running "make clean".
2014-04-06 17:34:22 -04:00
Jeroen Dekkers c80e222210 Delete generated source files when running "make clean". 2014-04-06 22:44:50 +02:00
Francis Lachapelle 6e60bbb553 Fix saved HTML content of draft uploading a file 2014-04-04 20:20:32 -04:00
Ludovic Marcotte 846212336a Make use of a local pool to avoid over-memory usage 2014-04-04 16:53:58 -04:00
Alexandre Cloutier 349f4d824a Fix function sieveClient and the way the iVar Client is handled. Change behaviour of saveMailAccounts()so sogo wont crash if the user tries to resave his preferences after a connection error. 2014-04-04 15:04:37 -04:00
Alexandre Cloutier 2f565d2ec9 fix variable name for UIxFilterEditor.js
FolderEncoding to sieveFolderEncoding
2014-04-04 14:56:14 -04:00
extrafu eb7cabac71 Merge pull request #19 from alexcloutier/fix/2622
BugFix #0002622: The server Dovecot use by default an UTF-8 and by doing...
2014-04-04 09:21:49 -04:00
Ludovic Marcotte 2ff4498983 Fixed previous commit 2014-04-04 08:44:50 -04:00
Ludovic Marcotte 3eec753b73 Slightly improved previous pull request merge. 2014-04-04 08:39:13 -04:00
extrafu 7b0ffacff0 Merge pull request #24 from alexcloutier/fix/2612
It is now possible to see the version on the general page of the preferences window
2014-04-04 08:33:39 -04:00
Alexandre Cloutier f999c87d4d added traduction in localstring french, added some specification in function sogoVersion 2014-04-03 17:09:00 -04:00
Francis Lachapelle 48f98ef34e Merge to 2.2.3 2014-04-03 10:06:08 -04:00
Francis Lachapelle 378f2b5876 Preparation for release 2.2.3 2014-04-03 10:05:43 -04:00
Francis Lachapelle d091b3d7cd Update ChangeLog 2014-04-03 10:01:40 -04:00
Francis Lachapelle 370e1e6d26 Update CKEditor to version 4.3.4 2014-04-03 10:01:01 -04:00
Francis Lachapelle e2b3d5a7ff Update translations 2014-04-03 09:54:27 -04:00
Ludovic Marcotte 078b88a396 Fix for #2686 2014-04-02 18:14:17 -04:00
Francis Lachapelle ee09b80fc3 Simplify [UIxContactEditor addressBookDisplayName]
We were trying to translate the default address book name to the user's
language, but the method [SOGoContactFolders defaultFolderName] is
already returning a translated string, making the whole logic useless.
2014-04-02 10:15:59 -04:00
Francis Lachapelle 99d9615c92 Update NEWS file 2014-04-02 10:09:09 -04:00
Francis Lachapelle 79c3fa8ad2 Merge pull request #30 from dekkers/remove-executable-permission-from-jquery
Remove executable permission from jQuery modules
2014-04-01 11:42:07 -04:00
Francis Lachapelle fd07112113 Merge pull request #31 from opensaucesystems/patch-1
Fix email validation regexp to allow gTLDs
2014-04-01 08:18:51 -04:00
opensaucesystems ce5d591d1d Fix email validation regexp to allow gTLDs
New generic TLDs can be as long as 13 characters.
2014-04-01 12:35:18 +01:00
Jeroen Dekkers e603742d71 Remove executable permission from jQuery 2014-03-29 17:11:05 +01:00
Ludovic Marcotte 585d224a15 Fixed the AS bundle common makefile 2014-03-28 16:44:33 -04:00
Ludovic Marcotte 6a39b48a37 Fix for bug #2691 2014-03-28 15:22:45 -04:00
Ludovic Marcotte 633723a470 Fix for bug #2681 2014-03-28 14:44:00 -04:00
Ludovic Marcotte ba32b95308 Fixed the ActiveSync issue marking mails as read when downloading them 2014-03-28 14:18:48 -04:00
Alexandre Cloutier 03d5975be3 Changed strings in french and change the instanciation of dictionary(addressBooksIDWithDisplayName) to release it manually 2014-03-28 10:28:33 -04:00
Alexandre Cloutier 1da1764aae The collected address book will be created only if the user select it in the preferences. Fix labels. 2014-03-27 15:27:48 -04:00
Francis Lachapelle 6e4f776d4b Fix detection of IMAP flags support in JavaScript
Fixes #2664
2014-03-27 12:06:24 -04:00
Alexandre Cloutier 365e271a84 Correct typo 2014-03-25 15:44:28 -04:00
Alexandre Cloutier bce701208a Added the modifications specified by extrafu 2014-03-25 14:53:42 -04:00
Alexandre Cloutier b16911edc1 Modified the displayed name of SOGo version and added the label in the .lproj 2014-03-24 13:55:52 -04:00
Alexandre Cloutier 76307cfaaf New feature : 1496; Unknown outgoing email addresses can now be automatically be added to your address books. 2014-03-24 13:41:57 -04:00
Francis Lachapelle e5fb7dc7b8 Fix JavaScript exception in Contacts module
Fixed calling unescapeHTML on null variables. Also fixed errors on IE7
(and possibly other versions).
2014-03-24 12:43:34 -04:00
Francis Lachapelle 50e7ea7188 Fix possible exception when retrieving reminder
Fixes #2678
2014-03-24 07:42:57 -04:00
Alexandre Cloutier d108777e89 Display the version at the top of the general tap 2014-03-11 10:25:01 -04:00
Alexandre Cloutier 8cc352fb28 It is now possible to see the version on the general page of the preferences window 2014-03-10 14:45:10 -04:00
Alexandre Cloutier 0d69a476bc add specific date for limiting the user to today's for his contact birthday 2014-03-10 12:16:12 -04:00
Alexandre Cloutier cee1e529f8 BugFix#1636; fix the issue where the user could add anything for the birthday of his contacts 2014-03-10 12:05:01 -04:00
Alexandre Cloutier 3a681bd5a5 Change the function name getClient to sieveClient 2014-03-10 10:53:44 -04:00
Alexandre Cloutier f5faa60814 Added missing functions getClient and IsSieveServerConnected and the changes that comes with it 2014-03-10 10:33:27 -04:00
Alexandre Cloutier f8939bfb3e Change the variable name for sieveFolderEncoding instead of folderEncoding 2014-03-10 10:07:47 -04:00
Alexandre Cloutier f4d189ffc8 Erase the merging conflicts writings 2014-03-06 15:20:41 -05:00
Alexandre Cloutier 1b9ac03e94 BugFix #1046; Whenever the sieve server is unavailable an error message will appear. 2014-03-06 14:57:53 -05:00
Alexandre Cloutier 6ad87052ba bugFix #0002616 : change the behavior of ApplicationBaseURL. Now the object return a standard path(without a slash at the end of the path) That means every string added the URL ApplicationBaseURL must start with a Slash. 2014-03-06 14:47:54 -05:00
Alexandre Cloutier e7a16cba0d BugFix #0002622: The server Dovecot use by default an UTF-8 and by doing so it cause a wrong re-encoding in UTF-7 when reaching the sieve server (knowing that the foldername in sieve are encoded in UTF-7). Since it is not the case with a Cyrus server, I created a new variable available in the sogo.conf that let you specified the type of encoding you need. By default the encoding is set to UTF-7. ex : SOGoFolderEncoding = 'UTF-7' 2014-03-06 14:33:31 -05:00
469 changed files with 22505 additions and 9955 deletions

No files matched your search

+3
View File
@@ -1,6 +1,8 @@
config.make
tags
*._*
*/obj/
*._*
*/*/obj/
*/*/*/obj/
*/*/*.SOGo/
@@ -11,3 +13,4 @@ SoObjects/SOGo/SOGo.framework/
SoObjects/SOGo/derived_src/
Tests/*/config.py
*.pyc
._*
+6 -3
View File
@@ -9,20 +9,23 @@ ActiveSync_PRINCIPAL_CLASS = ActiveSyncProduct
ActiveSync_OBJC_FILES = \
ActiveSyncProduct.m \
iCalAlarm+ActiveSync.m \
iCalEvent+ActiveSync.m \
iCalRecurrenceRule+ActiveSync.m \
iCalTimeZone+ActiveSync.m \
iCalToDo+ActiveSync.m \
NSCalendarDate+ActiveSync.m \
NSCalendarDate+ActiveSync.m \
NSData+ActiveSync.m \
NSDate+ActiveSync.m \
NGDOMElement+ActiveSync.m \
NGMimeMessage+ActiveSync.m \
NGVCard+ActiveSync.m \
NSArray+SyncCache.m \
NSString+ActiveSync.m \
SOGoActiveSyncDispatcher.m \
SOGoActiveSyncDispatcher+Sync.m \
SOGoMailObject+ActiveSync.m \
SOGoMailObject+ActiveSync.m \
SOGoSyncCacheObject.m \
SoObjectWebDAVDispatcher+ActiveSync.m
ActiveSync_RESOURCE_FILES += \
@@ -30,7 +33,7 @@ ActiveSync_RESOURCE_FILES += \
ADDITIONAL_OBJCFLAGS += -Wno-deprecated-declarations
ADDITIONAL_INCLUDE_DIRS += -I../SOPE/ -I../SoObjects/
ADDITIONAL_LIB_DIRS += -L../../SOPE/GDLContentStore/obj/
ADDITIONAL_LIB_DIRS += -L../SOPE/GDLContentStore/obj/ -L../SOPE/NGCards/obj/
ADDITIONAL_INCLUDE_DIRS += -I/usr/include/libwbxml-1.0/
ADDITIONAL_LDFLAGS += -Wl,--no-as-needed -lwbxml2
+39 -7
View File
@@ -37,6 +37,28 @@ static NSArray *asElementArray = nil;
@implementation NGDOMElement (ActiveSync)
- (BOOL) isTextNode
{
id <DOMNodeList> children;
id <DOMElement> element;
int i;
if ([self nodeType] == DOM_TEXT_NODE)
return YES;
children = [self childNodes];
for (i = 0; i < [children length]; i++)
{
element = [children objectAtIndex: i];
if ([element nodeType] != DOM_TEXT_NODE)
return NO;
}
return YES;
}
//
// We must handle "inner data" like this:
//
@@ -79,7 +101,7 @@ static NSArray *asElementArray = nil;
int i, count;
if (!asElementArray)
asElementArray = [[NSArray alloc] initWithObjects: @"Attendee", nil];
asElementArray = [[NSArray alloc] initWithObjects: @"Attendee", @"Category", nil];
data = [NSMutableDictionary dictionary];
@@ -96,9 +118,17 @@ static NSArray *asElementArray = nil;
tag = [element tagName];
count = [(NSArray *)[element childNodes] count];
// We check if the node is a text one or if all its
// children are text nodes. This is important to avoid side-effects
// in SOPE where "foo & bar" would result into 3 childnodes instead
// of just one.
if ([(id)element isTextNode])
{
value = [(id)element textValue];
}
// Handle inner data - see above for samples
if (count > 2)
else
{
NSMutableArray *innerElements;
id <DOMElement> innerElement;
@@ -123,7 +153,10 @@ static NSArray *asElementArray = nil;
if ([innerTag isEqualToString: [innerElement tagName]])
{
[innerElements addObject: [(NGDOMElement *)innerElement applicationData]];
if ([(id)innerElement isTextNode])
[innerElements addObject: [(NGDOMElement *)innerElement textValue]];
else
[innerElements addObject: [(NGDOMElement *)innerElement applicationData]];
}
else
{
@@ -144,12 +177,11 @@ static NSArray *asElementArray = nil;
value = nil;
}
}
else
value = [[element firstChild] textValue];
if (value && tag)
[data setObject: value forKey: tag];
}
} // if ([element nodeType] == DOM_ELEMENT_NODE)
}
return data;
+67 -15
View File
@@ -40,6 +40,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import <Contacts/NGVCard+SOGo.h>
#import <SOGo/NSString+Utilities.h>
#include "NSDate+ActiveSync.h"
#include "NSString+ActiveSync.h"
@@ -47,9 +49,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- (NSString *) activeSyncRepresentationInContext: (WOContext *) context
{
NSArray *emails, *addresses, *categories, *elements;
CardElement *n, *homeAdr, *workAdr;
NSArray *emails, *addresses;
NSMutableString *s;
NSString *url;
id o;
int i;
@@ -65,10 +68,42 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if ((o = [self workCompany]))
[s appendFormat: @"<CompanyName xmlns=\"Contacts:\">%@</CompanyName>", [o activeSyncRepresentationInContext: context]];
if ((o = [[self org] flattenedValueAtIndex: 1 forKey: @""]))
[s appendFormat: @"<Department xmlns=\"Contacts:\">%@</Department>", [o activeSyncRepresentationInContext: context]];
categories = [self categories];
if ([categories count])
{
[s appendFormat: @"<Categories xmlns=\"Contacts:\">"];
for (i = 0; i < [categories count]; i++)
{
[s appendFormat: @"<Category xmlns=\"Contacts:\">%@</Category>", [[categories objectAtIndex: i] activeSyncRepresentationInContext: context]];
}
[s appendFormat: @"</Categories>"];
}
elements = [self childrenWithTag: @"url"
andAttribute: @"type"
havingValue: @"work"];
if ([elements count] > 0)
{
url = [[elements objectAtIndex: 0] flattenedValuesForKey: @""];
[s appendFormat: @"<WebPage xmlns=\"Contacts:\">%@</WebPage>", [url activeSyncRepresentationInContext: context]];
}
if ((o = [[self uniqueChildWithTag: @"x-aim"] flattenedValuesForKey: @""]))
[s appendFormat: @"<IMAddress xmlns=\"Contacts:\">%@</IMAddress>", [o activeSyncRepresentationInContext: context]];
if ((o = [self nickname]))
[s appendFormat: @"<NickName xmlns=\"Contacts:\">%@</NickName>", [o activeSyncRepresentationInContext: context]];
if ((o = [self title]))
[s appendFormat: @"<JobTitle xmlns=\"Contacts:\">%@</JobTitle>", [o activeSyncRepresentationInContext: context]];
if ((o = [self preferredEMail]))
[s appendFormat: @"<Email1Address xmlns=\"Contacts:\">%@</Email1Address>", o];
@@ -154,7 +189,7 @@ 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 activeSyncRepresentationWithoutSeparatorsInContext: context]];
[s appendFormat: @"<Birthday xmlns=\"Contacts:\">%@</Birthday>", [o activeSyncRepresentationInContext: context]];
if ((o = [self note]))
{
@@ -166,6 +201,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[s appendFormat: @"<Data>%@</Data>", o];
[s appendString: @"</Body>"];
}
if ((o = [self photo]))
[s appendFormat: @"<Picture xmlns=\"Contacts:\">%@</Picture>", o];
return s;
}
@@ -183,6 +221,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if ((o = [[theValues objectForKey: @"Body"] objectForKey: @"Data"]))
[self setNote: o];
// Categories
if ((o = [theValues objectForKey: @"Categories"]))
[self setCategories: o];
// Birthday
if ((o = [theValues objectForKey: @"Birthday"]))
{
@@ -238,24 +280,31 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Company's name
if ((o = [theValues objectForKey: @"CompanyName"]))
{
[self setOrg: o units: nil];
}
[self setOrg: o units: nil];
// Department
if ((o = [theValues objectForKey: @"Department"]))
[self setOrg: nil units: [NSArray arrayWithObjects:o,nil]];
// Email addresses
if ((o = [theValues objectForKey: @"Email1Address"]))
{
[self addEmail: o types: [NSArray arrayWithObject: @"pref"]];
element = [self elementWithTag: @"email" ofType: @"work"];
[element setSingleValue: [o pureEMailAddress] forKey: @""];
}
if ((o = [theValues objectForKey: @"Email2Address"]))
{
[self addEmail: o types: nil];
element = [self elementWithTag: @"email" ofType: @"home"];
[element setSingleValue: [o pureEMailAddress] forKey: @""];
}
// SOGo currently only supports 2 email addresses ... but AS clients might send 3
// FIXME: revise this when the GUI revamp is done in SOGo
if ((o = [theValues objectForKey: @"Email3Address"]))
{
[self addEmail: o types: nil];
element = [self elementWithTag: @"email" ofType: @"three"];
[element setSingleValue: [o pureEMailAddress] forKey: @""];
}
// Formatted name
@@ -293,16 +342,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Job's title
if ((o = [theValues objectForKey: @"JobTitle"]))
{
[self setTitle: o];
}
[self setTitle: o];
// WebPage (work)
if ((o = [theValues objectForKey: @"WebPage"]))
{
[[self elementWithTag: @"url" ofType: @"work"]
[[self elementWithTag: @"url" ofType: @"work"]
setSingleValue: o forKey: @""];
}
if ((o = [theValues objectForKey: @"NickName"]))
[self setNickname: o];
if ((o = [theValues objectForKey: @"Picture"]))
[self setPhoto: o];
}
@end
+49
View File
@@ -0,0 +1,49 @@
/*
Copyright (c) 2014, Inverse inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Inverse inc. nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __NSARRAYSYNCCACHE_H__
#define __NSARRAYSYNCCACHE_H__
#import <Foundation/NSArray.h>
@class NSDictionary;
@interface NSMutableArray (SyncCache)
- (id) initWithDictionary: (NSDictionary *) theDictionary;
@end
@interface NSArray (SyncCache)
- (NSDictionary *) dictionaryValue;
@end
#endif
+84
View File
@@ -0,0 +1,84 @@
/*
Copyright (c) 2014, Inverse inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Inverse inc. nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import "NSArray+SyncCache.h"
#import <Foundation/NSDictionary.h>
#include "SOGoSyncCacheObject.h"
@implementation NSMutableArray (SyncCache)
- (id) initWithDictionary: (NSDictionary *) theDictionary
{
SOGoSyncCacheObject *o;
NSArray *allKeys;
id key;
int i;
self = [self initWithCapacity: [theDictionary count]];
allKeys = [theDictionary allKeys];
for (i = 0; i < [allKeys count]; i++)
{
key = [allKeys objectAtIndex: i];
o = [SOGoSyncCacheObject syncCacheObjectWithUID: key
sequence: [theDictionary objectForKey: key]];
[self addObject: o];
}
return self;
}
@end
//
//
//
@implementation NSArray (SyncCache)
- (NSDictionary *) dictionaryValue
{
NSMutableDictionary *d;
SOGoSyncCacheObject *o;
int i;
d = [NSMutableDictionary dictionary];
for (i = 0; i < [self count]; i++)
{
o = [self objectAtIndex: i];
[d setObject: [o sequence] forKey: [o uid]];
}
return d;
}
@end
+1
View File
@@ -47,6 +47,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- (NSCalendarDate *) calendarDate;
- (NSString *) deviceId;
- (NSString *) deviceType;
- (NSString *) attachmentName;
- (NSString *) command;
- (NSData *) convertHexStringToBytes;
+17
View File
@@ -186,6 +186,23 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
return s;
}
// This method extracts the "AttachmentName" from a URI:
//
// /SOGo/Microsoft-Server-ActiveSync?Cmd=GetAttachment&User=sogo&DeviceId=HTCa04b4932597acd3f2dc1a918b9728&DeviceType=htcvision&AttachmentName=mail/TestFldr/8/2
//
- (NSString *) attachmentName
{
NSString *s;
s = [self _valueForParameter: @"ATTACHMENTNAME="];
if (!s)
s = @"Unknown";
return s;
}
//
//
//
+285 -87
View File
@@ -32,9 +32,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import <Foundation/NSArray.h>
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSNull.h>
#import <Foundation/NSProcessInfo.h>
#import <Foundation/NSTimeZone.h>
#import <Foundation/NSURL.h>
#import <Foundation/NSValue.h>
#import <NGObjWeb/NSException+HTTP.h>
#import <NGObjWeb/SoApplication.h>
@@ -72,6 +74,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import <SOGo/SOGoSystemDefaults.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserSettings.h>
#import <SOGo/SOGoCacheGCSObject.h>
#import <Appointments/SOGoAppointmentObject.h>
#import <Appointments/SOGoAppointmentFolder.h>
@@ -101,11 +104,50 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "NSString+ActiveSync.h"
#include "SOGoActiveSyncConstants.h"
#include "SOGoMailObject+ActiveSync.h"
#include "SOGoSyncCacheObject.h"
#include <unistd.h>
@implementation SOGoActiveSyncDispatcher (Sync)
- (void) _setFolderMetadata: (NSDictionary *) theFolderMetadata
forKey: (NSString *) theFolderKey
{
SOGoCacheGCSObject *o;
NSString *key;
key = [NSString stringWithFormat: @"%@+%@", [context objectForKey: @"DeviceId"], theFolderKey];
o = [SOGoCacheGCSObject objectWithName: key inContainer: nil];
[o setObjectType: ActiveSyncFolderCacheObject];
[o setTableUrl: [self folderTableURL]];
[o reloadIfNeeded];
[[o properties] removeObjectForKey: @"SyncKey"];
[[o properties] removeObjectForKey: @"SyncCache"];
[[o properties] removeObjectForKey: @"DateCache"];
[[o properties] removeObjectForKey: @"MoreAvailable"];
[[o properties] addEntriesFromDictionary: theFolderMetadata];
[o save];
}
- (NSMutableDictionary *) _folderMetadataForKey: (NSString *) theFolderKey
{
SOGoCacheGCSObject *o;
NSString *key;
key = [NSString stringWithFormat: @"%@+%@", [context objectForKey: @"DeviceId"], theFolderKey];
o = [SOGoCacheGCSObject objectWithName: key inContainer: nil];
[o setObjectType: ActiveSyncFolderCacheObject];
[o setTableUrl: [self folderTableURL]];
[o reloadIfNeeded];
return [o properties];
}
//
// <?xml version="1.0"?>
// <!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
@@ -423,7 +465,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[theBuffer appendString: @"</Fetch>"];
}
//
// The method handles <GetChanges/>
//
@@ -437,19 +478,70 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
lastServerKey: (NSString **) theLastServerKey
{
NSMutableDictionary *folderMetadata, *dateCache, *syncCache;
NSMutableString *s;
BOOL more_available;
int i, max;
s = [NSMutableString string];
more_available = NO;
if (theFolderType == ActiveSyncMailFolder && !([theSyncKey isEqualToString: @"-1"]) && theFilterType)
{
NSArray *allKeys;
NSString *key;
int softdelete_count;
softdelete_count = 0;
folderMetadata = [self _folderMetadataForKey: [theCollection nameInContainer]];
dateCache = [folderMetadata objectForKey: @"DateCache"];
syncCache = [folderMetadata objectForKey: @"SyncCache"];
allKeys = [dateCache allKeys];
for (i = 0; i < [allKeys count]; i++)
{
key = [allKeys objectAtIndex: i];
if ([[dateCache objectForKey:key] compare: theFilterType] == NSOrderedAscending)
{
[s appendString: @"<SoftDelete xmlns=\"AirSync:\">"];
[s appendFormat: @"<ServerId xmlns=\"AirSync:\">%@</ServerId>", key];
[s appendString: @"</SoftDelete>"];
[syncCache removeObjectForKey: key];
[dateCache removeObjectForKey: key];
softdelete_count++;
}
if (softdelete_count >= theWindowSize)
{
[folderMetadata setObject: [NSNumber numberWithBool: YES] forKey: @"MoreAvailable"];
[self _setFolderMetadata: folderMetadata forKey: [theCollection nameInContainer]];
more_available = YES;
*theLastServerKey = theSyncKey;
// Since WindowSize is reached don't even try to add more to the response, let's just
// jump to the end and return the response immediately
goto return_response;
}
}
[folderMetadata removeObjectForKey: @"MoreAvailable"];
[self _setFolderMetadata: folderMetadata forKey: [theCollection nameInContainer]];
}
//
// No changes in the collection - 2.2.2.19.1.1 Empty Sync Request.
// We check this and we don't generate any commands if we don't have to.
//
if ([theSyncKey isEqualToString: [theCollection davCollectionTag]])
if ([theSyncKey isEqualToString: [theCollection davCollectionTag]] && !([s length]))
return;
s = [NSMutableString string];
more_available = NO;
switch (theFolderType)
@@ -562,114 +654,209 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[s appendString: @"</Add>"];
}
} // for ...
folderMetadata = [NSDictionary dictionaryWithObject: [theCollection davCollectionTag]
forKey: @"SyncKey"];
[self _setFolderMetadata: folderMetadata
forKey: [NSString stringWithFormat: @"%@/%@", component_name, [theCollection nameInContainer]]];
}
break;
case ActiveSyncMailFolder:
default:
{
NSMutableArray *addedOrChangedMessages;
NSString *uid, *command, *key;
SOGoSyncCacheObject *lastCacheObject, *aCacheObject;
NSMutableArray *allCacheObjects, *sortedBySequence;
SOGoMailObject *mailObject;
NSDictionary *aMessage;
NSArray *allMessages;
int deleted_count;
int j, k, return_count;
BOOL found_in_cache;
allMessages = [theCollection syncTokenFieldsWithProperties: nil matchingSyncToken: theSyncKey fromDate: theFilterType];
addedOrChangedMessages = [NSMutableArray array];
deleted_count = 0;
// Check for the WindowSize.
// FIXME: we should eventually check for modseq and slice the maximum
// amount of messages returned to ensure we don't have the same
// modseq accross contiguous boundaries
max = [allMessages count];
// We first check the number of deleted messages we have
// We do NOT honor the window size here as it seems to be
// impossible to get the modseq of an expunged message so
// we can't iterate in the list of deleted messages.
for (i = 0; i < max; i++)
{
aMessage = [allMessages objectAtIndex: i];
uid = [[[aMessage allKeys] lastObject] stringValue];
command = [[aMessage allValues] lastObject];
if ([command isEqualToString: @"deleted"])
{
[s appendString: @"<Delete xmlns=\"AirSync:\">"];
[s appendFormat: @"<ServerId xmlns=\"AirSync:\">%@</ServerId>", uid];
[s appendString: @"</Delete>"];
deleted_count++;
}
else
{
[addedOrChangedMessages addObject: aMessage];
}
}
// We then "pad" with our added/changed messages. We ALWAYS
// at least return one if available
max = [addedOrChangedMessages count];
allCacheObjects = [NSMutableArray array];
for (i = 0; i < max; i++)
{
aMessage = [addedOrChangedMessages objectAtIndex: i];
uid = [[[aMessage allKeys] lastObject] stringValue];
command = [[aMessage allValues] lastObject];
// We check for Outlook stupidity to avoid creating duplicates - see the comment
// in SOGoActiveSyncDispatcher.m: -processMoveItems:inResponse: for more details.
key = [NSString stringWithFormat: @"%@+%@+%@+%@",
[[context activeUser] login],
[context objectForKey: @"DeviceType"],
[theCollection displayName],
uid];
if ([[SOGoCache sharedCache] valueForKey: key])
[allCacheObjects addObject: [SOGoSyncCacheObject syncCacheObjectWithUID: [[[allMessages objectAtIndex: i] allKeys] lastObject]
sequence: [[[allMessages objectAtIndex: i] allValues] lastObject]]];
}
// If it's a new Sync operation, DateCache and SyncCache need to be deleted
// but GUID stored by folderSync shouldn't be touched
folderMetadata = [self _folderMetadataForKey: [theCollection nameInContainer]];
if ([theSyncKey isEqualToString: @"-1"])
{
[folderMetadata setObject: [NSMutableDictionary dictionary] forKey: @"SyncCache"];
[folderMetadata setObject: [NSMutableDictionary dictionary] forKey: @"DateCache"];
}
// Check whether GUID in cache is equal to the GUID from imap - this is to avoid cache corruptions if a folder has been renamed and a new folder
// with the same name has been created but folderSync has not yet updated the cache
if (!([[theCollection nameInContainer] isEqualToString:
[NSString stringWithFormat: @"folder%@", [self globallyUniqueIDToIMAPFolderName: [folderMetadata objectForKey: @"GUID"] type: theFolderType]]]))
{
NSLog(@"GUID mismatch don't sync now!");
return;
}
syncCache = [folderMetadata objectForKey: @"SyncCache"];
dateCache = [folderMetadata objectForKey: @"DateCache"];
sortedBySequence = [[NSMutableArray alloc] initWithDictionary: syncCache];
[sortedBySequence sortUsingSelector: @selector(compareSequence:)];
[sortedBySequence autorelease];
[allCacheObjects sortUsingSelector: @selector(compareSequence:)];
//NSLog(@"sortedBySequence (%d) - lastObject: %@", [sortedBySequence count], [sortedBySequence lastObject]);
//NSLog(@"allCacheObjects (%d) - lastObject: %@", [allCacheObjects count], [allCacheObjects lastObject]);
lastCacheObject = [sortedBySequence lastObject];
if ([folderMetadata objectForKey: @"MoreAvailable"] && lastCacheObject)
{
for (j = 0; j < [allCacheObjects count]; j++)
{
[[SOGoCache sharedCache] removeValueForKey: key];
command = @"changed";
if ([[lastCacheObject uid] isEqual: [[allCacheObjects objectAtIndex: j] uid]])
{
// Found out where we're at, let's continue from there...
found_in_cache = YES;
break;
}
}
if ([command isEqualToString: @"added"])
[s appendString: @"<Add xmlns=\"AirSync:\">"];
else
[s appendString: @"<Change xmlns=\"AirSync:\">"];
mailObject = [theCollection lookupName: uid
inContext: context
acquire: 0];
[s appendFormat: @"<ServerId xmlns=\"AirSync:\">%@</ServerId>", uid];
[s appendString: @"<ApplicationData xmlns=\"AirSync:\">"];
[s appendString: [mailObject activeSyncRepresentationInContext: context]];
[s appendString: @"</ApplicationData>"];
if ([command isEqualToString: @"added"])
[s appendString: @"</Add>"];
else
[s appendString: @"</Change>"];
// We check if we must stop padding
if (i+1+deleted_count > theWindowSize)
}
else
found_in_cache = NO;
if (found_in_cache)
k = j+1;
else
{
k = 0;
j = 0;
}
//NSLog(@"found in cache: %d k = %d", found_in_cache, k);
return_count = 0;
for (; k < [allCacheObjects count]; k++)
{
// Check for the WindowSize and slice accordingly
if (return_count >= theWindowSize)
{
NSString *lastSequence;
more_available = YES;
lastSequence = ([[aCacheObject sequence] isEqual: [NSNull null]] ? @"1" : [aCacheObject sequence]);
*theLastServerKey = [NSString stringWithFormat: @"%@-%@", [aCacheObject uid], lastSequence];
//NSLog(@"Reached windowSize - lastUID will be: %@", *theLastServerKey);
break;
}
aCacheObject = [allCacheObjects objectAtIndex: k];
// If found in cache, it's either a Change or a Delete
if ([syncCache objectForKey: [aCacheObject uid]])
{
if ([[aCacheObject sequence] isEqual: [NSNull null]])
{
// Deleted
[s appendString: @"<Delete xmlns=\"AirSync:\">"];
[s appendFormat: @"<ServerId xmlns=\"AirSync:\">%@</ServerId>", [aCacheObject uid]];
[s appendString: @"</Delete>"];
[syncCache removeObjectForKey: [aCacheObject uid]];
[dateCache removeObjectForKey: [aCacheObject uid]];
}
else
{
// Changed
outlook_hack:
mailObject = [theCollection lookupName: [aCacheObject uid]
inContext: context
acquire: 0];
[s appendString: @"<Change xmlns=\"AirSync:\">"];
[s appendFormat: @"<ServerId xmlns=\"AirSync:\">%@</ServerId>", [aCacheObject uid]];
[s appendString: @"<ApplicationData xmlns=\"AirSync:\">"];
[s appendString: [mailObject activeSyncRepresentationInContext: context]];
[s appendString: @"</ApplicationData>"];
[s appendString: @"</Change>"];
[syncCache setObject: [aCacheObject sequence] forKey: [aCacheObject uid]];
}
return_count++;
}
else
{
// Added
if (![[aCacheObject sequence] isEqual: [NSNull null]])
{
NSString *key;
// We check for Outlook stupidity to avoid creating duplicates - see the comment
// in SOGoActiveSyncDispatcher.m: -processMoveItems:inResponse: for more details.
key = [NSString stringWithFormat: @"%@+%@+%@+%@",
[[context activeUser] login],
[context objectForKey: @"DeviceType"],
[theCollection displayName],
[aCacheObject uid]];
if ([[SOGoCache sharedCache] valueForKey: key])
{
[[SOGoCache sharedCache] removeValueForKey: key];
goto outlook_hack;
}
mailObject = [theCollection lookupName: [aCacheObject uid]
inContext: context
acquire: 0];
[s appendString: @"<Add xmlns=\"AirSync:\">"];
[s appendFormat: @"<ServerId xmlns=\"AirSync:\">%@</ServerId>", [aCacheObject uid]];
[s appendString: @"<ApplicationData xmlns=\"AirSync:\">"];
[s appendString: [mailObject activeSyncRepresentationInContext: context]];
[s appendString: @"</ApplicationData>"];
[s appendString: @"</Add>"];
[syncCache setObject: [aCacheObject sequence] forKey: [aCacheObject uid]];
[dateCache setObject: [NSCalendarDate date] forKey: [aCacheObject uid]];
return_count++;
}
else
{
//NSLog(@"skipping old deleted UID: %@", [aCacheObject uid]);
}
}
}
//
if (more_available)
{
*theLastServerKey = uid;
[folderMetadata setObject: [NSNumber numberWithBool: YES] forKey: @"MoreAvailable"];
[folderMetadata setObject: *theLastServerKey forKey: @"SyncKey"];
}
}
else
{
[folderMetadata removeObjectForKey: @"MoreAvailable"];
[folderMetadata setObject: [theCollection davCollectionTag] forKey: @"SyncKey"];
}
[self _setFolderMetadata: folderMetadata
forKey: [theCollection nameInContainer]];
} // default:
break;
} // switch (folderType) ...
return_response:
if ([s length])
{
[theBuffer appendString: @"<Commands>"];
@@ -767,13 +954,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NSMutableString *changeBuffer, *commandsBuffer;
BOOL getChanges, first_sync;
unsigned int windowSize;
unsigned int windowSize, v;
changeBuffer = [NSMutableString string];
commandsBuffer = [NSMutableString string];
collectionId = [[(id)[theDocumentElement getElementsByTagName: @"CollectionId"] lastObject] textValue];
realCollectionId = [collectionId realCollectionIdWithFolderType: &folderType];
realCollectionId = [self globallyUniqueIDToIMAPFolderName: realCollectionId type: folderType];
collection = [self collectionFromId: realCollectionId type: folderType];
syncKey = davCollectionTag = [[(id)[theDocumentElement getElementsByTagName: @"SyncKey"] lastObject] textValue];
@@ -783,6 +971,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if (windowSize == 0 || windowSize > 512)
windowSize = 100;
// We check if we must overwrite the windowSize with a system preference. This can be useful
// if the user population has large mailboxes and slow connectivity
if ((v = [[SOGoSystemDefaults sharedSystemDefaults] maximumSyncWindowSize]))
windowSize = v;
lastServerKey = nil;
@@ -855,12 +1048,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if ([changeBuffer length] || [commandsBuffer length])
{
if (lastServerKey)
davCollectionTag = [collection davCollectionTagFromId: lastServerKey];
else
davCollectionTag = lastServerKey;
else if (![[self _folderMetadataForKey: [collection nameInContainer]] objectForKey: @"MoreAvailable"])
davCollectionTag = [collection davCollectionTag];
*changeDetected = YES;
}
else
{
if (folderType == ActiveSyncMailFolder && [syncKey isEqualToString: @"-1"])
davCollectionTag = [collection davCollectionTag];
}
// Generate the response buffer
[theBuffer appendString: @"<Collection>"];
+8
View File
@@ -32,17 +32,25 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "SOGoActiveSyncConstants.h"
@class NSException;
@class NSURL;
@interface SOGoActiveSyncDispatcher : NSObject
{
NSURL *folderTableURL;
id context;
}
- (id) collectionFromId: (NSString *) theCollectionId
type: (SOGoMicrosoftActiveSyncFolderType) theFolderType;
- (id) globallyUniqueIDToIMAPFolderName: (NSString *) theIdToTranslate
type: (SOGoMicrosoftActiveSyncFolderType) theFolderType;
- (NSException *) dispatchRequest: (id) theRequest
inResponse: (id) theResponse
context: (id) theContext;
- (NSURL *) folderTableURL;
- (void) ensureFolderTableExists;
@end
File diff suppressed because it is too large. Load diff
+83 -19
View File
@@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "SOGoMailObject+ActiveSync.h"
#import <Foundation/NSArray.h>
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSException.h>
@@ -237,6 +238,8 @@ struct GlobalObjectId {
if (key)
{
NSString *s, *charset;
d = [[self fetchPlainTextParts] objectForKey: key];
encoding = [[self lookupInfoForBodyPart: key] objectForKey: @"encoding"];
@@ -245,6 +248,14 @@ struct GlobalObjectId {
d = [d dataByDecodingBase64];
else if ([encoding caseInsensitiveCompare: @"quoted-printable"] == NSOrderedSame)
d = [d dataByDecodingQuotedPrintableTransferEncoding];
charset = [[[self lookupInfoForBodyPart: key] objectForKey: @"parameterList"] objectForKey: @"charset"];
if (![charset length])
charset = @"us-ascii";
s = [NSString stringWithData: d usingEncodingNamed: charset];
d = [s dataUsingEncoding: NSUTF8StringEncoding];
}
return d;
@@ -284,20 +295,31 @@ struct GlobalObjectId {
[self _sanitizedMIMEPart: body
performed: b];
}
else if ([body isKindOfClass: [NSData class]] &&
else if (([body isKindOfClass: [NSData class]] || [body isKindOfClass: [NSString class]]) &&
[[[thePart contentType] type] isEqualToString: @"text"] &&
([[[thePart contentType] subType] isEqualToString: @"plain"] || [[[thePart contentType] subType] isEqualToString: @"html"]))
{
// We make sure everything is encoded in UTF-8
NSString *charset, *s;
NGMimeType *mimeType;
int encoding;
NSString *s;
charset = [[thePart contentType] valueOfParameter: @"charset"];
encoding = [NGMimeType stringEncodingForCharset: charset];
if ([body isKindOfClass: [NSData class]])
{
NSString *charset;
charset = [[thePart contentType] valueOfParameter: @"charset"];
s = [[NSString alloc] initWithData: body encoding: encoding];
AUTORELEASE(s);
if (![charset length])
charset = @"us-ascii";
s = [NSString stringWithData: body usingEncodingNamed: charset];
}
else
{
// Handle situations when SOPE stupidly returns us a NSString
// This can happen for Content-Type: text/plain, Content-Transfer-Encoding: 8bit
s = body;
}
if (s)
{
@@ -384,6 +406,13 @@ struct GlobalObjectId {
{
if ([type isEqualToString: @"text"])
{
NSString *s, *charset;
charset = [[[self lookupInfoForBodyPart: @""] objectForKey: @"parameterList"] objectForKey: @"charset"];
if (![charset length])
charset = @"us-ascii";
d = [[self fetchPlainTextParts] objectForKey: @""];
// We check if we have base64 encoded parts. If so, we just
@@ -395,17 +424,15 @@ struct GlobalObjectId {
else if ([encoding caseInsensitiveCompare: @"quoted-printable"] == NSOrderedSame)
d = [d dataByDecodingQuotedPrintableTransferEncoding];
s = [NSString stringWithData: d usingEncodingNamed: charset];
// Check if we must convert html->plain
if (theType == 1 && [subtype isEqualToString: @"html"])
{
NSString *s;
s = [[NSString alloc] initWithData: d encoding: NSUTF8StringEncoding];
AUTORELEASE(s);
s = [s htmlToText];
d = [s dataUsingEncoding: NSUTF8StringEncoding];
}
d = [s dataUsingEncoding: NSUTF8StringEncoding];
}
else if ([type isEqualToString: @"multipart"])
{
@@ -479,7 +506,9 @@ struct GlobalObjectId {
//
- (NSString *) activeSyncRepresentationInContext: (WOContext *) _context
{
NSAutoreleasePool *pool;
NSData *d, *globalObjId;
NSArray *attachmentKeys;
NSMutableString *s;
id value;
@@ -670,6 +699,10 @@ struct GlobalObjectId {
// Body - namespace 17
preferredBodyType = [[context objectForKey: @"BodyPreferenceType"] intValue];
// Make use of a local pool here as _preferredBodyDataUsingType:nativeType: will consume
// a significant amout of RAM and file descriptors
pool = [[NSAutoreleasePool alloc] init];
nativeBodyType = 1;
d = [self _preferredBodyDataUsingType: preferredBodyType nativeType: &nativeBodyType];
@@ -710,8 +743,10 @@ struct GlobalObjectId {
[s appendString: @"</Body>"];
}
DESTROY(pool);
// Attachments -namespace 16
NSArray *attachmentKeys = [self fetchFileAttachmentKeys];
attachmentKeys = [self fetchFileAttachmentKeys];
if ([attachmentKeys count])
{
int i;
@@ -741,7 +776,7 @@ struct GlobalObjectId {
// Flags
[s appendString: @"<Flag xmlns=\"Email:\">"];
[s appendFormat: @"<FlagStatus>%d</FlagStatus>", 0];
[s appendFormat: @"<FlagStatus>%d</FlagStatus>", ([self flagged] ? 2 : 0)];
[s appendString: @"</Flag>"];
// FIXME - support these in the future
@@ -762,6 +797,16 @@ struct GlobalObjectId {
//
//
//
// Exemple for a message being marked as read:
//
// <Change>
// <ServerId>607</ServerId>
// <ApplicationData>
// <Read xmlns="Email:">1</Read>
// </ApplicationData>
// </Change>
// </Commands>
//
- (void) takeActiveSyncValues: (NSDictionary *) theValues
inContext: (WOContext *) _context
{
@@ -769,13 +814,32 @@ struct GlobalObjectId {
if ((o = [theValues objectForKey: @"Flag"]))
{
o = [o objectForKey: @"FlagStatus"];
if ([o intValue])
[self addFlags: @"\\Flagged"];
// We must handle empty flags -> {Flag = ""; } - some ActiveSync clients, like the HTC Desire
// will send an empty Flag message when "unflagging" a mail.
if (([o isKindOfClass: [NSMutableDictionary class]]))
{
if ((o = [o objectForKey: @"FlagStatus"]))
{
// 0 = The flag is cleared.
// 1 = The status is set to complete.
// 2 = The status is set to active.
if (([o isEqualToString: @"2"]))
[self addFlags: @"\\Flagged"];
else
[self removeFlags: @"\\Flagged"];
}
}
else
[self removeFlags: @"\\Flagged"];
}
if ((o = [theValues objectForKey: @"Read"]))
{
if ([o intValue])
[self addFlags: @"seen"];
else
[self removeFlags: @"seen"];;
}
}
@end
+55
View File
@@ -0,0 +1,55 @@
/*
Copyright (c) 2014, Inverse inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Inverse inc. nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __SOGOSYNCCACHEOBJECT_H__
#define __SOGOSYNCCACHEOBJECT_H__
#import <Foundation/NSObject.h>
@class NSNull;
@interface SOGoSyncCacheObject : NSObject
{
id _uid;
id _sequence;
}
+ (id) syncCacheObjectWithUID: (id) theUID sequence: (id) theSequence;
- (id) uid;
- (void) setUID: (id) theUID;
- (id) sequence;
- (void) setSequence: (id) theSequence;
- (NSComparisonResult) compareUID: (SOGoSyncCacheObject *) theSyncCacheObject;
- (NSComparisonResult) compareSequence: (SOGoSyncCacheObject *) theSyncCacheObject;
@end
#endif
+122
View File
@@ -0,0 +1,122 @@
/*
Copyright (c) 2014, Inverse inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Inverse inc. nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "SOGoSyncCacheObject.h"
#import <Foundation/NSNull.h>
#import <Foundation/NSString.h>
@implementation SOGoSyncCacheObject
- (id) init
{
if ((self = [super init]))
{
_uid = nil;
_sequence = nil;
}
return self;
}
+ (id) syncCacheObjectWithUID: (id) theUID sequence: (id) theSequence;
{
id o;
o = [[self alloc] init];
[o setUID: theUID];
[o setSequence: theSequence];
return o;
}
- (void) dealloc
{
RELEASE(_uid);
RELEASE(_sequence);
[super dealloc];
}
- (id) uid
{
return _uid;
}
- (void) setUID: (id) theUID
{
ASSIGN(_uid, theUID);
}
- (id) sequence
{
return _sequence;
}
- (void) setSequence: (id) theSequence
{
ASSIGN(_sequence, theSequence);
}
- (NSComparisonResult) compareUID: (SOGoSyncCacheObject *) theSyncCacheObject
{
return [[self uid] compare: [theSyncCacheObject uid]];
}
//
// We might get NSNull values here, so if both are NSNull instances,
// we sort by UID. If both sequences are equal, we also sort by UID.
//
- (NSComparisonResult) compareSequence: (SOGoSyncCacheObject *) theSyncCacheObject
{
if ([[self sequence] isEqual: [NSNull null]] &&
[[theSyncCacheObject sequence] isEqual: [NSNull null]])
return [self compareUID: theSyncCacheObject];
if (![[self sequence] isEqual: [NSNull null]] && [[theSyncCacheObject sequence] isEqual: [NSNull null]])
return NSOrderedDescending;
if ([[self sequence] isEqual: [NSNull null]] && ![[theSyncCacheObject sequence] isEqual: [NSNull null]])
return NSOrderedAscending;
// Must check this here, to avoid comparing NSNull objects
if ([[self sequence] compare: [theSyncCacheObject sequence]] == NSOrderedSame)
return [self compareUID: theSyncCacheObject];
return [[self sequence] compare: [theSyncCacheObject sequence]];
}
- (NSString *) description
{
return [NSString stringWithFormat: @"%@-%@", _uid, _sequence];
}
@end
+3 -6
View File
@@ -1,5 +1,3 @@
# common make file for SoObject bundles
include ../config.make
include $(GNUSTEP_MAKEFILES)/common.make
include ../Version
@@ -18,10 +16,9 @@ ADDITIONAL_INCLUDE_DIRS += \
-I../../SOPE
ADDITIONAL_LIB_DIRS += \
-L../SOGo/SOGo.framework/ \
-L../../SOGo/$(GNUSTEP_OBJ_DIR)/ \
-L../../OGoContentStore/$(GNUSTEP_OBJ_DIR)/ \
-L../../SOPE/NGCards/$(GNUSTEP_OBJ_DIR)/ \
-L../SoObjects/SOGo/SOGo.framework/ \
-L../SoObjects/SOGo/$(GNUSTEP_OBJ_DIR)/ \
-L../SOPE/NGCards/$(GNUSTEP_OBJ_DIR)/ \
-L/usr/local/lib
BUNDLE_LIBS += \
+46
View File
@@ -0,0 +1,46 @@
/*
Copyright (c) 2014, Inverse inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Inverse inc. nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __ICALALARMACTIVESYNC_H__
#define __ICALALARMACTIVESYNC_H__
#import <NGCards/iCalAlarm.h>
@class NSString;
@class WOContext;
@interface iCalAlarm (ActiveSync)
- (NSString *) activeSyncRepresentationInContext: (WOContext *) context;
- (void) takeActiveSyncValues: (NSDictionary *) theValues
inContext: (WOContext *) context;
@end
#endif
+106
View File
@@ -0,0 +1,106 @@
/*
Copyright (c) 2014, Inverse inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Inverse inc. nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import "iCalAlarm+ActiveSync.h"
#import <Foundation/NSDictionary.h>
#import <Foundation/NSString.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>
@implementation iCalAlarm (ActiveSync)
- (NSString *) activeSyncRepresentationInContext: (WOContext *) context
{
NSMutableString *s;
s = [NSMutableString string];
if ([[self action] caseInsensitiveCompare: @"DISPLAY"] == NSOrderedSame)
{
NSCalendarDate *nextAlarmDate;
NSInteger delta;
nextAlarmDate = [self nextAlarmDate];
delta = (int)(([[(iCalEvent *)parent startDate] timeIntervalSince1970] - [nextAlarmDate timeIntervalSince1970])/60);
// don't send negative reminder - not supported
if (delta > 0)
[s appendFormat: @"<Reminder xmlns=\"Calendar:\">%d</Reminder>", delta];
}
return s;
}
- (void) takeActiveSyncValues: (NSDictionary *) theValues
inContext: (WOContext *) context
{
iCalTrigger *trigger;
id o;
o = [theValues objectForKey: @"Reminder"];
// Outlook: if reminder is set to 0 minutes before start save it as 1 minute since -> 0 minutes in not accepted by SOGo
if ([o isEqualToString: @"0"])
o = @"1";
trigger = [iCalTrigger elementWithTag: @"TRIGGER"];
[trigger setValueType: @"DURATION"];
[self setTrigger: trigger];
[self setAction: @"DISPLAY"];
// SOGo web ui only supports 1w but not 2w (custom reminder only supports min/hours/days)
// 1week = -P1W
// 2weeks > -PxD
// xdays > -PxD
// xhours -> -PTxH
// xmin -> -PTxM
if ([o intValue] == 10080)
[trigger setSingleValue: [NSString stringWithFormat: @"-P1W" ] forKey: @""];
else
{
if (([o intValue] % 1440) == 0)
[trigger setSingleValue: [NSString stringWithFormat: @"-P%dD", ([o intValue] / 1440)] forKey: @""];
else
{
if (([o intValue] % 60) == 0)
[trigger setSingleValue: [NSString stringWithFormat: @"-PT%dH", ([o intValue] / 60)] forKey: @""];
else
[trigger setSingleValue: [NSString stringWithFormat: @"-PT%@M", o] forKey: @""];
}
}
}
@end
+72 -6
View File
@@ -50,6 +50,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import <Appointments/iCalEntityObject+SOGo.h>
#include "iCalAlarm+ActiveSync.h"
#include "iCalRecurrenceRule+ActiveSync.h"
#include "iCalTimeZone+ActiveSync.h"
#include "NSDate+ActiveSync.h"
@@ -83,6 +84,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
int v;
NSTimeZone *userTimeZone;
userTimeZone = [[[context activeUser] userDefaults] timeZone];
s = [NSMutableString string];
[s appendFormat: @"<AllDayEvent xmlns=\"Calendar:\">%d</AllDayEvent>", ([self isAllDay] ? 1 : 0)];
@@ -95,12 +99,30 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// StartTime -- http://msdn.microsoft.com/en-us/library/ee157132(v=exchg.80).aspx
if ([self startDate])
[s appendFormat: @"<StartTime xmlns=\"Calendar:\">%@</StartTime>", [[self startDate] activeSyncRepresentationWithoutSeparatorsInContext: context]];
{
if ([self isAllDay])
[s appendFormat: @"<StartTime xmlns=\"Calendar:\">%@</StartTime>",
[[[self startDate] dateByAddingYears: 0 months: 0 days: 0
hours: 0 minutes: 0
seconds: ([userTimeZone secondsFromGMTForDate: [self startDate]])*-1]
activeSyncRepresentationWithoutSeparatorsInContext: context]];
else
[s appendFormat: @"<StartTime xmlns=\"Calendar:\">%@</StartTime>", [[self startDate] activeSyncRepresentationWithoutSeparatorsInContext: context]];
}
// EndTime -- http://msdn.microsoft.com/en-us/library/ee157945(v=exchg.80).aspx
if ([self endDate])
[s appendFormat: @"<EndTime xmlns=\"Calendar:\">%@</EndTime>", [[self endDate] activeSyncRepresentationWithoutSeparatorsInContext: context]];
{
if ([self isAllDay])
[s appendFormat: @"<EndTime xmlns=\"Calendar:\">%@</EndTime>",
[[[self endDate] dateByAddingYears: 0 months: 0 days: 0
hours: 0 minutes: 0
seconds: ([userTimeZone secondsFromGMTForDate: [self endDate]])*-1]
activeSyncRepresentationWithoutSeparatorsInContext: context]];
else
[s appendFormat: @"<EndTime xmlns=\"Calendar:\">%@</EndTime>", [[self endDate] activeSyncRepresentationWithoutSeparatorsInContext: context]];
}
// Timezone
tz = [(iCalDateTime *)[self firstChildWithTag: @"dtstart"] timeZone];
@@ -138,7 +160,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
attendee = [attendees objectAtIndex: i];
[s appendFormat: @"<Attendee_Email xmlns=\"Calendar:\">%@</Attendee_Email>", [attendee rfc822Email]];
[s appendFormat: @"<Attendee_Name xmlns=\"Calendar:\">%@</Attendee_Name>", [attendee cn]];
[s appendFormat: @"<Attendee_Name xmlns=\"Calendar:\">%@</Attendee_Name>", [[attendee cn] activeSyncRepresentationInContext: context]];
attendee_status = [self _attendeeStatus: attendee];
@@ -209,7 +231,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[s appendFormat: @"<Sensitivity xmlns=\"Calendar:\">%d</Sensitivity>", v];
// Reminder -- http://msdn.microsoft.com/en-us/library/ee219691(v=exchg.80).aspx
// TODO
// TODO: improve this to handle more alarm types
if ([self hasAlarms])
{
iCalAlarm *alarm;
alarm = [[self alarms] objectAtIndex: 0];
[s appendString: [alarm activeSyncRepresentationInContext: context]];
}
// Recurrence rules
if ([self isRecurrent])
@@ -356,6 +385,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if (isAllDay)
{
tzOffset = [userTimeZone secondsFromGMTForDate: o];
o = [o dateByAddingYears: 0 months: 0 days: 0
hours: 0 minutes: 0
seconds: tzOffset];
[start setDate: o];
[start setTimeZone: nil];
}
@@ -377,6 +410,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if (isAllDay)
{
tzOffset = [userTimeZone secondsFromGMTForDate: o];
o = [o dateByAddingYears: 0 months: 0 days: 0
hours: 0 minutes: 0
seconds: tzOffset];
[end setDate: o];
[end setTimeZone: nil];
}
@@ -390,6 +427,35 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
}
//
// If an alarm is deinfed with an action != DISPLAY, we ignore the alarm - don't want to overwrite.
//
if ([self hasAlarms] && [[[[self alarms] objectAtIndex: 0] action] caseInsensitiveCompare: @"DISPLAY"] != NSOrderedSame)
{
// Ignore the alarm for now
}
else if ((o = [theValues objectForKey: @"Reminder"]))
{
// NOTE: Outlook sends a 15 min reminder (18 hour for allday) if no reminder is specified
// although no default reminder is defined (File -> Options -> Clendar -> Calendar Options - > Default Reminders)
//
// http://answers.microsoft.com/en-us/office/forum/office_2013_release-outlook/desktop-outlook-calendar-creates-entries-with/9aef72d8-81bb-4a32-a6ab-bf7d216fb811?page=5&tm=1395690285088
//
iCalAlarm *alarm;
alarm = [[iCalAlarm alloc] init];
[alarm takeActiveSyncValues: theValues inContext: context];
[self removeAllAlarms];
[self addToAlarms: alarm];
RELEASE(alarm);
}
else
{
// We remove existing alarm since no reminder in the ActiveSync payload
[self removeAllAlarms];
}
// Recurrence
if ((o = [theValues objectForKey: @"Recurrence"]))
{
+20 -3
View File
@@ -34,6 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import <Foundation/NSDictionary.h>
#import <Foundation/NSString.h>
#import <NGCards/iCalEvent.h>
#import <NGCards/iCalByDayMask.h>
#import "NSCalendarDate+ActiveSync.h"
@@ -77,10 +78,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
occurrences = [[self byDayMask] weekDayOccurrences];
v = 0;
for (i = 0; i < 7; i++)
if (occurrences)
{
if (occurrences[i])
v += (1 << i);
for (i = 0; i < 7; i++)
{
if (occurrences[0][i])
v += (1 << i);
}
}
else
{
// No byDayMask, we take the event's start date to compute the DayOfWeek
// 0 == Sunday, 6 == Saturday
v = (1 << [[[self parent] startDate] dayOfWeek]);
}
[s appendFormat: @"<Recurrence_DayOfWeek xmlns=\"Calendar:\">%d</Recurrence_DayOfWeek>", v];
@@ -125,6 +135,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// FIXME
}
}
else
{
// Simple reccurrence rule of type "Monthly"
type = 2;
[s appendFormat: @"<Recurrence_DayOfMonth xmlns=\"Calendar:\">%d</Recurrence_DayOfMonth>",
[[[self parent] startDate] dayOfMonth]];
}
}
else if ([self frequency] == iCalRecurrenceFrequenceYearly)
{
+7 -2
View File
@@ -28,8 +28,13 @@
ProxyPass /SOGo http://127.0.0.1:20000/SOGo interpolate
ProxyPass / http://127.0.0.1:20000/SOGo/dav/ interpolate
<Location />
Order allow,deny
Allow from all
<IfVersion < 2.4>
Order deny,allow
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Location>
<Proxy http://127.0.0.1:20000>
+8 -2
View File
@@ -5,8 +5,14 @@ Alias /SOGo/WebServerResources/ \
<Directory /usr/lib/GNUstep/SOGo/>
AllowOverride None
Order deny,allow
Allow from all
<IfVersion < 2.4>
Order deny,allow
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
# Explicitly allow caching of static content to avoid browser specific behavior.
# A resource's URL MUST change in order to have the client load the new version.
+3823
View File
File diff suppressed because it is too large. Load diff
Binary file not shown.
Binary file not shown.
-1
View File
@@ -6,7 +6,6 @@ include $(GNUSTEP_MAKEFILES)/common.make
SUBPROJECTS = \
SOPE/NGCards \
SOPE/GDLContentStore \
OGoContentStore \
SoObjects \
Main \
UI \
-2
View File
@@ -10,14 +10,12 @@ ADDITIONAL_INCLUDE_DIRS += \
ADDITIONAL_LIB_DIRS += \
-L../SoObjects/SOGo/SOGo.framework \
-L../OGoContentStore/$(GNUSTEP_OBJ_DIR)/ \
-L../SOPE/NGCards/$(GNUSTEP_OBJ_DIR)/
SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
$(SOGOD)_TOOL_LIBS += \
-lSOGo \
-lOGoContentStore \
-lGDLContentStore \
-lGDLAccess \
-lWEExtensions \
+156
View File
@@ -1,3 +1,159 @@
2.2.8 (2014-09-10)
------------------
New features
- new user settings for threads collapsing
- IMAP global search support (#2670)
Enchancements
- major refactoring of the GCS component saving code (dropped OGoContentStore)
- printing calendars in colors is now possible in all views; list, daily, weekly and multicolumns
- new option to print calendars events and tasks with a background color or with a border color
- labels tagging only make one AJAX call for all the selected messages instead of one AJAX call per message
- new option to print calendars events and tasks with a background color or with a border color
- all modules can now be automatically refreshed
- new configurable user defaults variables; SOGoRefreshViewCheck & SOGoRefreshViewIntervals. SOGoMailMessageCheck has
been replaced by SOGoRefreshViewCheck and SOGoMailPollingIntervals has been replaced by SOGoRefreshViewIntervals
- updated Catalan, Czech, Dutch, Finnish, French, Hungarian, Norwegian, and Polish translations
Bug fixes
- fixed crasher when subscribing users to resources (#2892)
- fixed encoding of new calendars and new subscriptions (JavaScript only)
- fixed display of users with no possible subscription
- fixed usage of SOGoSubscriptionFolderFormat domain default when the folder's name hasn't been changed
- fixed "sogo-tool restore -l" that was returning incorrect folder IDs
- fixed Can not delete mail when over quota (#2812)
- fixed Events and tasks cannot be moved to other calendars using drag&drop (#2759)
- fixed In "Multicolumn Day View" mouse position is not honored when creating an event (#2864)
- fixed handling of messages labels (#2902)
- fixed Apache > 2.3 configuration
- fixed freebusy retrieval during timezone changes (#1240)
2.2.7 (2014-07-30)
------------------
New features
- new user preference to prevent event invitations
Enhancements
- improved badges of active tasks count
- refresh draft folder after sending a message
- now possible to DnD events in the calendar list
- improved handling of SOGoSubscriptionFolderFormat
- JSON'ified folder subscription interface
- updated Finnish, French, German, and Spanish (Spain) translations
- updated CKEditor to version 4.4.3
Bug fixes
- fixed weekdays translation in the datepicker
- fixed event categories display
- fixed all-day events display in IE
- fixed rename of calendars
- we now correctly add the "METHOD:REPLY" when sending out ITIP messages from DAV clients
- fixed refresh of message headers when forwarding a message (#2818)
- we now correctly escape all charset= in <meta> tags, not only in the <head>
- we now destroy cache objects of vanished folders
2.2.6 (2014-07-02)
------------------
New features
- add new 'multi-columns' calendar view (#1948)
Enhancements
- contacts photos are now synchronized using ActiveSync (#2807)
- implemented the GetAttachment ActiveSync command (#2808)
- implemented the Ping ActiveSync command
- added "soft deletes" support for ActiveSync (#2734)
- now display the active tasks count next to calendar names (#2760)
Bug fixes
- better handling of empty "Flag" messages over ActiveSync (#2806)
- fixed Chinese charset handling (#2809)
- fixed folder name (calendars and contacts) of new subscriptions (#2801)
- fixed the reply/forward operation over ActiveSync (#2805)
- fixed regression when attaching files to a reply
- wait 20 seconds (instead of 2) before deleting temporary download forms (#2811)
- avoid raising exceptions when the db is down and we try to access the preferences module (#2813)
- we now ignore the SCHEDULE-AGENT property when Thunderbird/Lightning sends it to avoid
not-generating invitation responses for externally received IMIP messages
- improved charset handling over ActiveSync (#2810)
2.2.5 (2014-06-05)
------------------
Enhancements
- new meta tag to tell IE to use the highest mode available
- updated Dutch, Finnish, German, and Polish translations
Bug fixes
- avoid crashing when we forward an email with no Subject header
- we no longer try to include attachments when replying to a mail
- fixed ActiveSync repetitive events issues with "Weekly" and "Monthly" ones
- fixed ActiveSync text/plain parts re-encoding issues for Outlook
2.2.4 (2014-05-29)
------------------
New features
- new print option in Calendar module
- now able to save unknown recipient emails to address book on send (#1496)
Enhancements
- Sieve folder encoding is now configurable (#2622)
- SOGo version is now displayed in preferences window (#2612)
- report Sieve error when saving preferences (#1046)
- added the SOGoMaximumSyncWindowSize system default to overwrite the
maximum number of items returned during an ActiveSync sync operation
- updated datepicker
- addressbooks properties are now accessible from a popup window
- extended events and tasks searches
- updated Czech, French, Hungarian, Polish, Russian, Slovak, Spanish (Argentina), and Spanish (Spain) translations
- added more sycned contact properties when using ActiveSync (#2775)
- now possible to configure the default subscribed resource name using SOGoSubscriptionFolderFormat
- now handle server-side folder updates using ActiveSync (#2688)
- updated CKEditor to version 4.4.1
Bug fixes
- fixed saved HTML content of draft when attaching a file
- fixed text nodes of HTML content handler by encoding HTML entities
- fixed iCal7 delegation issue with the "inbox" folder (#2489)
- fixed birth date validity checks (#1636)
- fixed URL handling (#2616)
- improved folder rename operations using ActiveSync (#2700)
- fixed SmartReply/Forward when ReplaceMime was omitted (#2680)
- fixed wrong generation of weekly repetitive events with ActiveSync (#2654)
- fixed incorrect XML data conversion with ActiveSync (#2695)
- fixed display of events having a category with HTML entities (#2703)
- fixed display of images in CSS background (#2437)
- fixed limitation of Sieve script size (#2745)
- fixed sync-token generation when no change was returned (#2492)
- fixed the IMAP copy/move operation between subfolders in different accounts
- fixed synchronization of seen/unseen status of msgs in Webmail (#2715)
- fixed focus of popup windows open through a contextual menu with Firefox on Windows 7
- fixed missing characters in shared folder names over ActiveSync (#2709)
- fixed reply and forward mail templates for Brazilian Portuguese (#2738)
- fixed newline in signature when forwarding a message as attachment in HTML mode (#2787)
- fixed restoration of options (priority & return receipt) when editing a draft (#193)
- fixed update of participation status via CalDAV (#2786)
2.2.3 (2014-04-03)
------------------
Enhancements
- updated Dutch, Hungarian, Russian and Spanish (Argentina) translations
- initial support for ActiveSync event reminders support (#2681)
- updated CKEditor to version 4.3.4
Bug fixes
- fixed possible exception when retrieving the default event reminder value on 64bit architectures (#2678)
- fixed calling unescapeHTML on null variables to avoid JavaScript exceptions in Contacts module
- fixed detection of IMAP flags support on the client side (#2664)
- fixed the ActiveSync issue marking all mails as read when downloading them
- fixed ActiveSync's move operations not working for multiple selections (#2691)
- fixed email validation regexp to allow gTLDs
- improved all-day events support for ActiveSync (#2686)
2.2.2 (2014-03-21)
------------------
-482
View File
@@ -1,482 +0,0 @@
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
-34
View File
@@ -1,34 +0,0 @@
# GNUstep makefile
include ../config.make
include $(GNUSTEP_MAKEFILES)/common.make
include ./Version
LIBRARY_NAME = libOGoContentStore
TYPEMODELS_DIR = $(SOGO_TYPEMODELS)
libOGoContentStore_HEADER_FILES_DIR = .
libOGoContentStore_HEADER_FILES_INSTALL_DIR = /OGoContentStore
libOGoContentStore_INTERFACE_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
ADDITIONAL_INCLUDE_DIRS += -I../SOPE
ADDITIONAL_LIB_DIRS += -L../SOPE/GDLContentStore/obj
libOGoContentStore_OBJC_FILES += \
OCSiCalFieldExtractor.m \
OCSContactFieldExtractor.m \
libOGoContentStore_TYPEMODELS += \
appointment.ocs \
contact.ocs \
appointment-oracle.ocs \
contact-oracle.ocs
-include GNUmakefile.preamble
ifneq ($(FHS_INSTALL_ROOT),)
GNUSTEP_HEADERS=$(DESTDIR)$(FHS_INSTALL_ROOT)/include
endif
include $(GNUSTEP_MAKEFILES)/library.make
include $(GNUSTEP_MAKEFILES)/tool.make
-include GNUmakefile.postamble
-32
View File
@@ -1,32 +0,0 @@
# compilation settings
libOGoContentStore_LIBRARIES_DEPEND_UPON += \
-lGDLContentStore \
-lGDLAccess \
-lNGCards \
-lNGExtensions \
-lEOControl \
-lSaxObjC \
$(BASE_LIBS)
ADDITIONAL_INCLUDE_DIRS += -I. -I.. -I../SOPE -I../SoObjects
ADDITIONAL_LIB_DIRS += -L./$(GNUSTEP_OBJ_DIR) -L../SOPE/NGCards/$(GNUSTEP_OBJ_DIR)/ -L../SoObjects/SOGo/SOGo.framework/
SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
ifeq ($(FOUNDATION_LIB),apple)
libOGoContentStore_PREBIND_ADDR="0xC7700000"
libOGoContentStore_LDFLAGS += -seg1addr $(libOGoContentStore_PREBIND_ADDR)
endif
test_quick_extract_TOOL_LIBS += \
-lEOControl \
-lSaxObjC \
-lDOM \
-lNGExtensions \
-lNGCards \
-lGDLContentStore \
-lGDLAccess \
-lOGoContentStore \
$(BASE_LIBS)
-136
View File
@@ -1,136 +0,0 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with OGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
#import <NGExtensions/NSNull+misc.h>
#import <NGExtensions/NSObject+Logs.h>
#import <GDLContentStore/GCSFieldExtractor.h>
#import <NGCards/NGVCard.h>
#import <NGCards/NGVList.h>
#import <SOGo/NSArray+Utilities.h>
@interface OCSContactFieldExtractor : GCSFieldExtractor
@end
@implementation OCSContactFieldExtractor
- (NSMutableDictionary *) extractQuickFieldsFromVCard: (NGVCard *) vCard
{
NSMutableDictionary *fields;
NSArray *values;
CardElement *element;
NSString *value;
fields = [NSMutableDictionary dictionaryWithCapacity: 16];
value = [vCard fn];
if (value)
[fields setObject: value forKey: @"c_cn"];
element = [vCard n];
[fields setObject: [element flattenedValueAtIndex: 0 forKey: @""]
forKey: @"c_sn"];
[fields setObject: [element flattenedValueAtIndex: 1 forKey: @""]
forKey: @"c_givenName"];
value = [vCard preferredTel];
if (value)
[fields setObject: value forKey: @"c_telephonenumber"];
value = [vCard preferredEMail];
if (![value isNotNull])
value = @"";
[fields setObject: value forKey: @"c_mail"];
element = [vCard org];
[fields setObject: [element flattenedValueAtIndex: 0 forKey: @""]
forKey: @"c_o"];
[fields setObject: [element flattenedValueAtIndex: 1 forKey: @""]
forKey: @"c_ou"];
element = [vCard preferredAdr];
if (element && ![element isVoid])
[fields setObject: [element flattenedValueAtIndex: 3
forKey: @""]
forKey: @"c_l"];
value = [[vCard uniqueChildWithTag: @"X-AIM"] flattenedValuesForKey: @""];
[fields setObject: value forKey: @"c_screenname"];
values = [[vCard categories] trimmedComponents];
if ([values count] > 0)
[fields setObject: [values componentsJoinedByString: @","]
forKey: @"c_categories"];
else
[fields setObject: [NSNull null] forKey: @"c_categories"];
[fields setObject: @"vcard" forKey: @"c_component"];
return fields;
}
- (NSMutableDictionary *) extractQuickFieldsFromVList: (NGVList *) vList
{
NSMutableDictionary *fields;
NSString *value;
fields = [NSMutableDictionary dictionaryWithCapacity: 1];
value = [vList fn];
if (value)
[fields setObject: value forKey: @"c_cn"];
[fields setObject: @"vlist" forKey: @"c_component"];
return fields;
}
- (NSMutableDictionary *) extractQuickFieldsFromContent: (NSString *) content
{
NSMutableDictionary *fields;
NGVCard *vCard;
NGVList *vList;
NSString *upperContent;
fields = nil;
if ([content length] > 0)
{
upperContent = [content uppercaseString];
if ([upperContent hasPrefix: @"BEGIN:VCARD"])
{
vCard = [NGVCard parseSingleFromSource: content];
if (vCard)
fields = [self extractQuickFieldsFromVCard: vCard];
else
[self errorWithFormat: @"Could not parse VCARD content."];
}
else if ([upperContent hasPrefix: @"BEGIN:VLIST"])
{
vList = [NGVList parseSingleFromSource: content];
if (vList)
fields = [self extractQuickFieldsFromVList: vList];
else
[self errorWithFormat: @"Could not parse VLIST content."];
}
else
[self errorWithFormat: @"Content is unknown."];
}
else
[self errorWithFormat: @"Content is empty."];
return fields;
}
@end /* OCSContactFieldExtractor */
-35
View File
@@ -1,35 +0,0 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with OGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#ifndef __OGoContentStore_OCSiCalFieldExtractor_H__
#define __OGoContentStore_OCSiCalFieldExtractor_H__
#include <GDLContentStore/GCSFieldExtractor.h>
@interface OCSiCalFieldExtractor : GCSFieldExtractor
{
}
+ (id)sharedICalFieldExtractor;
@end
#endif /* __OGoContentStore_OCSiCalFieldExtractor_H__ */
-96
View File
@@ -1,96 +0,0 @@
/*
Copyright (C) 2004 SKYRIX Software AG
This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSString.h>
#import <NGExtensions/NSNull+misc.h>
#import <NGExtensions/NSObject+Logs.h>
#import <NGCards/iCalCalendar.h>
#import <SoObjects/Appointments/iCalRepeatableEntityObject+SOGo.h>
#import "OCSiCalFieldExtractor.h"
@implementation OCSiCalFieldExtractor
+ (id) sharedICalFieldExtractor
{
static OCSiCalFieldExtractor *extractor = nil;
if (!extractor)
extractor = [self new];
return extractor;
}
/* operations */
- (CardGroup *) firstElementFromCalendar: (iCalCalendar *) ical
{
NSArray *elements;
CardGroup *element;
unsigned int count;
elements = [ical allObjects];
count = [elements count];
if (count)
element = [elements objectAtIndex: 0];
else
{
[self logWithFormat: @"ERROR: given calendar contains no elements: %@", ical];
element = nil;
}
return element;
}
- (NSMutableDictionary *) extractQuickFieldsFromContent: (NSString *) _content
{
NSMutableDictionary *fields;
id cal;
fields = nil;
if ([_content length])
{
cal = [iCalCalendar parseSingleFromSource: _content];
if (cal)
{
if ([cal isKindOfClass: [iCalCalendar class]])
cal = [self firstElementFromCalendar: cal];
if ([cal isKindOfClass: [iCalRepeatableEntityObject class]])
fields = [cal quickRecord];
else if ([cal isNotNull])
[self logWithFormat: @"ERROR: unexpected iCalendar parse result: %@",
cal];
}
else
[self logWithFormat: @"ERROR: parsing source didn't return anything"];
}
return fields;
}
@end /* OCSiCalFieldExtractor */
-144
View File
@@ -1,144 +0,0 @@
Storage Backend
===============
The storage backend implements the "low level" folder abstraction, which is
basically an arbitary "BLOB" containing some document. The feature is that
we extract "quick access" / "searchable" attributes from the document content.
Further it contains the "folder management" API, as named folders can be stored
in different databases.
Note: we need a way to tell where "new" folders should be created
Note: to sync with LDAP we need to periodically delete or archive old folders
Folders have associated a type (like 'calendar') which defines the query
attributes and serialization format.
TODO
====
- hierarchies deeper than 4 (properly filter on path in OCS)
Open Questions
==============
System-meta-data in the blob-table or in the quick-table?
- master data belongs into the blob table
- could be regular 'NSxxx' keys to differentiate meta data from
Class Hierarchy
===============
[NSObject]
OCSContext - tracking context
OCSFolder - represents a single folder
OCSFolderManager - manages folders
OCSFolderType - the mapping info for a specific folder-type
OCSFieldInfo - mapping info for one 'quick field'
OCSChannelManager - maintains EOAdaptorChannel objects
TBD:
- field 'extractor'
- field 'value' (eg array values for participants?)
- BLOB archiver/unarchiver
Defaults
========
OCSFolderInfoURL - the DB URL where the folder-info table is located
eg: http://OGo:OGo@localhost/test/folder_info
OCSFolderManagerDebugEnabled - enable folder-manager debug logs
OCSFolderManagerSQLDebugEnabled - enable folder-manager SQL gen debug logs
OCSChannelManagerDebugEnabled - enable channel debug pooling logs
OCSChannelManagerPoolDebugEnabled - debug pool handle allocation
OCSChannelExpireAge - if that age in seconds is exceeded, a channel
will be removed from the pool
OCSChannelCollectionTimer - time in seconds. each n-seconds the pool will be
checked for channels too old
[PGDebugEnabled] - enable PostgreSQL adaptor debugging
URLs
====
"Database URLs"
We use the schema:
postgresql://[user]:[password]@[host]:[port]/[dbname]/[tablename]
BLOB Formats
============
- TBD
- iCal, XML
- problem with iCal is that a complete and valid iCal file is different from
just the vevent. so we basically need to parse those files in any case.
- XML: the iCal SaxDriver reports XML events, so we can easily store that as
XML
- we need to parse the BLOB for different clients anyway (iCal != iCal ...)
- XML: we could use some XML query extension to PG in the future?
Update: we now have OCSiCalFieldExtractor
- it parses the BLOB as an iCalendar file and extracts a set of fixed
keys:
- title - plain copy of "summary"
- uid - plain copy
- startdate - date as utime
- enddate - date as utime
- participants - CNs of attendees separated by comma ", "
- location
- partmails
- sequence
- TBD: iscyclic
- TBD: isallday
- TBD: cycles - I guess the client should fetch the BLOB to resolve
- the field extractor is accessed by OCSFolder using the folderinfo:
extractor = [self->folderInfo quickExtractor];
quickRow = [extractor extractQuickFieldsFromContent:_content];
Support Tools
=============
- tools we need:
- one to recreate a quick table based on the blob table
Notes
=====
- need to use http:// URLs for connect info, until generic URLs in
libFoundation are fixed (the parses breaks on the login/password parts)
QA
==
Q: Why do we use two tables, we could store the quick columns in the blob?
==
They could be in the same table. I considered using separate tables since the
quick table is likely to be recreated now and then if BLOB indexing
requirements change.
Actually one could even use different _quick tables which share a common BLOB
table.
(a quick table is nothing more than a database index and like with DB indexes
multiple ones for different requirements can make sense).
Further it might improve caching behaviour for row based caches (the quick
table is going to be queried much more often) - not sure whether this is
relevant with PostgreSQL, probably not?
Q: Can we use a VARCHAR primary key?
==
I asked in the postgres IRC channel and apparently the performance penalty of
string primary keys isn't big.
We could also use an 'internal' int sequence in addition (might be useful for
supporting ZideLook)
Motivation: the 'iCalendar' ID is a string and usually looks like a GUID.
Q: Why using VARCHAR instead of TEXT in the BLOB?
==
To quote PostgreSQL documentation:
"There are no performance differences between these three types, apart from
the increased storage size when using the blank-padded type."
So varchar(xx) is just a large TEXT. Since we intend to store mostly small
snippets of data (tiny XML fragments), I considered VARCHAR the more
appropriate type.
-14
View File
@@ -1,14 +0,0 @@
# Version file
MAJOR_VERSION=0
MINOR_VERSION=9
SUBMINOR_VERSION:=33
# v0.9.30 requires libNGiCal v4.5.48
# v0.9.26 requires libGDLContentStore v4.5.26
# v0.9.19 requires libNGiCal v4.5.40
# v0.9.18 requires libNGiCal v4.5.38
# v0.9.17 requires libNGiCal v4.5.37
# v0.9.11 requires libFoundation v1.0.63
# v0.9.11 requires libNGExtensions v4.3.125
# v0.9.7 requires libGDLAccess v1.1.35
@@ -1,35 +0,0 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with OGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
// $Id: iCalRepeatableEntityObject+OCS.h 617 2005-03-01 17:08:11Z znek $
#ifndef __OGoContentStore_iCalRepeatableEntityObject_OCS_H_
#define __OGoContentStore_iCalRepeatableEntityObject_OCS_H_
#include <NGCards/NGCards.h>
@interface iCalRepeatableEntityObject (OCS)
- (NSString *)cycleInfo;
@end
#endif /* __OGoContentStore_iCalRepeatableEntityObject_OCS_H_ */
@@ -1,29 +0,0 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with OGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
#import "iCalRepeatableEntityObject+OCS.h"
@implementation iCalRepeatableEntityObject (OCS)
@end
-108
View File
@@ -1,108 +0,0 @@
http://www.faqs.org/rfcs/rfc2798.html
Class
NAME 'inetOrgPerson'
SUP organizationalPerson
STRUCTURAL
MAY (
audio $ businessCategory $ carLicense $ departmentNumber $
displayName $ employeeNumber $ employeeType $ givenName $
homePhone $ homePostalAddress $ initials $ jpegPhoto $
labeledURI $ mail $ manager $ mobile $ o $ pager $
photo $ roomNumber $ secretary $ uid $ userCertificate $
x500uniqueIdentifier $ preferredLanguage $
userSMIMECertificate $ userPKCS12
)
MUST (
cn $ objectClass $ sn
)
MAY (
description $ destinationIndicator $ facsimileTelephoneNumber $
internationaliSDNNumber $ l $ ou $ physicalDeliveryOfficeName $
postalAddress $ postalCode $ postOfficeBox $
preferredDeliveryMethod $ registeredAddress $ seeAlso $
st $ street $ telephoneNumber $ teletexTerminalIdentifier $
telexNumber $ title $ userPassword $ x121Address
)
Properties (inetOrgPerson + organizationalPerson)
businessCategory
carLicense
departmentNumber
destinationIndicator
employeeNumber
employeeType
facsimileTelephoneNumber
givenName
homePostalAddress
initials
jpegPhoto
l
mail
manager
mobile
o
objectClass
ou
pager
physicalDeliveryOfficeName
postOfficeBox
postalCode
preferredLanguage
registeredAddress
roomNumber
secretary
seeAlso
sn
street
telephoneNumber
teletexTerminalIdentifier
title
uid
userCertificate
userPKCS12
userPassword
x121Address
audio
cn
description
displayName
homePhone
internationaliSDNNumber
labeledURI
photo
postalAddress
preferredDeliveryMethod
st
telexNumber
userSMIMECertificate
x500uniqueIdentifier
Sample:
version: 1
dn: cn=Barbara Jensen,ou=Product Development,dc=siroe,dc=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
cn: Barbara Jensen
cn: Babs Jensen
displayName: Babs Jensen
sn: Jensen
givenName: Barbara
initials: BJJ
title: manager, product development
uid: bjensen
mail: bjensen@siroe.com
telephoneNumber: +1 408 555 1862
facsimileTelephoneNumber: +1 408 555 1992
mobile: +1 408 555 1941
roomNumber: 0209
carLicense: 6ABC246
o: Siroe
ou: Product Development
departmentNumber: 2604
employeeNumber: 42
employeeType: full time
preferredLanguage: fr, en-gb;q=0.8, en;q=0.7
labeledURI: http://www.siroe.com/users/bjensen My Home Page
-30
View File
@@ -1,30 +0,0 @@
BEGIN:VEVENT
DURATION:PT1H
ATTENDEE;CN="Elke Bethke";DIR="addressbook://B156F3F0-9CFD-11D8-8561-000
D93C1A604:ABPerson":mailto:E.Bethke@Sachsen-Anhalt-Lotto.de
ATTENDEE;CN="Erik Doernenburg";DIR="addressbook://B15FCB0F-9CFD-11D8-8561
-000D93C1A604:ABPerson":mailto:erik@x101.net
ATTENDEE;CN="Christian Schnelle";DIR="addressbook://B1418D4E-9CFD-11D8-8
561-000D93C1A604:ABPerson":mailto:cs@enervation.de
ATTENDEE;CN="Chris Herrenberger";DIR="addressbook://B14A390C-9CFD-11D8-8
561-000D93C1A604:ABPerson":invalid:nomail
ATTENDEE;CN="Horst Parplies";DIR="addressbook://B19B47E5-9CFD-11D8-8561-
000D93C1A604:ABPerson":mailto:horst.parplies@freenet.de
ATTENDEE;CN="Imdat Solak";DIR="addressbook://B19EDB62-9CFD-11D8-8561-000
D93C1A604:ABPerson":mailto:imdat@solak.de
ATTENDEE;CN="Jens Enders";DIR="addressbook://B1B6819F-9CFD-11D8-8561-000
D93C1A604:ABPerson":mailto:jens.enders@skyrix.com
ATTENDEE;CN="Jens Muenster";DIR="addressbook://B1BBA42E-9CFD-11D8-8561-00
0D93C1A604:ABPerson":mailto:jens.muenster@skyrix.com
ATTENDEE;CN="Laurent Pierre";DIR="addressbook://9337C270-A825-11D8-B930-
000D93C1A604:ABPerson":mailto:laurent.pierre@linagora.com
ATTENDEE;CN="Marcel Weiher";DIR="addressbook://B1F9BB12-9CFD-11D8-8561-0
00D93C1A604:ABPerson":mailto:marcel@metaobject.co
DTSTAMP:20040520T140002Z
UID:BD91C454-AA65-11D8-84CA-000D93C1A604
SEQUENCE:3
STATUS:CONFIRMED
DTSTART;TZID=Europe/Berlin:20040618T160000
SUMMARY:SIZE EVENT
X-WR-ITIPSTATUSML:UNCLEAN
END:VEVENT
-15
View File
@@ -1,15 +0,0 @@
# $Id$
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = test
test_OBJC_FILES += test1.m
ADDITIONAL_TOOL_LIBS += -lOGoContentStore
ADDITIONAL_LIB_DIRS += -L../../$(GNUSTEP_OBJ_DIR)
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/tool.make
-include GNUmakefile.postamble
-3
View File
@@ -1,3 +0,0 @@
// $Id$
#import <Foundation/Foundation.h>
-31
View File
@@ -1,31 +0,0 @@
// $Id$
#include "common.h"
static void testurl(NSString *s) {
NSURL *url;
url = [NSURL URLWithString:s];
NSLog(@"url: %@", url);
NSLog(@" login: %@", [url user]);
NSLog(@" pwd: %@", [url password]);
}
static void test(void) {
testurl(@"http://OGoUser:OGoPwd@localhost/OGo");
testurl(@"postgresql://OGoUser:OGoPwd@localhost/OGo");
}
int main(int argc, char **argv, char **env) {
NSAutoreleasePool *pool;
pool = [[NSAutoreleasePool alloc] init];
#if LIB_FOUNDATION_LIBRARY
[NSProcessInfo initializeWithArguments:argv count:argc environment:env];
#endif
test();
[pool release];
return 0;
}
+1 -13
View File
@@ -46,11 +46,8 @@ $(SOGOBACKEND)_OBJC_FILES += \
MAPIStoreSamDBUtils.m \
MAPIStoreUserContext.m \
\
SOGoMAPIObject.m \
\
SOGoMAPIDBObject.m \
SOGoMAPIDBMessage.m \
SOGoMAPIDBFolder.m \
SOGoCacheGCSObject+MAPIStore.m \
\
MAPIStoreAppointmentWrapper.m \
MAPIStoreAttachment.m \
@@ -123,13 +120,6 @@ $(SOGOBACKEND)_OBJC_FILES += \
iCalEvent+MAPIStore.m \
iCalTimeZone+MAPIStore.m \
\
GCSSpecialQueries+OpenChange.m\
\
EOQualifier+MAPI.m \
\
EOBitmaskQualifier.m \
\
BSONCodec.m \
RTFHandler.m
@@ -147,7 +137,6 @@ $(DBMSGREADER_TOOL)_OBJC_FILES += \
$(DBMSGREADER_TOOL)_LIB_DIRS += \
-L../SoObjects/SOGo/SOGo.framework/ -lSOGo \
-L../OGoContentStore/obj/ -lOGoContentStore \
-L../SOPE/GDLContentStore/obj/ -lGDLContentStore \
-L../SOPE/NGCards/obj/ -lNGCards \
-lNGObjWeb
@@ -176,7 +165,6 @@ $(MAPISTORESOGO)_LIB_DIRS += \
$(LIBMAPISTORE_LIBS)
$(SOGOBACKEND)_LIB_DIRS += \
-L../OGoContentStore/$(GNUSTEP_OBJ_DIR)/ -lOGoContentStore \
-L../SoObjects/SOGo/SOGo.framework/ -lSOGo \
$(LIBMAPI_LIBS) \
$(LIBMAPISTORE_LIBS)
+3
View File
@@ -3,3 +3,6 @@ all:: MAPIStorePropertySelectors.m MAPIStorePropertySelectors.h
MAPIStorePropertySelectors.m MAPIStorePropertySelectors.h: gen-property-selectors.py code-MAPIStorePropertySelectors.m code-MAPIStorePropertySelectors.h
@echo " Auto-generating MAPIStorePropertySelectors.[hm]..."
@$(PYTHON) ./gen-property-selectors.py -o MAPIStorePropertySelectors $(LIBMAPISTORE_CFLAGS)
distclean clean::
-rm -f MAPIStorePropertySelectors.m MAPIStorePropertySelectors.h
+1 -1
View File
@@ -1200,7 +1200,7 @@ fromProperties: (NSDictionary *) attachmentProps
//
// we save the new/modified card
//
[sogoObject saveContentString: [newCard versitString]];
[sogoObject saveComponent: newCard];
[self updateVersions];
}
+6 -8
View File
@@ -1,8 +1,6 @@
/* MAPIStoreDBBaseContext.m - this file is part of SOGo
*
* Copyright (C) 2012 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Copyright (C) 2012-2014 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
@@ -32,7 +30,7 @@
#import "MAPIStoreDBFolder.h"
#import "MAPIStoreMapping.h"
#import "MAPIStoreUserContext.h"
#import "SOGoMAPIDBFolder.h"
#import <SOGo/SOGoCacheGCSFolder.h>
#import "MAPIStoreDBBaseContext.h"
@@ -60,7 +58,7 @@ static Class MAPIStoreDBFolderK;
- (void) ensureContextFolder
{
SOGoMAPIDBFolder *currentFolder;
SOGoCacheGCSFolder *currentFolder;
NSArray *parts;
NSMutableArray *folders;
NSString *folderName;
@@ -78,7 +76,7 @@ static Class MAPIStoreDBFolderK;
folderName = [parts objectAtIndex: count];
if ([folderName length] > 0)
{
currentFolder = [SOGoMAPIDBFolder objectWithName: folderName
currentFolder = [SOGoCacheGCSFolder objectWithName: folderName
inContainer: currentFolder];
[folders addObject: currentFolder];
}
@@ -98,11 +96,11 @@ static Class MAPIStoreDBFolderK;
- (id) rootSOGoFolder
{
SOGoMAPIDBFolder *folder;
SOGoCacheGCSFolder *folder;
[userContext ensureFolderTableExists];
folder = [SOGoMAPIDBFolder objectWithName: [isa MAPIModuleName]
folder = [SOGoCacheGCSFolder objectWithName: [isa MAPIModuleName]
inContainer: nil];
[folder setTableUrl: [userContext folderTableURL]];
// [folder reloadIfNeeded];
+9 -9
View File
@@ -32,7 +32,7 @@
#import <EOControl/EOQualifier.h>
#import <SOGo/SOGoFolder.h>
#import <SOGo/SOGoUser.h>
#import "EOQualifier+MAPI.h"
#import <SOGo/EOQualifier+SOGoCacheObject.h>
#import "MAPIStoreContext.h"
#import "MAPIStoreDBFolderTable.h"
#import "MAPIStoreDBMessage.h"
@@ -40,7 +40,7 @@
#import "MAPIStoreMapping.h"
#import "MAPIStoreTypes.h"
#import "MAPIStoreUserContext.h"
#import "SOGoMAPIDBFolder.h"
#import <SOGo/SOGoCacheGCSFolder.h>
#import "SOGoMAPIDBMessage.h"
#import "MAPIStoreDBFolder.h"
@@ -49,7 +49,7 @@
#include <mapistore/mapistore.h>
#include <mapistore/mapistore_errors.h>
static Class EOKeyValueQualifierK, SOGoMAPIDBFolderK, MAPIStoreDBFolderK;
static Class EOKeyValueQualifierK, SOGoCacheGCSFolderK, MAPIStoreDBFolderK;
static NSString *MAPIStoreRightReadItems = @"RightsReadItems";
static NSString *MAPIStoreRightCreateItems = @"RightsCreateItems";
@@ -66,7 +66,7 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
+ (void) initialize
{
EOKeyValueQualifierK = [EOKeyValueQualifier class];
SOGoMAPIDBFolderK = [SOGoMAPIDBFolder class];
SOGoCacheGCSFolderK = [SOGoCacheGCSFolder class];
MAPIStoreDBFolderK = [MAPIStoreDBFolder class];
}
@@ -92,7 +92,7 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
{
enum mapistore_error rc;
NSString *folderName, *nameInContainer;
SOGoMAPIDBFolder *newFolder;
SOGoCacheGCSFolder *newFolder;
struct SPropValue *value;
value = get_SPropValue_SRow (aRow, PidTagDisplayName);
@@ -111,7 +111,7 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
{
nameInContainer = [NSString stringWithFormat: @"0x%.16"PRIx64,
(unsigned long long) newFID];
newFolder = [SOGoMAPIDBFolderK objectWithName: nameInContainer
newFolder = [SOGoCacheGCSFolderK objectWithName: nameInContainer
inContainer: sogoObject];
[newFolder reloadIfNeeded];
[[newFolder properties] setObject: folderName
@@ -181,7 +181,7 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
[SOGoObject globallyUniqueObjectId]];
fsObject = [SOGoMAPIDBMessage objectWithName: newKey
inContainer: sogoObject];
[fsObject setObjectType: MAPIDBObjectTypeMessage];
[fsObject setObjectType: MAPIMessageCacheObject];
[fsObject reloadIfNeeded];
newMessage = [MAPIStoreDBMessage mapiStoreObjectWithSOGoObject: fsObject
inContainer: self];
@@ -198,7 +198,7 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
ownerUser = [[self userContext] sogoUser];
if ([[context activeUser] isEqual: ownerUser]
|| [self subscriberCanReadMessages])
keys = [(SOGoMAPIDBFolder *) sogoObject childKeysOfType: MAPIDBObjectTypeMessage
keys = [(SOGoCacheGCSFolder *) sogoObject childKeysOfType: MAPIMessageCacheObject
includeDeleted: NO
matchingQualifier: qualifier
andSortOrderings: sortOrderings];
@@ -211,7 +211,7 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
- (NSArray *) folderKeysMatchingQualifier: (EOQualifier *) qualifier
andSortOrderings: (NSArray *) sortOrderings
{
return [dbFolder childKeysOfType: MAPIDBObjectTypeFolder
return [dbFolder childKeysOfType: MAPIFolderCacheObject
includeDeleted: NO
matchingQualifier: qualifier
andSortOrderings: sortOrderings];
+4 -6
View File
@@ -1,8 +1,6 @@
/* MAPIStoreFallbackContext.m - this file is part of SOGo
*
* Copyright (C) 2011-2012 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Copyright (C) 2011-2014 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
@@ -26,7 +24,7 @@
#import "MAPIStoreUserContext.h"
#import "NSString+MAPIStore.h"
#import "SOGoMAPIDBFolder.h"
#import <SOGo/SOGoCacheGCSFolder.h>
#import "MAPIStoreFallbackContext.h"
@@ -51,7 +49,7 @@
inMemCtx: (TALLOC_CTX *) memCtx
{
struct mapistore_contexts_list *firstContext = NULL, *context;
SOGoMAPIDBFolder *root;
SOGoCacheGCSFolder *root;
NSArray *names;
NSUInteger count, max;
NSString *baseURL, *url, *name;
@@ -70,7 +68,7 @@
/* Maybe emsmdbp_provisioning should be fixed in order to only take the uri
returned above to avoid deleting its entries... */
root = [SOGoMAPIDBFolder objectWithName: [self MAPIModuleName]
root = [SOGoCacheGCSFolder objectWithName: [self MAPIModuleName]
inContainer: nil];
[root setOwner: userName];
userContext = [MAPIStoreUserContext userContextWithUsername: userName
+4 -6
View File
@@ -1,8 +1,6 @@
/* MAPIStoreFolder.h - this file is part of SOGo
*
* Copyright (C) 2011-2012 Inverse inc
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Copyright (C) 2011-2014 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
@@ -38,7 +36,7 @@
@class MAPIStoreMessageTable;
@class MAPIStorePermissionsTable;
@class SOGoFolder;
@class SOGoMAPIDBFolder;
@class SOGoCacheGCSFolder;
@class SOGoMAPIDBMessage;
#import "MAPIStoreSOGoObject.h"
@@ -50,7 +48,7 @@
// NSArray *faiMessageKeys;
// NSArray *folderKeys;
SOGoMAPIDBFolder *dbFolder;
SOGoCacheGCSFolder *dbFolder;
// SOGoMAPIDBFolder *faiFolder;
// SOGoMAPIDBFolder *propsFolder;
// SOGoMAPIDBMessage *propsMessage;
@@ -60,7 +58,7 @@
- (void) setupAuxiliaryObjects;
- (SOGoMAPIDBFolder *) dbFolder;
- (SOGoCacheGCSFolder *) dbFolder;
- (NSArray *) activeMessageTables;
- (NSArray *) activeFAIMessageTables;
+8 -9
View File
@@ -1,8 +1,6 @@
/* MAPIStoreFolder.m - this file is part of SOGo
*
* Copyright (C) 2011-2012 Inverse inc
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Copyright (C) 2011-2014 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
@@ -51,8 +49,9 @@
#import "NSDate+MAPIStore.h"
#import "NSString+MAPIStore.h"
#import "NSObject+MAPIStore.h"
#import "SOGoMAPIDBFolder.h"
#import <SOGo/SOGoCacheGCSFolder.h>
#import "SOGoMAPIDBMessage.h"
#import "SOGoCacheGCSObject+MAPIStore.h"
#include <gen_ndr/exchange.h>
@@ -120,7 +119,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
[userContext ensureFolderTableExists];
ASSIGN (dbFolder,
[SOGoMAPIDBFolder objectWithName: folderName
[SOGoCacheGCSFolder objectWithName: folderName
inContainer: [container dbFolder]]);
[dbFolder setTableUrl: [userContext folderTableURL]];
if (!container && [path length] > 0)
@@ -138,7 +137,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
// ASSIGN (propsMessage,
// [SOGoMAPIDBMessage objectWithName: @"properties.plist"
// inContainer: dbFolder]);
// [propsMessage setObjectType: MAPIDBObjectTypeInternal];
// [propsMessage setObjectType: MAPIInternalCacheObject];
// [propsMessage reloadIfNeeded];
[properties release];
properties = [dbFolder properties];
@@ -192,7 +191,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
[super dealloc];
}
- (SOGoMAPIDBFolder *) dbFolder
- (SOGoCacheGCSFolder *) dbFolder
{
return dbFolder;
}
@@ -1221,7 +1220,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
- (NSArray *) faiMessageKeysMatchingQualifier: (EOQualifier *) qualifier
andSortOrderings: (NSArray *) sortOrderings
{
return [dbFolder childKeysOfType: MAPIDBObjectTypeFAI
return [dbFolder childKeysOfType: MAPIFAICacheObject
includeDeleted: NO
matchingQualifier: qualifier
andSortOrderings: sortOrderings];
@@ -1531,7 +1530,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
newKey = [NSString stringWithFormat: @"%@.plist",
[SOGoObject globallyUniqueObjectId]];
dbObject = [SOGoMAPIDBMessage objectWithName: newKey inContainer: dbFolder];
[dbObject setObjectType: MAPIDBObjectTypeFAI];
[dbObject setObjectType: MAPIFAICacheObject];
[dbObject setIsNew: YES];
newMessage = [MAPIStoreFAIMessageK mapiStoreObjectWithSOGoObject: dbObject
inContainer: self];
+1 -1
View File
@@ -74,7 +74,7 @@ static Class NSNumberK;
ASSIGN (versionsMessage,
[SOGoMAPIDBMessage objectWithName: @"versions.plist"
inContainer: dbFolder]);
[versionsMessage setObjectType: MAPIDBObjectTypeInternal];
[versionsMessage setObjectType: MAPIInternalCacheObject];
}
- (void) dealloc
+4 -4
View File
@@ -59,7 +59,7 @@
#import "NSData+MAPIStore.h"
#import "NSString+MAPIStore.h"
#import "SOGoMAPIDBMessage.h"
#import "SOGoMAPIDBFolder.h"
#import <SOGo/SOGoCacheGCSFolder.h>
#import "MAPIStoreMailVolatileMessage.h"
@@ -106,7 +106,7 @@ static Class SOGoMailFolderK, MAPIStoreMailFolderK, MAPIStoreOutboxFolderK;
ASSIGN (versionsMessage,
[SOGoMAPIDBMessage objectWithName: @"versions.plist"
inContainer: dbFolder]);
[versionsMessage setObjectType: MAPIDBObjectTypeInternal];
[versionsMessage setObjectType: MAPIInternalCacheObject];
}
- (BOOL) ensureFolderExists
@@ -1172,9 +1172,9 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
- (MAPIStoreMessage *) createMessage
{
SOGoMAPIObject *childObject;
SOGoCacheObject *childObject;
childObject = [SOGoMAPIObject objectWithName: [SOGoMAPIObject
childObject = [SOGoCacheObject objectWithName: [SOGoCacheObject
globallyUniqueObjectId]
inContainer: sogoObject];
return [MAPIStoreMailVolatileMessage
+1 -1
View File
@@ -62,7 +62,7 @@
#import "NSData+MAPIStore.h"
#import "NSObject+MAPIStore.h"
#import "NSString+MAPIStore.h"
#import "SOGoMAPIObject.h"
#import <SOGo/SOGoCacheObject.h>
#import "MAPIStoreMailVolatileMessage.h"
+1 -1
View File
@@ -25,7 +25,7 @@
#import <NGExtensions/NSObject+Logs.h>
#import <EOControl/EOQualifier.h>
#import "EOBitmaskQualifier.h"
#import <SOGo/EOBitmaskQualifier.h>
#import "MAPIStoreActiveTables.h"
#import "MAPIStoreObject.h"
#import "MAPIStoreTypes.h"
+1 -1
View File
@@ -513,7 +513,7 @@
}
[vToDo setTimeStampAsDate: now];
[sogoObject saveContentString: [vCalendar versitString]];
[sogoObject saveComponent: vCalendar];
[self updateVersions];
}
+8 -5
View File
@@ -42,7 +42,7 @@
#import <Mailer/SOGoMailAccount.h>
#import <Mailer/SOGoMailAccounts.h>
#import "GCSSpecialQueries+OpenChange.h"
#import <SOGo/GCSSpecialQueries+SOGoCacheObject.h>
#import "MAPIApplication.h"
#import "MAPIStoreAuthenticator.h"
#import "MAPIStoreMapping.h"
@@ -294,9 +294,12 @@ static NSMapTable *contextsTable = nil;
if ([parts count] == 5)
{
/* If "OCSFolderInfoURL" is properly configured, we must have 5
parts in this url. */
ocFSTableName = [NSString stringWithFormat: @"socfs_%@",
[username asCSSIdentifier]];
parts in this url. We strip the '-' character in case we have
this in the domain part - like foo@bar-zot.com */
ocFSTableName = [NSString stringWithFormat: @"sogo_cache_folder_%@",
[[[user loginInDomain] asCSSIdentifier]
stringByReplacingOccurrencesOfString: @"-"
withString: @"_"]];
[parts replaceObjectAtIndex: 4 withObject: ocFSTableName];
folderTableURL
= [NSURL URLWithString: [parts componentsJoinedByString: @"/"]];
@@ -329,7 +332,7 @@ static NSMapTable *contextsTable = nil;
tableName]])
{
queries = [channel specialQueries];
query = [queries createOpenChangeFSTableWithName: tableName];
query = [queries createSOGoCacheGCSFolderTableWithName: tableName];
if ([channel evaluateExpressionX: query])
[NSException raise: @"MAPIStoreIOException"
format: @"could not create special table '%@'", tableName];
+2 -4
View File
@@ -1,8 +1,6 @@
/* dbmsgdump.m - this file is part of SOGo
*
* Copyright (C) 2011-2012 Inverse inc
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Copyright (C) 2011-2014 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
@@ -33,7 +31,7 @@
#import <Foundation/NSValue.h>
#import <NGExtensions/NSNull+misc.h>
#import "BSONCodec.h"
#import <SOGo/BSONCodec.h>
const char *indentationStep = " ";
+32
View File
@@ -0,0 +1,32 @@
/* SOGoCacheGCSObject+MAPIStore.h - this file is part of SOGo
*
* Copyright (C) 2014 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
* 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.
*/
#ifndef SOGOCACHEGCSOBJECTMAPISTORE
#define SOGOCACHEGCSOBJECTMAPISTORE
#include <SOGo/SOGoCacheGCSObject.h>
@interface SOGoCacheGCSObject (MAPIStore)
- (Class) mapistoreMessageClass;
@end
#endif // SOGOCACHEGCSOBJECTMAPISTORE
+68
View File
@@ -0,0 +1,68 @@
/* SOGoCacheGCSObject+MAPIStore.m - this file is part of SOGo
*
* Copyright (C) 2014 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
* 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/NSDictionary.h>
#import <Foundation/NSException.h>
#import <Foundation/NSString.h>
#include "MAPIStoreTypes.h"
#include "SOGoCacheGCSObject+MAPIStore.h"
@implementation SOGoCacheGCSObject (MAPIStore)
- (Class) mapistoreMessageClass
{
NSString *className, *mapiMsgClass;
switch (objectType)
{
case MAPIMessageCacheObject:
mapiMsgClass = [properties
objectForKey: MAPIPropertyKey (PidTagMessageClass)];
if (mapiMsgClass)
{
if ([mapiMsgClass isEqualToString: @"IPM.StickyNote"])
className = @"MAPIStoreNotesMessage";
else
className = @"MAPIStoreDBMessage";
//[self logWithFormat: @"PidTagMessageClass = '%@', returning '%@'",
// mapiMsgClass, className];
}
else
{
//[self warnWithFormat: @"PidTagMessageClass is not set, falling back"
// @" to 'MAPIStoreDBMessage'"];
className = @"MAPIStoreDBMessage";
}
break;
case MAPIFAICacheObject:
className = @"MAPIStoreFAIMessage";
break;
default:
[NSException raise: @"MAPIStoreIOException"
format: @"message class should not be queried for objects"
@" of type '%d'", objectType];
}
return NSClassFromString (className);
}
@end
+3 -5
View File
@@ -1,8 +1,6 @@
/* SOGoMAPIDBMessage.h - this file is part of SOGo
*
* Copyright (C) 2012 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Copyright (C) 2012-2014 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
@@ -23,12 +21,12 @@
#ifndef SOGOMAPIDBMESSAGE_H
#define SOGOMAPIDBMESSAGE_H
#import "SOGoMAPIDBObject.h"
#import <SOGo/SOGoCacheGCSObject.h>
@class NSDate;
@class NSString;
@interface SOGoMAPIDBMessage : SOGoMAPIDBObject
@interface SOGoMAPIDBMessage : SOGoCacheGCSObject
@end
#endif /* SOGOMAPIDBMESSAGE_H */
+1 -1
View File
@@ -30,7 +30,7 @@
#import <NGExtensions/NSObject+Logs.h>
#import "SOGoMAPIDBFolder.h"
#import <SOGo/SOGoCacheGCSFolder.h>
#import "SOGoMAPIDBMessage.h"
+1 -1
View File
@@ -34,7 +34,7 @@
#import <SOGo/SOGoSystemDefaults.h>
#import "MAPIStoreUserContext.h"
#import "SOGoMAPIDBObject.h"
#import <SOGo/SOGoCacheGCSObject.h>
#import "NSObject+PropertyList.m"
-37
View File
@@ -1,37 +0,0 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with OGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#ifndef __GDLContentStore_GCSFieldExtractor_H__
#define __GDLContentStore_GCSFieldExtractor_H__
#import <Foundation/NSObject.h>
@class NSString, NSMutableDictionary;
@interface GCSFieldExtractor : NSObject
{
}
- (NSMutableDictionary *)extractQuickFieldsFromContent:(NSString *)_content;
@end
#endif /* __GDLContentStore_GCSFieldExtractor_H__ */
-30
View File
@@ -1,30 +0,0 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with OGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#import "GCSFieldExtractor.h"
@implementation GCSFieldExtractor
- (NSMutableDictionary *)extractQuickFieldsFromContent:(NSString *)_content {
return nil;
}
@end /* GCSFieldExtractor */
+3 -2
View File
@@ -117,10 +117,11 @@
- (NSDictionary *) recordOfEntryWithName: (NSString *) name;
- (NSException *) writeContent: (NSString *) _content
fromComponent: (id) theComponent
container: (id) theContainer
toName: (NSString *) _name
baseVersion: (unsigned int *) _baseVersion;
- (NSException *) writeContent: (NSString *) _content
toName: (NSString *) _name;
- (NSException *) deleteContentWithName: (NSString *) _name;
- (NSException *) deleteAllContent;
+11 -19
View File
@@ -1,22 +1,22 @@
/*
Copyright (C) 2004-2007 SKYRIX Software AG
Copyright (C) 2007 Helge Hess
Copyright (c) 2008-2011 Inverse inc.
Copyright (c) 2008-2014 Inverse inc.
This file is part of OpenGroupware.org.
This file is part of SOGo.
OGo is free software; you can redistribute it and/or modify it under
SOGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
SOGo 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with OGo; see the file COPYING. If not, write to the
License along with SOGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
@@ -38,7 +38,6 @@
#import "GCSFolderManager.h"
#import "GCSFolderType.h"
#import "GCSChannelManager.h"
#import "GCSFieldExtractor.h"
#import "NSURL+GCS.h"
#import "EOAdaptorChannel+GCS.h"
#import "EOQualifier+GCS.h"
@@ -882,13 +881,14 @@ andAttribute: (EOAttribute *)_attribute
}
- (NSException *) writeContent: (NSString *) _content
toName: (NSString *) _name
fromComponent: (id) theComponent
container: (id) theContainer
toName: (NSString *) _name
baseVersion: (unsigned int *) _baseVersion
{
EOAdaptorChannel *storeChannel, *quickChannel;
NSMutableDictionary *quickRow, *contentRow;
NSDictionary *currentRow;
GCSFieldExtractor *extractor;
NSNumber *storedVersion;
BOOL isNewRecord, hasInsertDelegate, hasUpdateDelegate;
NSCalendarDate *nowDate;
@@ -944,8 +944,7 @@ andAttribute: (EOAttribute *)_attribute
|| *_baseVersion == [storedVersion unsignedIntValue])
{
/* extract quick info */
extractor = [folderInfo quickExtractor];
quickRow = [extractor extractQuickFieldsFromContent:_content];
quickRow = [theComponent performSelector: @selector(quickRecordForContainer:) withObject: theContainer];
if (quickRow)
{
[quickRow setObject:_name forKey:@"c_name"];
@@ -1080,8 +1079,8 @@ andAttribute: (EOAttribute *)_attribute
__PRETTY_FUNCTION__];
}
else
error = [self errorExtractorReturnedNoQuickRow:extractor
forContent:_content];
[self errorWithFormat:@"%s: could not extract quick row information",
__PRETTY_FUNCTION__];
}
else /* version mismatch (concurrent update) */
error = [self errorVersionMismatchBetweenStoredVersion:
@@ -1101,13 +1100,6 @@ andAttribute: (EOAttribute *)_attribute
return error;
}
- (NSException *)writeContent:(NSString *)_content toName:(NSString *)_name {
/* this method does not check for concurrent writes */
unsigned int v = 0;
return [self writeContent:_content toName:_name baseVersion:&v];
}
- (NSException *)deleteContentWithName:(NSString *)_name {
EOAdaptorChannel *storeChannel, *quickChannel;
EOAdaptorContext *adaptorCtx;
+1 -1
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 2006-2011 Inverse inc.
Copyright (C) 2006-2014 Inverse inc.
Copyright (C) 2004-2007 SKYRIX Software AG
This file is part of SOGo.
+1 -6
View File
@@ -41,7 +41,7 @@
@class NSString, NSArray, NSDictionary;
@class EOQualifier;
@class NGResourceLocator;
@class GCSFolder, GCSFieldExtractor;
@class GCSFolder;
@interface GCSFolderType : NSObject
{
@@ -50,7 +50,6 @@
NSArray *fields, *quickFields; // GCSFieldInfo objects
EOQualifier *folderQualifier; // to further limit the table set
NSString *extractorClassName;
GCSFieldExtractor *extractor;
}
+ (id)folderTypeWithName:(NSString *)_type;
@@ -67,10 +66,6 @@
- (NSString *)sqlQuickCreateWithTableName:(NSString *)_tabName;
/* quick support */
- (GCSFieldExtractor *)quickExtractor;
/* locator used to find .ocs files */
+ (NGResourceLocator *)resourceLocator;
+4 -36
View File
@@ -1,20 +1,20 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of OpenGroupware.org.
This file is part of SOGo.
OGo is free software; you can redistribute it and/or modify it under
SOGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
SOGo 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with OGo; see the file COPYING. If not, write to the
License along with SOGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
@@ -35,7 +35,6 @@
#import "GCSFolderType.h"
#import "GCSFolder.h"
#import "GCSFieldInfo.h"
#import "GCSFieldExtractor.h"
@implementation GCSFolderType
@@ -116,7 +115,6 @@
- (void) dealloc
{
[extractor release];
[extractorClassName release];
[blobTablePattern release];
[quickTablePattern release];
@@ -173,36 +171,6 @@
return sql;
}
/* quick support */
- (GCSFieldExtractor *) quickExtractor
{
Class clazz;
GCSFieldExtractor *quickExtractor;
if (!extractor)
{
clazz = (extractorClassName
? NSClassFromString (extractorClassName)
: [GCSFieldExtractor class]);
if (clazz)
{
extractor = [clazz new];
if (!extractor)
[self logWithFormat:@"ERROR: could not create field extractor of class %@",
clazz];
}
else
[self logWithFormat:@"ERROR: did not find field extractor class (%@)", extractorClassName];
}
if ([extractor isNotNull])
quickExtractor = extractor;
else
quickExtractor = nil;
return quickExtractor;
}
- (NSArray *) quickFields
{
return quickFields;
+8 -2
View File
@@ -31,7 +31,6 @@ libGDLContentStore_HEADER_FILES += \
GCSFolderManager.h \
GCSFolderType.h \
GCSChannelManager.h \
GCSFieldExtractor.h \
GCSSessionsFolder.h \
GCSSpecialQueries.h \
GCSStringFormatter.h \
@@ -48,7 +47,6 @@ libGDLContentStore_OBJC_FILES += \
GCSFolderManager.m \
GCSFolderType.m \
GCSChannelManager.m \
GCSFieldExtractor.m \
GCSSessionsFolder.m \
GCSSpecialQueries.m \
GCSStringFormatter.m \
@@ -60,6 +58,14 @@ GDLContentStore_HEADER_FILES = $(libGDLContentStore_HEADER_FILES)
GDLContentStore_OBJC_FILES = $(libGDLContentStore_OBJC_FILES)
GDLContentStore_SUBPROJECTS = $(libGDLContentStore_SUBPROJECTS)
# Type models
TYPEMODELS_DIR = $(SOGO_TYPEMODELS)
libGDLContentStore_TYPEMODELS += \
appointment.ocs \
contact.ocs \
appointment-oracle.ocs \
contact-oracle.ocs
# building
@@ -3,10 +3,10 @@
$(TYPEMODELS_DIR) :
$(MKDIRS) $(TYPEMODELS_DIR)
ocs-typemodels : $(TYPEMODELS_DIR) $(libOGoContentStore_TYPEMODELS)
@(if [ "$(libOGoContentStore_TYPEMODELS)" != "" ]; then \
ocs-typemodels : $(TYPEMODELS_DIR) $(libGDLContentStore_TYPEMODELS)
@(if [ "$(libGDLContentStore_TYPEMODELS)" != "" ]; then \
echo "Copying type models into install path ..."; \
for ff in $(libOGoContentStore_TYPEMODELS); do \
for ff in $(libGDLContentStore_TYPEMODELS); do \
cp $$ff $(TYPEMODELS_DIR)/$$ff; \
done; \
fi)
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1 -1
View File
@@ -232,7 +232,7 @@ static NSArray *privilegedTagNames = nil;
}
- (void) characters: (unichar *) _chars
length: (int) _len
length: (NSUInteger) _len
{
if (_len && _chars)
{
+3
View File
@@ -126,6 +126,9 @@ typedef enum
- (void) setCategories: (NSArray *) newCategories;
- (NSArray *) categories;
- (NSString *) photo;
- (void) setPhoto: (NSString *) _value;
// - (void) setN: (NGVCardName *) _v;
// - (NGVCardName *) n;
+19
View File
@@ -288,6 +288,25 @@
return [self uniqueChildWithTag: @"n"];
}
- (NSString *) photo
{
NGVCardPhoto *photo;
photo = (NGVCardPhoto *)[self uniqueChildWithTag: @"photo"];
return [[photo valuesAtIndex: 0 forKey: @""] objectAtIndex: 0];
}
- (void) setPhoto: (NSString *) _value
{
CardElement *photo;
photo = [self uniqueChildWithTag: @"photo"];
[photo setValue: 0 ofAttribute: @"encoding" to: @"BASE64"];
[photo setSingleValue: _value forKey: @""];
}
- (void) setOrg: (NSString *) anOrg
units: (NSArray *) someUnits
{
+4 -4
View File
@@ -217,10 +217,10 @@
printf("</%s>\n", [_localName cString]);
}
- (void)characters:(unichar *)_chars length:(int)_len {
- (void)characters:(unichar *)_chars length:(NSUInteger)_len {
NSString *str;
id tmp;
unsigned i, len;
NSUInteger i, len;
if (_len == 0) {
[self indent];
@@ -228,7 +228,7 @@
return;
}
for (i = 0; i < (unsigned)_len; i++) {
for (i = 0; i < _len; i++) {
if (_chars[i] > 255) {
NSLog(@"detected large char: o%04o d%03i h%04X",
_chars[i], _chars[i], _chars[i]);
@@ -246,7 +246,7 @@
[self indent];
printf("\"%s\"\n", [str cString]);
}
- (void)ignorableWhitespace:(unichar *)_chars length:(int)_len {
- (void)ignorableWhitespace:(unichar *)_chars length:(NSUInteger)_len {
NSString *data;
id tmp;
+4 -4
View File
@@ -22,7 +22,7 @@ sogoUserDefaultsFile = os.path.expanduser("~sogo/GNUstep/Defaults/.GNUstepDefaul
# - removes the entry in samba's ldap tree via ldbedit (NOTYET)
# - remove the user's directory under mapistore/ and mapistore/SOGo
# - cleanup Junk Folders and Sync Issues imap folders
# - Delete the socfs_ table for the username.
# - Delete the sogo_cache_folder_ table for the username.
def usage():
print """
@@ -210,7 +210,7 @@ On RHEL, install it using 'yum install MySQL-python'"""
conn = MySQLdb.connect(host=dbhost, port=int(dbport), user=dbuser, passwd=dbpass, db=dbname)
c=conn.cursor()
tablename="socfs_%s" % (username)
tablename="sogo_cache_folder_%s" % (username)
c.execute("TRUNCATE TABLE %s" % tablename)
print "Table %s emptied"
@@ -225,7 +225,7 @@ On RHEL, install it using 'yum install python-pgsql'"""
raise Exception(msg)
conn = pg.connect(host=dbhost, port=int(dbport), user=dbuser, passwd=dbpass, dbname=dbname)
tablename = "socfs_%s" % username
tablename = "sogo_cache_folder_%s" % username
conn.query("DELETE FROM %s" % tablename)
print "Table '%s' emptied" % tablename
@@ -278,7 +278,7 @@ def sqlCleanup(username):
print "Starting SQL cleanup"
OCSFolderInfoURL = getOCSFolderInfoURL()
if OCSFolderInfoURL is None:
raise Exception("Couldn't fetch OCSFolderInfoURL or it is not set. the socfs_%s table should be truncated manually" % (username))
raise Exception("Couldn't fetch OCSFolderInfoURL or it is not set. the sogo_cache_folder_%s table should be truncated manually" % (username))
# postgresql://sogo:sogo@127.0.0.1:5432/sogo/sogo_folder_info
m = re.search("(.+)://(.+):(.+)@(.+):(\d+)/(.+)/(.+)", OCSFolderInfoURL)
@@ -1,3 +1,4 @@
"Inviting the following persons is prohibited:" = "Està prohibit Convidar a les següents persones:";
"Personal Calendar" = "Calendari personal";
vevent_class0 = "(Esdeveniment públic)";
vevent_class1 = "(Esdeveniment privat)";
@@ -1,3 +1,4 @@
"Inviting the following persons is prohibited:" = "Pozvání následujících osob je zakázáno:";
"Personal Calendar" = "Osobní kalendář";
vevent_class0 = "(Veřejná událost)";
vevent_class1 = "(Soukromá událost)";
@@ -1,3 +1,4 @@
"Inviting the following persons is prohibited:" = "De volgende personen uitnodigen is niet toegestaan:";
"Personal Calendar" = "Persoonlijke agenda";
vevent_class0 = "(Publieke afspraak)";
vevent_class1 = "(Privé-afspraak)";
@@ -1,3 +1,4 @@
"Inviting the following persons is prohibited:" = "Inviting the following persons is prohibited:";
"Personal Calendar" = "Personal Calendar";
vevent_class0 = "(Public event)";
vevent_class1 = "(Private event)";
@@ -1,3 +1,4 @@
"Inviting the following persons is prohibited:" = "Seuraavien henkilöiden kutsuminen on estetty:";
"Personal Calendar" = "Henkilökohtainen kalenteri";
vevent_class0 = "(Julkinen tapahtuma)";
vevent_class1 = "(Yksityinen tapahtuma)";
@@ -1,3 +1,4 @@
"Inviting the following persons is prohibited:" = "L'invitation des personnes suivantes est interdite :";
"Personal Calendar" = "Agenda personnel";
vevent_class0 = "(Événement public)";
vevent_class1 = "(Événement privé)";
@@ -1,3 +1,4 @@
"Inviting the following persons is prohibited:" = "Das Einladen von folgenden Personen ist verboten:";
"Personal Calendar" = "Persönlicher Kalender";
vevent_class0 = "(Öffentlicher Termin)";
vevent_class1 = "(Privater Termin)";
@@ -1,3 +1,4 @@
"Inviting the following persons is prohibited:" = "A következő személyek meghívása tilos:";
"Personal Calendar" = "Személyes naptár";
vevent_class0 = "(Nyilvános esemény)";
vevent_class1 = "(Magán esemény)";
@@ -1,3 +1,4 @@
"Inviting the following persons is prohibited:" = "Invitering av følgende personer er forbudt.";
"Personal Calendar" = "Personlig kalender";
vevent_class0 = "(Offentlig hendelse)";
vevent_class1 = "(Privat hendelse)";
@@ -1,3 +1,4 @@
"Inviting the following persons is prohibited:" = "Zapraszanie następujących osób jest zakazane:";
"Personal Calendar" = "Kalendarz osobisty";
vevent_class0 = "(Wydarzenie publiczne)";
vevent_class1 = "(Wydarzenie prywatne)";
@@ -80,6 +80,8 @@ typedef enum {
- (NSArray *) calendarUIDs;
- (NSNumber *) activeTasks;
/* vevent UID handling */
- (NSString *) resourceNameForEventUID: (NSString *) _uid;
+107 -13
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 2007-2013 Inverse inc.
Copyright (C) 2007-2014 Inverse inc.
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of SOGo.
@@ -230,6 +230,8 @@ static iCalEvent *iCalEventK = nil;
abstract: NO
withEquivalent: SoPerm_AddDocumentsImagesAndFiles
asChildOf: davElement (@"write", XMLNS_WEBDAV)];
/* read-acl and write-acl are defined in RFC3744 */
[aclManager registerDAVPermission: davElement (@"admin", nsI)
abstract: YES
withEquivalent: nil
@@ -242,6 +244,72 @@ static iCalEvent *iCalEventK = nil;
abstract: YES
withEquivalent: SoPerm_ChangePermissions
asChildOf: davElement (@"admin", nsI)];
/* Default permissions for calendars. These are very important so that DAV client can
detect permission changes on calendars and reload all items, if necessary */
/* Public ones */
[aclManager registerDAVPermission: davElement (@"viewwhole-public-records", nsI)
abstract: YES
withEquivalent: SOGoCalendarPerm_ViewWholePublicRecords
asChildOf: davElement (@"admin", nsI)];
[aclManager registerDAVPermission: davElement (@"viewdant-public-records", nsI)
abstract: YES
withEquivalent: SOGoCalendarPerm_ViewDAndTOfPublicRecords
asChildOf: davElement (@"admin", nsI)];
[aclManager registerDAVPermission: davElement (@"modify-public-records", nsI)
abstract: YES
withEquivalent: SOGoCalendarPerm_ModifyPublicRecords
asChildOf: davElement (@"admin", nsI)];
[aclManager registerDAVPermission: davElement (@"respondto-public-records", nsI)
abstract: YES
withEquivalent: SOGoCalendarPerm_RespondToPublicRecords
asChildOf: davElement (@"admin", nsI)];
/* Private ones */
[aclManager registerDAVPermission: davElement (@"viewwhole-private-records", nsI)
abstract: YES
withEquivalent: SOGoCalendarPerm_ViewWholePrivateRecords
asChildOf: davElement (@"admin", nsI)];
[aclManager registerDAVPermission: davElement (@"viewdant-private-records", nsI)
abstract: YES
withEquivalent: SOGoCalendarPerm_ViewDAndTOfPrivateRecords
asChildOf: davElement (@"admin", nsI)];
[aclManager registerDAVPermission: davElement (@"modify-private-records", nsI)
abstract: YES
withEquivalent: SOGoCalendarPerm_ModifyPrivateRecords
asChildOf: davElement (@"admin", nsI)];
[aclManager registerDAVPermission: davElement (@"respondto-private-records", nsI)
abstract: YES
withEquivalent: SOGoCalendarPerm_RespondToPrivateRecords
asChildOf: davElement (@"admin", nsI)];
/* Condifential ones */
[aclManager registerDAVPermission: davElement (@"viewwhole-confidential-records", nsI)
abstract: YES
withEquivalent: SOGoCalendarPerm_ViewWholeConfidentialRecords
asChildOf: davElement (@"admin", nsI)];
[aclManager registerDAVPermission: davElement (@"viewdant-confidential-records", nsI)
abstract: YES
withEquivalent: SOGoCalendarPerm_ViewDAndTOfConfidentialRecords
asChildOf: davElement (@"admin", nsI)];
[aclManager registerDAVPermission: davElement (@"modify-confidential-records", nsI)
abstract: YES
withEquivalent: SOGoCalendarPerm_ModifyConfidentialRecords
asChildOf: davElement (@"admin", nsI)];
[aclManager registerDAVPermission: davElement (@"respondto-confidential-records", nsI)
abstract: YES
withEquivalent: SOGoCalendarPerm_RespondToConfidentialRecords
asChildOf: davElement (@"admin", nsI)];
}
return aclManager;
@@ -522,7 +590,6 @@ static iCalEvent *iCalEventK = nil;
{
/* this is used for group calendars (this folder just returns itself) */
NSString *s;
s = [[self container] nameInContainer];
// [self logWithFormat:@"CAL UID: %@", s];
return [s isNotNull] ? [NSArray arrayWithObjects:&s count:1] : nil;
@@ -916,7 +983,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
{
if ([dateRange containsDate: [component startDate]])
{
newRecord = [self fixupRecord: [component quickRecord]];
newRecord = [self fixupRecord: [component quickRecordForContainer: self]];
[ma replaceObjectAtIndex: recordIndex withObject: newRecord];
}
else
@@ -932,7 +999,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
{
// The recurrence id of the exception is outside the date range;
// simply add the exception to the records array
newRecord = [self fixupRecord: [component quickRecord]];
newRecord = [self fixupRecord: [component quickRecordForContainer: self]];
newRecordRange = [NGCalendarDateRange
calendarDateRangeWithStartDate: [newRecord objectForKey: @"startDate"]
endDate: [newRecord objectForKey: @"endDate"]];
@@ -1280,13 +1347,20 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
[baseWhere addObject: privacySQLString];
if ([title length])
[baseWhere
addObject: [NSString stringWithFormat: @"c_title isCaseInsensitiveLike: '%%%@%%'",
if ([filters length])
{
if ([filters isEqualToString:@"title_Category_Location"] || [filters isEqualToString:@"entireContent"])
{
[baseWhere addObject: [NSString stringWithFormat: @"(c_title isCaseInsensitiveLike: '%%%@%%' OR c_category isCaseInsensitiveLike: '%%%@%%' OR c_location isCaseInsensitiveLike: '%%%@%%')",
[title stringByReplacingString: @"'" withString: @"\\'\\'"],
[title stringByReplacingString: @"'" withString: @"\\'\\'"],
[title stringByReplacingString: @"'" withString: @"\\'\\'"]]];
}
}
else
[baseWhere addObject: [NSString stringWithFormat: @"c_title isCaseInsensitiveLike: '%%%@%%'",
[title stringByReplacingString: @"'" withString: @"\\'\\'"]]];
if ([filters length])
[baseWhere addObject: [NSString stringWithFormat: @"(%@)", filters]];
/* prepare mandatory fields */
fields = [NSMutableArray arrayWithArray: _fields];
@@ -2960,7 +3034,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
[content appendFormat: @"%@\n", [timezone versitString]];
[content appendFormat: @"%@\nEND:VCALENDAR", [event versitString]];
return ([object saveContentString: content] == nil) ? uid : nil;
return ([object saveCalendar: [iCalCalendar parseSingleFromSource: content]] == nil) ? uid : nil;
}
/**
@@ -2973,7 +3047,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
NSArray *vtimezones;
NSMutableArray *components;
NSMutableDictionary *timezones, *uids;
NSString *tzId, *uid, *originalUid, *content;
NSString *tzId, *uid, *originalUid;
iCalEntityObject *element;
iCalDateTime *startDate;
iCalTimeZone *timezone;
@@ -3101,8 +3175,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
[masterCalendar addToEvents: event];
if (timezone)
[masterCalendar addTimeZone: timezone];
content = [masterCalendar versitString];
[master saveContentString: content];
[master saveCalendar: masterCalendar];
continue;
}
}
@@ -3263,4 +3336,25 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
return users;
}
- (NSNumber *) activeTasks
{
NSArray *tasksList;
NSMutableArray *fields;
NSNumber *activeTasks;
fields = [NSMutableArray arrayWithObjects: @"c_component", @"c_status", nil];
tasksList = [self bareFetchFields: fields
from: nil
to: nil
title: nil
component: @"vtodo"
additionalFilters: @"c_status != 1 AND c_status != 3"];
activeTasks = [NSNumber numberWithInt:[tasksList count]];
return activeTasks;
}
@end /* SOGoAppointmentFolder */
@@ -1,7 +1,7 @@
/* SOGoAppointmentFolders.m - this file is part of SOGo
*
* Copyright (C) 2007-2013 Inverse inc.
* Copyright (C) 2007-2014 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
@@ -56,13 +56,6 @@
#import "SOGoAppointmentFolders.h"
@interface SOGoParentFolder (Private)
- (NSException *) _fetchPersonalFolders: (NSString *) sql
withChannel: (EOAdaptorChannel *) fc;
@end
static SoSecurityManager *sm = nil;
@implementation SOGoAppointmentFolders
@@ -596,8 +589,9 @@ static SoSecurityManager *sm = nil;
}
}
- (NSException *) _fetchPersonalFolders: (NSString *) sql
withChannel: (EOAdaptorChannel *) fc
- (NSException *) fetchSpecialFolders: (NSString *) sql
withChannel: (EOAdaptorChannel *) fc
andFolderType: (SOGoFolderType) folderType
{
BOOL isWebRequest;
NSException *error;
@@ -607,7 +601,7 @@ static SoSecurityManager *sm = nil;
SOGoWebAppointmentFolder *webFolder;
NSString *name;
error = [super _fetchPersonalFolders: sql withChannel: fc];
error = [super fetchSpecialFolders: sql withChannel: fc andFolderType: folderType];
if (!error)
{
isWebRequest = [[context request] handledByDefaultHandler];
@@ -756,7 +750,8 @@ static SoSecurityManager *sm = nil;
for (userCount = 0; userCount < userMax; userCount++)
[currentFolder
subscribeUserOrGroup: [proxySubscribers objectAtIndex: userCount]
reallyDo: YES];
reallyDo: YES
response: nil];
}
}
}
@@ -781,7 +776,8 @@ static SoSecurityManager *sm = nil;
for (userCount = 0; userCount < userMax; userCount++)
[currentFolder
subscribeUserOrGroup: [proxySubscribers objectAtIndex: userCount]
reallyDo: NO];
reallyDo: NO
response: nil];
}
}
}
@@ -1,8 +1,6 @@
/* SOGoAppointmentInboxFolder.m - this file is part of SOGo
*
* Copyright (C) 2010 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Copyright (C) 2010-2014 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
@@ -1,5 +1,5 @@
/*
Copyright (C) 2007-2011 Inverse inc.
Copyright (C) 2007-2014 Inverse inc.
This file is part of SOGo
File diff suppressed because it is too large. Load diff
@@ -1,6 +1,6 @@
/* SOGoCalendarComponent.h - this file is part of SOGo
*
* Copyright (C) 2006-2013 Inverse inc.
* Copyright (C) 2006-2014 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
+19 -2
View File
@@ -169,6 +169,11 @@
DESTROY(originalCalendar);
}
- (Class *) parsingClass
{
return [iCalCalendar class];
}
- (NSString *) davContentType
{
return @"text/calendar";
@@ -662,7 +667,7 @@
- (NSException *) saveCalendar: (iCalCalendar *) newCalendar
{
[self saveContentString: [newCalendar versitString]];
[super saveComponent: newCalendar];
return nil;
}
@@ -1193,7 +1198,19 @@
[NSString stringWithFormat: @"%@.ics", newUID]
inContainer: newFolder];
return [newComponent saveContentString: [calendar versitString]];
return [newComponent saveCalendar: calendar];
}
- (NSException *) moveToFolder: (SOGoGCSFolder *) newFolder
{
NSException *ex;
ex = [self copyToFolder: newFolder];
if (!ex)
ex = [self delete];
return ex;
}
#warning Should we not remove the concept of Organizer and Participant roles?
Loaded 100 of 469 files, more files were not shown because too many files have changed in this diff. Show more