Commit Graph

111 Commits (d6d3e49158ec6b569e5c0db4d98efb3b7e3a4747)

Author SHA1 Message Date
Patrice Levesque 2de72e5070 Partly revert recent changes removing #imports and #includes, under OpenChange, as they cause more problems than they solve. 2016-02-17 10:09:18 -05:00
Patrice Levesque bd56f4cf9f Remove pointless #include from .m and .h files
This was done with a brute-force approach, ensuring no additional
warnings from GCC 4.9 under x86_64.
2016-02-13 17:41:54 -05:00
Patrice Levesque 7c25b53fdf Remove pointless #imports from .m and .h files
This was done with a brute-force approach, ensuring no additional
warnings from GCC 4.9 under x86_64.
2016-02-13 16:11:52 -05:00
Ludovic Marcotte ae6ed0c055 (feat) applied all changes as a patch coming from PR #180 2015-12-30 09:22:08 -05:00
Ludovic Marcotte 18a300ca5b (fix) appplied fix from Zentyal - PR#102
Original commit: 33a1d2c397
2015-09-09 08:22:33 -04:00
Ludovic Marcotte f515106bcc (fix) added patch from PR93 2015-08-03 09:16:55 -04:00
Jesús García Sáez b7907d654d Merge pull request #127 from Zentyal/jkerihuel/asynchronous-notifications
[oxcnotif] Delete deprecated notification code
2015-04-22 12:45:20 +02:00
Julien Kerihuel d4930a7960 oc: Remove deprecated notification code. 2015-04-16 16:04:47 +02:00
Enrique J. Hernández Blasco bddd67fb93 oc: Enforce the folder creation mapping when the FID exists
We believe the folder ID OpenChange is sending us is new
and we keep the indexing database properly updated.

Although the solution is not elegant, this could avoid
inconsistencies between what the client stores and the
relation in the MAPIStore backend.
2015-04-13 11:48:42 +02:00
Enrique J. Hernández Blasco 8ee2303e78 oc: Empty ACL from a folder works with several users
The `[SOGoFolder:aclUsers]` returns a reference to a `NSArray`
which is being modified in the `for` loop making fail when
more than one user is in the ACL with `NSRangeException`.
2015-03-19 00:06:14 +01:00
Enrique J. Hernández Blasco b01de763da oc: Move back and forth folders now are in sync
Two different indexing entries were created on move operation making
impossible to restore old folder position in the original parent folder.
This was due to cleanupCaches message calls to objectId which requires
to have the indexing entry available.

Use case:

  * Restore a folder from "Deleted items" folders
2015-01-27 18:27:11 +01:00
Enrique J. Hernández Blasco 99a36be034 oc: Remove a source folder on move folder operation
Calling deleteFolder message to actually remove it from DB/IMAP
depending on the class.
2015-01-21 12:44:31 +01:00
Jesús García Sáez f9550b9181 oc: several uninitialized variables 2015-01-19 15:35:44 +01:00
Enrique J. Hernández Blasco dba17fbcbc Create child folder objects using parent context for real
We activate the user for the context using the root folder
context as there are times where the active user is not
matching with the one stored in the application context
and SOGo object is storing cached data with the wrong user
leading to create folders in wrong mailboxes, etc.

As this application is single-threaded, no problems are expected.
Indeed, the same code is available at getting the root folder (ie INBOX).
2014-12-16 23:43:57 +01:00
Enrique J. Hernández Blasco 067809ef1c Store changeNumber maps with modseq in cache for subfolders
By getting the root folder/container whose properties
are stored in OpenChange DB.

This makes the synchronisation of sub-folders faster as
when we evaluate restrictions for this folder, we are able
to get the modseq from where to get the latest messages
unseen by the client.
2014-12-01 23:19:38 +01:00
Enrique J. Hernández Blasco ef7b919175 Return MAPISTORE_ERR_NOT_FOUND when a mail is indexed but not in IMAP server
And remove that entry from the indexing table.

This avoids to crash getting properties from a no longer available message
in the IMAP server, for instance, the `PidTagPredecessorChangeList` attribute.
2014-11-19 17:12:32 +01:00
Enrique J. Hernández Blasco 3910769ae8 oc-folder: Uniform call to deleteMessageWithMID
To make sure flags argument is used accordingly with the specs
and not working by chance.
2014-11-19 17:12:31 +01:00
Enrique J. Hernández Blasco b67e1deda5 oc-folder: Make deleted items synched when shared
By keeping mid on moving messages by soft deleting and
only if srcMid is different from targetMid.

This makes restore/shared deleted items work.

It also requires to do the following to work smoothly:

* Do not add soft-deleted messages in ensureIDsForChildKeys
* Return soft-deleted messages on getDeletedFMIDs
* Do not register a new mid if the URL is matched with soft deleted messages
2014-11-19 17:12:31 +01:00
Enrique J. Hernández Blasco be60fdebcc oc-folder: Flags are now used in indexing db when deleting a msg
Unregistering the URL in indexing db accordingly to the flags (SOFT or HARD)
2014-11-19 17:12:30 +01:00
Kamen Mazdrashki dd7200e00f openchange/MAPIStoreFolder: Add private selector for actual folder delete action
Usually, it is a bad idea for an object to call its own public methods
(just like in this case). Thus separating impelementation for deleteFolder:
would allow MAPIStoreFolder to call only private implementation when needed

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:58:33 +02: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 41e6fb89d3 Renamed constants in preparation for the big cache cleanup 2014-05-13 17:54:02 -04:00
Ludovic Marcotte 93f9a7273e Now handle mem context when saving messages and removed useless debugging. 2013-03-13 15:04:11 -04:00
Ludovic Marcotte 4804337a01 Now pass the memory context when copying/moving folders. 2012-12-07 13:30:50 -05:00
Ludovic Marcotte 2017536beb move_copy_messages now uses the openchange's memory context.
This fixes strange crashes when dealing with invitations and
other stuff. More work will need to be done in this regard. Also
kept the old code just in case for now. Will be cleaned up shortly
after more people test it.
2012-12-03 09:18:17 -05:00
Wolfgang Sourdeau 63abe73c29 ensureIDsForChildKeys: new helper method that ensure that the child keys have a corresponding fmid and register them with -[MAPIStoreMapping registerURLs:withIDs:] if needed 2012-10-12 23:28:47 -04:00
Wolfgang Sourdeau 37e8f7ca98 "preload_message_bodies" now take an additional "enum mapistore_table_type" argument 2012-10-10 10:38:25 -04:00
Wolfgang Sourdeau a7691c552b Renamed -preloadMessageBodies: to preloadMessageBodiesWithMIDs: and perform a conversion of MIDs to message keys instead of the subclass code 2012-10-06 13:01:44 -04:00
Wolfgang Sourdeau 46c82286d8 Added -childKeyFromURL: as translation method and refactored -lookupMessageByURL: and -lookupFolderByURL: to make use of it 2012-10-05 13:51:58 -04:00
Wolfgang Sourdeau 671ce26a48 struct UI8Array_r replaces struct I8Array_r 2012-10-05 09:59:45 -04:00
Wolfgang Sourdeau eca09c87cc Implemented the folder.preload_message_bodies backend op 2012-10-05 09:55:01 -04:00
Wolfgang Sourdeau 08eb4d9f84 Only fetch subfolders when they are supported 2012-09-27 19:23:56 -04:00
Wolfgang Sourdeau 2760e35f15 PidTagAccessLevel should not be set on folder objects 2012-09-26 09:26:38 -04:00
Wolfgang Sourdeau 9669cd37c4 One comment and one header added. 2012-09-18 10:12:36 -04:00
Wolfgang Sourdeau fc62d76b1f Monotone-Parent: 7c8fce0426b2ec4def5226f16a9bcf2cff5dcfb9
Monotone-Revision: 1cc99cc487a5bfdb791d4067042b904d7eb47795

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-09-07T16:46:18
Monotone-Branch: ca.inverse.sogo
2012-09-07 16:46:18 +00:00
Wolfgang Sourdeau f1c5ee15b7 Monotone-Parent: 30720cd63a96f71fe1ddecf048357f4063f4a056
Monotone-Revision: c61e2dc9a2d1575387224156c338b5517bdcbae1

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-21T20:39:36
Monotone-Branch: ca.inverse.sogo
2012-08-21 20:39:36 +00:00
Wolfgang Sourdeau bde4b22ba7 Monotone-Parent: 572391072fa416635b9921d39ed76478ed762097
Monotone-Revision: 105b571703ff5c4cc1024854ef8a1d987aef2bf1

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-17T19:04:57
Monotone-Branch: ca.inverse.sogo
2012-08-17 19:04:57 +00:00
Wolfgang Sourdeau fb297c913c Monotone-Parent: 1fb3121c84e0bb2773973fcfde109c7b26530951
Monotone-Revision: e2f910a1982b774a3f5dfd586d968821441f2076

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-17T17:56:25
Monotone-Branch: ca.inverse.sogo
2012-08-17 17:56:25 +00:00
Wolfgang Sourdeau 47afdfcd40 Monotone-Parent: de4fcfa81509a5dd3cc5acd2a1c6ba7c97653649
Monotone-Revision: 85e37dbc7e87a173193494e6234f460788904318

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-15T13:13:15
Monotone-Branch: ca.inverse.sogo
2012-08-15 13:13:15 +00:00
Wolfgang Sourdeau 45974ec74b Monotone-Parent: 5599b85afd7e2707325836a3b533b900d96b8b0c
Monotone-Revision: 570b17715b63da450bef9fde6d9c95288911034f

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-15T01:02:08
Monotone-Branch: ca.inverse.sogo
2012-08-15 01:02:08 +00:00
Wolfgang Sourdeau de46251676 Monotone-Parent: 2042b5fba4b0e3a86f1181c84e675df4953329e4
Monotone-Revision: 3b8c41adf2fbd28bd91312ef68f3f4faa8ef381f

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-13T19:42:08
Monotone-Branch: ca.inverse.sogo
2012-08-13 19:42:08 +00:00
Wolfgang Sourdeau 9b5e7360d0 Monotone-Parent: 047b040e318a98223980da2af8241b7eb6d75341
Monotone-Revision: 2fea5fbc833aa109f5048dda8ddd9884c91385e1

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-13T03:56:16
Monotone-Branch: ca.inverse.sogo
2012-08-13 03:56:16 +00:00
Wolfgang Sourdeau 32af60c24f Monotone-Parent: 9f415bbce0de3939851adeff8e3f25986b8630f7
Monotone-Revision: 1bf1a3f87feb2c04469fcff28770c25704ee5aab

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-10T14:08:40
Monotone-Branch: ca.inverse.sogo
2012-08-10 14:08:40 +00:00
Wolfgang Sourdeau 700d23e80e Monotone-Parent: 3ded00a80ce87781ff6767f6fe38a12735a48340
Monotone-Revision: af0fb5901615e40ad3549c59f74f88bb33f9b392

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-09T19:43:17
Monotone-Branch: ca.inverse.sogo
2012-08-09 19:43:17 +00:00
Wolfgang Sourdeau 95a443d89a Monotone-Parent: 3f8608c82d9c379cc9e0fea6ffe853cc1949a24b
Monotone-Revision: 905276f295d6f28a6946297f6a7af9ad60f71842

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-06-29T17:59:38
Monotone-Branch: ca.inverse.sogo
2012-06-29 17:59:38 +00:00
Wolfgang Sourdeau b4d8609236 Monotone-Parent: c8921f898d8810ab70f86851a0449a28dc34eb89
Monotone-Revision: ccc94ebd9d872963c33041a7cac766343762bef2

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-06-01T15:15:30
Monotone-Branch: ca.inverse.sogo
2012-06-01 15:15:30 +00:00
Wolfgang Sourdeau baafa421ab Monotone-Parent: 28f447e944f764132e7461e3945a83c23938d406
Monotone-Revision: 284725383e8970e66810d4b8facf4af043b77fe2

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-03-16T20:56:01
Monotone-Branch: ca.inverse.sogo
2012-03-16 20:56:01 +00:00
Wolfgang Sourdeau 67e5fbb45d Monotone-Parent: 963f8aef47900b44cad8c81119ac151b6fc74c3a
Monotone-Revision: e1a25e44c867d0cebafca83f2e8a1655f81674e6

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-03-13T21:16:12
Monotone-Branch: ca.inverse.sogo
2012-03-13 21:16:12 +00:00