propagate from branch 'ca.inverse.sogo.1_3_13' (head 9cacc7ba282ab08c75e02952d2f95a3f5bdf9010)
to branch 'ca.inverse.sogo' (head b3c1d7bab2024077b5c89d49297c6ceb5bc5aa0e) Monotone-Parent: 9cacc7ba282ab08c75e02952d2f95a3f5bdf9010 Monotone-Parent: b3c1d7bab2024077b5c89d49297c6ceb5bc5aa0e Monotone-Revision: 7fc3840c26038b9a53ac374b2e5b17f2ceeb99ab Monotone-Author: jraby@inverse.ca Monotone-Date: 2012-03-15T21:02:00 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
commit
0f568210fc
163
ChangeLog
163
ChangeLog
|
@ -41,13 +41,99 @@
|
||||||
* UI/WebServerResources/UIxAclEditor.js (addUser): fixed
|
* UI/WebServerResources/UIxAclEditor.js (addUser): fixed
|
||||||
positioning of new user.
|
positioning of new user.
|
||||||
|
|
||||||
|
2012-03-13 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreCalendarFolder.m
|
||||||
|
(-getPidTagDefaultPostMessageClass:inMemCtx:): new getter.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreFolder.m
|
||||||
|
(_modifyPermissionEntryForUser:withRoles:isAddition:withACLFolder:):
|
||||||
|
skip any modification when user is nil.
|
||||||
|
(_usernameFromEntryId:): when the bytes array is nil or is empty,
|
||||||
|
we return a nil username.
|
||||||
|
(-modifyPermissions:withCount:andFlags:): ignore the presence of
|
||||||
|
certain fields but not others depending on the requested
|
||||||
|
modification.
|
||||||
|
|
||||||
2012-03-12 Francis Lachapelle <flachapelle@inverse.ca>
|
2012-03-12 Francis Lachapelle <flachapelle@inverse.ca>
|
||||||
|
|
||||||
* SoObjects/SOGo/WORequest+SOGo.m (-isIPhoneAddressBookApp): catch
|
* SoObjects/SOGo/WORequest+SOGo.m (-isIPhoneAddressBookApp): catch
|
||||||
the user agent of iOS 5.0.1 on iPad.
|
the user agent of iOS 5.0.1 on iPad.
|
||||||
|
|
||||||
|
2012-03-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreGCSFolder.m (-lastMessageModificationTime):
|
||||||
|
force a synchronisation from here to ensure that the cache is
|
||||||
|
up-to-date.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreTypes.m (_reverseCN): fixed used of ull
|
||||||
|
constants on 32 bit platforms.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreGCSFolder.m (-componentQualifier): now
|
||||||
|
provided by the parent class itself.
|
||||||
|
(-contentComponentQualifier): new method that returns a qualifier
|
||||||
|
that translated to "c_content like '%BEGIN:XXX%'". This is a hack
|
||||||
|
to work-around the fact that calendar folders may content both
|
||||||
|
vevent and vtodo and that c_component, being part of the quick
|
||||||
|
table, is no longer available when a record is deleted.
|
||||||
|
(-synchroniseCache): update version values for deleted records
|
||||||
|
too, by taking into account the fact that their c_version value
|
||||||
|
might still be 0. Make use of contentComponentQualifier above.
|
||||||
|
Remove the modified records from the SOGoGCSFolder cache.
|
||||||
|
(-getDeletedKeysFromChangeNumber:andCN:inTableType:): wander the
|
||||||
|
list of deleted records and no longer increase the change number,
|
||||||
|
as this is now done from "synchroniseCache". Also, handle the case
|
||||||
|
were deleted records might already have been reported by comparing
|
||||||
|
their change number to the one provided as parameter. The
|
||||||
|
resulting change number is now guaranteed to be the highest one.
|
||||||
|
(-component): new subclassable method that returns a string
|
||||||
|
matching the folder's handled component.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreFolder.m
|
||||||
|
(-getPidTagLocalCommitTimeMax:inMemCtx:): returns
|
||||||
|
MAPISTORE_ERR_NOT_FOUND if the resulting date is nil.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreGCSMessage.m
|
||||||
|
(-getPidTagPredecessorChangeList:inMemCtx:): when the list is
|
||||||
|
missing, request a synchronisation from the container as the
|
||||||
|
message might now have been synchronised yet...
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreTypes.m (MAPICNCompare): new function that
|
||||||
|
returns an NSComparisonResult for two change numbers (reverse
|
||||||
|
format).
|
||||||
|
|
||||||
|
2012-03-11 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreCalendarMessage.m
|
||||||
|
(-getPidLidAppointmentMessageClass:inMemCtx:): returns "IPM.Appointment".
|
||||||
|
(-getPidLidSideEffects:inMemCtx:): returns the value specified in
|
||||||
|
OXOCAL, section 2.2.2.2.
|
||||||
|
(_fixupAppointmentObjectWithUID:): renamed method and made more
|
||||||
|
generic, in order to handle the case where the response record has
|
||||||
|
already been deleted.
|
||||||
|
(-save): handle organizer and attendees more in compliance with
|
||||||
|
the spec, in order to avoid ending up with an empty event when an
|
||||||
|
invitation is being replied to. Of course, the documentation
|
||||||
|
happened to be inexact with regardes to the value of
|
||||||
|
"PidTagRecipientTrackStatus", which can be 5 even though the user
|
||||||
|
replied with another value... Also, lowered the priority of
|
||||||
|
SOGo-specific hacks for setting the organizer.
|
||||||
|
|
||||||
2012-03-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2012-03-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreMailVolatileMessage.m (-submitWithFlags:):
|
||||||
|
skip any message that is not of class "IPM.Note", in order to
|
||||||
|
avoid sending invitations or responses.
|
||||||
|
|
||||||
|
* SoObjects/Mailer/SOGoMailFolder.m (-renameTo:): reset the
|
||||||
|
imap4URL to nil and change the nameInContainer after a successful
|
||||||
|
operation.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreFolder.m
|
||||||
|
(-getTable:andRowCount:tableType:andHandleId:): if the current
|
||||||
|
user is not the owner of the folder, the permissions table cannot
|
||||||
|
be open and MAPISTORE_ERR_DENIED is now returned.
|
||||||
|
|
||||||
* SoObjects/Contacts/NGVCard+SOGo.m
|
* SoObjects/Contacts/NGVCard+SOGo.m
|
||||||
(_setupEmailFieldsInLDIFRecord:): the value of card elements were
|
(_setupEmailFieldsInLDIFRecord:): the value of card elements were
|
||||||
not properly extracted when no email field were of type "home" or
|
not properly extracted when no email field were of type "home" or
|
||||||
|
@ -59,6 +145,27 @@
|
||||||
attributes of document.body before calling "hasClassName" to fix
|
attributes of document.body before calling "hasClassName" to fix
|
||||||
an error with IE9.
|
an error with IE9.
|
||||||
|
|
||||||
|
2012-03-08 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreFolder.m: commented out key cache ivars
|
||||||
|
(temporarily).
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreContext.m (-getRootFolder:inMemCtx:): do not
|
||||||
|
store the looked up folders when they are not descendants of
|
||||||
|
SOGoObject. Return MAPISTORE_ERR_NOT_FOUND when the looked up
|
||||||
|
folder is owner by the current user and MAPISTORE_ERR_DENIED
|
||||||
|
otherwise.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreGCSFolder.m (-synchroniseCache): ensure that
|
||||||
|
any record that are marked as updated are removed from the record
|
||||||
|
cache of the corresponding SOGoGCSFolder instance.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreFolder.m (-getPidTagSubFolders:inMemCtx:):
|
||||||
|
invoke [self folderKeys] rather than the corresponding ivar.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreTypes.m (NSObjectFromMAPISPropValue)
|
||||||
|
(NSObjectFromSPropValue): treat PT_ERROR just as PT_LONG.
|
||||||
|
|
||||||
2012-03-06 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2012-03-06 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
* SoObjects/Mailer/SOGoMailFolder.m
|
* SoObjects/Mailer/SOGoMailFolder.m
|
||||||
|
@ -70,6 +177,37 @@
|
||||||
where the home mail would be taken for both first and second email
|
where the home mail would be taken for both first and second email
|
||||||
fields when no work mail was present.
|
fields when no work mail was present.
|
||||||
|
|
||||||
|
2012-03-02 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreAppointmentWrapper.m,,
|
||||||
|
OpenChange/MAPIStoreAttachment.m,
|
||||||
|
OpenChange/MAPIStoreCalendarAttachment.m,
|
||||||
|
OpenChange/MAPIStoreCalendarMessage.m,
|
||||||
|
OpenChange/MAPIStoreContactsAttachment.m,
|
||||||
|
OpenChange/MAPIStoreContactsMessage.m,
|
||||||
|
OpenChange/MAPIStoreFAIMessage.m,
|
||||||
|
OpenChange/MAPIStoreFSMessageTable.m,
|
||||||
|
OpenChange/MAPIStoreFolder.m, OpenChange/MAPIStoreFolderTable.m,
|
||||||
|
OpenChange/MAPIStoreGCSFolder.m, OpenChange/MAPIStoreGCSMessage.m,
|
||||||
|
OpenChange/MAPIStoreGCSMessageTable.m,
|
||||||
|
OpenChange/MAPIStoreMailAttachment.m,
|
||||||
|
OpenChange/MAPIStoreMailFolder.m,
|
||||||
|
OpenChange/MAPIStoreMailMessage.m,
|
||||||
|
OpenChange/MAPIStoreMailMessageTable.m,
|
||||||
|
OpenChange/MAPIStoreMessage.m, OpenChange/MAPIStoreNotesMessage.m,
|
||||||
|
OpenChange/MAPIStoreObject.m,
|
||||||
|
OpenChange/MAPIStorePermissionsTable.m,
|
||||||
|
OpenChange/MAPIStoreTasksMessage.m,
|
||||||
|
OpenChange/MAPIStoreVolatileMessage.m: updated name of getters to
|
||||||
|
reflect the new nomenclature.
|
||||||
|
|
||||||
|
* OpenChange/NSArray+MAPIStore.[hm]: updated to new name of
|
||||||
|
handled structs.
|
||||||
|
|
||||||
|
* OpenChange/gen-property-selectors.py: adapted for new getters
|
||||||
|
name, based on new property names. Added all new clashing
|
||||||
|
properties to bannedProps.
|
||||||
|
|
||||||
2012-03-02 Jean Raby <jraby@inverse.ca>
|
2012-03-02 Jean Raby <jraby@inverse.ca>
|
||||||
|
|
||||||
* Scripts/sogo-backup.sh: new script to automate backups.
|
* Scripts/sogo-backup.sh: new script to automate backups.
|
||||||
|
@ -92,6 +230,31 @@
|
||||||
* UI/WebServerResources/ContactsUI.js (appendAddressBook): assume
|
* UI/WebServerResources/ContactsUI.js (appendAddressBook): assume
|
||||||
that lists can be created in the new addressbook.
|
that lists can be created in the new addressbook.
|
||||||
|
|
||||||
|
2012-02-28 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreMailFolder.m
|
||||||
|
(-moveCopyMessagesWithMIDs:andCount:fromFolder:withMIDs:andChangeKeys:wantCopy:):
|
||||||
|
we sync the version cache with the folder in order to update the
|
||||||
|
target message change keys, which was causing versioning issues
|
||||||
|
with Outlook 2010.
|
||||||
|
|
||||||
|
* OpenChange/gen-property-selectors.py: bannedProps is now an
|
||||||
|
array instead of a dict of "True" values.
|
||||||
|
Added "PrOabContainerGuid" to bannedProps.
|
||||||
|
|
||||||
|
2012-02-27 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreUserContext.m (-rootFolders:):
|
||||||
|
-[NGImap4Connection enableExtensions:] now takes an array of
|
||||||
|
strings rather than a single string argument.
|
||||||
|
|
||||||
|
2012-02-24 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* SoObjects/Mailer/SOGoMailFolder.m: ensure the imap connection is
|
||||||
|
available before performing certain operations, otherwise return
|
||||||
|
an exception. This only applies on methods that return an
|
||||||
|
exception, others were left untouched.
|
||||||
|
|
||||||
2012-02-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2012-02-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
* OpenChange/MAPIStoreMailContext.m
|
* OpenChange/MAPIStoreMailContext.m
|
||||||
|
|
|
@ -69,33 +69,33 @@ extern NSTimeZone *utcTZ;
|
||||||
- (void) fillMessageData: (struct mapistore_message *) dataPtr
|
- (void) fillMessageData: (struct mapistore_message *) dataPtr
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
|
|
||||||
- (int) getPrSenderEmailAddress: (void **) data
|
- (int) getPidTagSenderEmailAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrSenderAddrtype: (void **) data
|
- (int) getPidTagSenderAddressType: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrSenderName: (void **) data
|
- (int) getPidTagSenderName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrSenderEntryid: (void **) data
|
- (int) getPidTagSenderEntryId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
|
|
||||||
- (int) getPrReceivedByAddrtype: (void **) data
|
- (int) getPidTagReceivedByAddressType: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrReceivedByEmailAddress: (void **) data
|
- (int) getPidTagReceivedByEmailAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrReceivedByName: (void **) data
|
- (int) getPidTagReceivedByName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrReceivedByEntryid: (void **) data
|
- (int) getPidTagReceivedByEntryId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
|
|
||||||
- (int) getPrIconIndex: (void **) data
|
- (int) getPidTagIconIndex: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrOwnerApptId: (void **) data
|
- (int) getPidTagOwnerAppointmentId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPidLidMeetingType: (void **) data
|
- (int) getPidLidMeetingType: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrMessageClass: (void **) data
|
- (int) getPidTagMessageClass: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrStartDate: (void **) data
|
- (int) getPidTagStartDate: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPidLidAppointmentStateFlags: (void **) data
|
- (int) getPidLidAppointmentStateFlags: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
|
@ -106,7 +106,7 @@ extern NSTimeZone *utcTZ;
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPidLidCommonStart: (void **) data
|
- (int) getPidLidCommonStart: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrEndDate: (void **) data
|
- (int) getPidTagEndDate: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPidLidAppointmentEndWhole: (void **) data
|
- (int) getPidLidAppointmentEndWhole: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
|
@ -120,17 +120,17 @@ extern NSTimeZone *utcTZ;
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPidLidIndentedBusyStatus: (void **) data // TODO
|
- (int) getPidLidIndentedBusyStatus: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrSubject: (void **) data // SUMMARY
|
- (int) getPidTagSubject: (void **) data // SUMMARY
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPidLidLocation: (void **) data // LOCATION
|
- (int) getPidLidLocation: (void **) data // LOCATION
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPidLidPrivate: (void **) data // private (bool), should depend on CLASS and permissions
|
- (int) getPidLidPrivate: (void **) data // private (bool), should depend on CLASS and permissions
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrSensitivity: (void **) data // not implemented, depends on CLASS
|
- (int) getPidTagSensitivity: (void **) data // not implemented, depends on CLASS
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrImportance: (void **) data
|
- (int) getPidTagImportance: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrBody: (void **) data
|
- (int) getPidTagBody: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPidLidIsRecurring: (void **) data
|
- (int) getPidLidIsRecurring: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
|
|
|
@ -436,7 +436,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrIconIndex: (void **) data // TODO
|
- (int) getPidTagIconIndex: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
uint32_t longValue;
|
uint32_t longValue;
|
||||||
|
@ -502,7 +502,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrOwnerApptId: (void **) data
|
- (int) getPidTagOwnerAppointmentId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -581,7 +581,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageClass: (void **) data
|
- (int) getPidTagMessageClass: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
const char *className;
|
const char *className;
|
||||||
|
@ -634,7 +634,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
return [self getYes: data inMemCtx: memCtx];
|
return [self getYes: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrStartDate: (void **) data
|
- (int) getPidTagStartDate: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSCalendarDate *dateValue;
|
NSCalendarDate *dateValue;
|
||||||
|
@ -716,7 +716,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
- (int) getPidLidAppointmentStartWhole: (void **) data
|
- (int) getPidLidAppointmentStartWhole: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrStartDate: data inMemCtx: memCtx];
|
return [self getPidTagStartDate: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidLidCommonStart: (void **) data
|
- (int) getPidLidCommonStart: (void **) data
|
||||||
|
@ -797,7 +797,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) _getEntryid: (void **) data
|
- (int) _getEntryId: (void **) data
|
||||||
forICalPerson: (iCalPerson *) person
|
forICalPerson: (iCalPerson *) person
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
|
@ -820,7 +820,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sender (organizer) */
|
/* sender (organizer) */
|
||||||
- (int) getPrSenderEmailAddress: (void **) data
|
- (int) getPidTagSenderEmailAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getEmailAddress: data
|
return [self _getEmailAddress: data
|
||||||
|
@ -828,7 +828,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSenderAddrtype: (void **) data
|
- (int) getPidTagSenderAddressType: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getAddrType: data
|
return [self _getAddrType: data
|
||||||
|
@ -836,7 +836,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSenderName: (void **) data
|
- (int) getPidTagSenderName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getName: data
|
return [self _getName: data
|
||||||
|
@ -844,16 +844,16 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSenderEntryid: (void **) data
|
- (int) getPidTagSenderEntryId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getEntryid: data
|
return [self _getEntryId: data
|
||||||
forICalPerson: [event organizer]
|
forICalPerson: [event organizer]
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* attendee */
|
/* attendee */
|
||||||
- (int) getPrReceivedByEmailAddress: (void **) data
|
- (int) getPidTagReceivedByEmailAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getEmailAddress: data
|
return [self _getEmailAddress: data
|
||||||
|
@ -861,7 +861,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrReceivedByAddrtype: (void **) data
|
- (int) getPidTagReceivedByAddressType: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getAddrType: data
|
return [self _getAddrType: data
|
||||||
|
@ -869,7 +869,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrReceivedByName: (void **) data
|
- (int) getPidTagReceivedByName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getName: data
|
return [self _getName: data
|
||||||
|
@ -877,16 +877,16 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrReceivedByEntryid: (void **) data
|
- (int) getPidTagReceivedByEntryId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getEntryid: data
|
return [self _getEntryId: data
|
||||||
forICalPerson: [event userAsAttendee: user]
|
forICalPerson: [event userAsAttendee: user]
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
/* /attendee */
|
/* /attendee */
|
||||||
|
|
||||||
- (int) getPrEndDate: (void **) data
|
- (int) getPidTagEndDate: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSCalendarDate *dateValue;
|
NSCalendarDate *dateValue;
|
||||||
|
@ -911,7 +911,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
- (int) getPidLidAppointmentEndWhole: (void **) data
|
- (int) getPidLidAppointmentEndWhole: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrEndDate: data inMemCtx: memCtx];
|
return [self getPidTagEndDate: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidLidCommonEnd: (void **) data
|
- (int) getPidLidCommonEnd: (void **) data
|
||||||
|
@ -960,7 +960,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
return [self getPidLidBusyStatus: data inMemCtx: memCtx];
|
return [self getPidLidBusyStatus: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSubject: (void **) data // SUMMARY
|
- (int) getPidTagSubject: (void **) data // SUMMARY
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [[event summary] asUnicodeInMemCtx: memCtx];
|
*data = [[event summary] asUnicodeInMemCtx: memCtx];
|
||||||
|
@ -1013,14 +1013,14 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
return [self getNo: data inMemCtx: memCtx];
|
return [self getNo: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSensitivity: (void **) data // not implemented, depends on CLASS
|
- (int) getPidTagSensitivity: (void **) data // not implemented, depends on CLASS
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
// normal = 0, personal?? = 1, private = 2, confidential = 3
|
// normal = 0, personal?? = 1, private = 2, confidential = 3
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrImportance: (void **) data
|
- (int) getPidTagImportance: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
uint32_t v;
|
uint32_t v;
|
||||||
|
@ -1036,7 +1036,7 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrBody: (void **) data
|
- (int) getPidTagBody: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
int rc = MAPISTORE_SUCCESS;
|
int rc = MAPISTORE_SUCCESS;
|
||||||
|
@ -1397,7 +1397,7 @@ _fillAppointmentRecurrencePattern (struct AppointmentRecurrencePattern *arp,
|
||||||
[self _setupAlarm];
|
[self _setupAlarm];
|
||||||
|
|
||||||
return (alarm
|
return (alarm
|
||||||
? [self getPrStartDate: data inMemCtx: memCtx]
|
? [self getPidTagStartDate: data inMemCtx: memCtx]
|
||||||
: MAPISTORE_ERR_NOT_FOUND);
|
: MAPISTORE_ERR_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
return mimeAttachTag;
|
return mimeAttachTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMid: (void **) data
|
- (int) getPidTagMid: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongLongValue (memCtx, [container objectId]);
|
*data = MAPILongLongValue (memCtx, [container objectId]);
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachNum: (void **) data
|
- (int) getPidTagAttachNumber: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, aid);
|
*data = MAPILongValue (memCtx, aid);
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrRenderingPosition: (void **) data
|
- (int) getPidTagRenderingPosition: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, 0xffffffff);
|
*data = MAPILongValue (memCtx, 0xffffffff);
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
@implementation MAPIStoreCalendarAttachment
|
@implementation MAPIStoreCalendarAttachment
|
||||||
|
|
||||||
- (int) getPrAttachmentHidden: (void **) data
|
- (int) getPidTagAttachmentHidden: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||||
{
|
{
|
||||||
*data = MAPIBoolValue (localMemCtx, YES);
|
*data = MAPIBoolValue (localMemCtx, YES);
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachmentFlags: (void **) data
|
- (int) getPidTagAttachmentFlags: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (localMemCtx, 0x00000002); /* afException */
|
*data = MAPILongValue (localMemCtx, 0x00000002); /* afException */
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachmMethod: (void **) data
|
- (int) getPidTagAttachMethod: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) localMemCtx
|
inMemCtx: (TALLOC_CTX *) localMemCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (localMemCtx, 0x00000005); /* afEmbeddedMessage */
|
*data = MAPILongValue (localMemCtx, 0x00000005); /* afEmbeddedMessage */
|
||||||
|
|
|
@ -35,9 +35,11 @@
|
||||||
#import "MAPIStoreCalendarContext.h"
|
#import "MAPIStoreCalendarContext.h"
|
||||||
#import "MAPIStoreCalendarMessage.h"
|
#import "MAPIStoreCalendarMessage.h"
|
||||||
#import "MAPIStoreCalendarMessageTable.h"
|
#import "MAPIStoreCalendarMessageTable.h"
|
||||||
|
#import "NSString+MAPIStore.h"
|
||||||
|
|
||||||
#import "MAPIStoreCalendarFolder.h"
|
#import "MAPIStoreCalendarFolder.h"
|
||||||
|
|
||||||
|
#include <mapistore/mapistore_errors.h>
|
||||||
#include <util/time.h>
|
#include <util/time.h>
|
||||||
#include <gen_ndr/exchange.h>
|
#include <gen_ndr/exchange.h>
|
||||||
|
|
||||||
|
@ -49,17 +51,9 @@
|
||||||
return [MAPIStoreCalendarMessageTable tableForContainer: self];
|
return [MAPIStoreCalendarMessageTable tableForContainer: self];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (EOQualifier *) componentQualifier
|
- (NSString *) component
|
||||||
{
|
{
|
||||||
static EOQualifier *componentQualifier = nil;
|
return @"vevent";
|
||||||
|
|
||||||
if (!componentQualifier)
|
|
||||||
componentQualifier
|
|
||||||
= [[EOKeyValueQualifier alloc] initWithKey: @"c_component"
|
|
||||||
operatorSelector: EOQualifierOperatorEqual
|
|
||||||
value: @"vevent"];
|
|
||||||
|
|
||||||
return componentQualifier;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (MAPIStoreMessage *) createMessage
|
- (MAPIStoreMessage *) createMessage
|
||||||
|
@ -170,4 +164,13 @@
|
||||||
[(SOGoAppointmentFolder *) sogoObject aclSQLListingFilter]];
|
[(SOGoAppointmentFolder *) sogoObject aclSQLListingFilter]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (int) getPidTagDefaultPostMessageClass: (void **) data
|
||||||
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
|
{
|
||||||
|
*data = [@"IPM.Appointment" asUnicodeInMemCtx: memCtx];
|
||||||
|
|
||||||
|
return MAPISTORE_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -126,10 +126,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* getters */
|
/* getters */
|
||||||
- (int) getPrIconIndex: (void **) data
|
- (int) getPidTagIconIndex: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [[self appointmentWrapper] getPrIconIndex: data inMemCtx: memCtx];
|
return [[self appointmentWrapper] getPidTagIconIndex: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidLidFInvited: (void **) data
|
- (int) getPidLidFInvited: (void **) data
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
return [self getYes: data inMemCtx: memCtx];
|
return [self getYes: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageClass: (void **) data
|
- (int) getPidTagMessageClass: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = talloc_strdup (memCtx, "IPM.Appointment");
|
*data = talloc_strdup (memCtx, "IPM.Appointment");
|
||||||
|
@ -146,16 +146,24 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrOwnerApptId: (void **) data
|
- (int) getPidLidAppointmentMessageClass: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [[self appointmentWrapper] getPrOwnerApptId: data inMemCtx: memCtx];
|
*data = talloc_strdup (memCtx, "IPM.Appointment");
|
||||||
|
|
||||||
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrStartDate: (void **) data
|
- (int) getPidTagOwnerAppointmentId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [[self appointmentWrapper] getPrStartDate: data inMemCtx: memCtx];
|
return [[self appointmentWrapper] getPidTagOwnerAppointmentId: data inMemCtx: memCtx];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (int) getPidTagStartDate: (void **) data
|
||||||
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
|
{
|
||||||
|
return [[self appointmentWrapper] getPidTagStartDate: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidLidAppointmentStateFlags: (void **) data
|
- (int) getPidLidAppointmentStateFlags: (void **) data
|
||||||
|
@ -183,10 +191,10 @@
|
||||||
return [[self appointmentWrapper] getPidLidCommonStart: data inMemCtx: memCtx];
|
return [[self appointmentWrapper] getPidLidCommonStart: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrEndDate: (void **) data
|
- (int) getPidTagEndDate: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [[self appointmentWrapper] getPrEndDate: data inMemCtx: memCtx];
|
return [[self appointmentWrapper] getPidTagEndDate: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidLidAppointmentEndWhole: (void **) data
|
- (int) getPidLidAppointmentEndWhole: (void **) data
|
||||||
|
@ -220,10 +228,20 @@
|
||||||
return [[self appointmentWrapper] getPidLidBusyStatus: data inMemCtx: memCtx];
|
return [[self appointmentWrapper] getPidLidBusyStatus: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSubject: (void **) data // SUMMARY
|
- (int) getPidTagSubject: (void **) data // SUMMARY
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [[self appointmentWrapper] getPrSubject: data inMemCtx: memCtx];
|
return [[self appointmentWrapper] getPidTagSubject: data inMemCtx: memCtx];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (int) getPidLidSideEffects: (void **) data // TODO
|
||||||
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
|
{
|
||||||
|
*data = MAPILongValue (memCtx,
|
||||||
|
seOpenToDelete | seOpenToCopy | seOpenToMove
|
||||||
|
| seCoerceToInbox | seOpenForCtxMenu);
|
||||||
|
|
||||||
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidLidLocation: (void **) data // LOCATION
|
- (int) getPidLidLocation: (void **) data // LOCATION
|
||||||
|
@ -238,22 +256,22 @@
|
||||||
return [[self appointmentWrapper] getPidLidPrivate: data inMemCtx: memCtx];
|
return [[self appointmentWrapper] getPidLidPrivate: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSensitivity: (void **) data // not implemented, depends on CLASS
|
- (int) getPidTagSensitivity: (void **) data // not implemented, depends on CLASS
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [[self appointmentWrapper] getPrSensitivity: data inMemCtx: memCtx];
|
return [[self appointmentWrapper] getPidTagSensitivity: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrImportance: (void **) data
|
- (int) getPidTagImportance: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [[self appointmentWrapper] getPrImportance: data inMemCtx: memCtx];
|
return [[self appointmentWrapper] getPidTagImportance: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrBody: (void **) data
|
- (int) getPidTagBody: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [[self appointmentWrapper] getPrBody: data inMemCtx: memCtx];
|
return [[self appointmentWrapper] getPidTagBody: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidLidIsRecurring: (void **) data
|
- (int) getPidLidIsRecurring: (void **) data
|
||||||
|
@ -289,7 +307,7 @@
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrProcessed: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
- (int) getPidTagProcessed: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getYes: data inMemCtx: memCtx];
|
return [self getYes: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
@ -324,113 +342,113 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sender */
|
/* sender */
|
||||||
- (int) getPrSenderEmailAddress: (void **) data
|
- (int) getPidTagSenderEmailAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [[self appointmentWrapper] getPrSenderEmailAddress: data
|
return [[self appointmentWrapper] getPidTagSenderEmailAddress: data
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSenderAddrtype: (void **) data
|
- (int) getPidTagSenderAddressType: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [[self appointmentWrapper] getPrSenderAddrtype: data
|
return [[self appointmentWrapper] getPidTagSenderAddressType: data
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSenderName: (void **) data
|
- (int) getPidTagSenderName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [[self appointmentWrapper] getPrSenderName: data
|
return [[self appointmentWrapper] getPidTagSenderName: data
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSenderEntryid: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
- (int) getPidTagSenderEntryId: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [[self appointmentWrapper] getPrSenderEntryid: data
|
return [[self appointmentWrapper] getPidTagSenderEntryId: data
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sender representing */
|
/* sender representing */
|
||||||
- (int) getPrSentRepresentingEmailAddress: (void **) data
|
- (int) getPidTagSentRepresentingEmailAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrSenderEmailAddress: data inMemCtx: memCtx];
|
return [self getPidTagSenderEmailAddress: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSentRepresentingAddrtype: (void **) data
|
- (int) getPidTagSentRepresentingAddressType: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getSMTPAddrType: data inMemCtx: memCtx];
|
return [self getSMTPAddrType: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSentRepresentingName: (void **) data
|
- (int) getPidTagSentRepresentingName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrSenderName: data inMemCtx: memCtx];
|
return [self getPidTagSenderName: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSentRepresentingEntryid: (void **) data
|
- (int) getPidTagSentRepresentingEntryId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrSenderEntryid: data inMemCtx: memCtx];
|
return [self getPidTagSenderEntryId: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* attendee */
|
/* attendee */
|
||||||
// - (int) getPrReceivedByAddrtype: (void **) data
|
// - (int) getPidTagReceivedByAddressType: (void **) data
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
// inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
// {
|
// {
|
||||||
// return [[self appointmentWrapper] getPrReceivedByAddrtype: data
|
// return [[self appointmentWrapper] getPidTagReceivedByAddressType: data
|
||||||
// inMemCtx: memCtx];
|
// inMemCtx: memCtx];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// - (int) getPrReceivedByEmailAddress: (void **) data
|
// - (int) getPidTagReceivedByEmailAddress: (void **) data
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
// inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
// {
|
// {
|
||||||
// return [[self appointmentWrapper] getPrReceivedByEmailAddress: data
|
// return [[self appointmentWrapper] getPidTagReceivedByEmailAddress: data
|
||||||
// inMemCtx: memCtx];
|
// inMemCtx: memCtx];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// - (int) getPrReceivedByName: (void **) data
|
// - (int) getPidTagReceivedByName: (void **) data
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
// inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
// {
|
// {
|
||||||
// return [[self appointmentWrapper] getPrReceivedByName: data
|
// return [[self appointmentWrapper] getPidTagReceivedByName: data
|
||||||
// inMemCtx: memCtx];
|
// inMemCtx: memCtx];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// - (int) getPrReceivedByEntryid: (void **) data
|
// - (int) getPidTagReceivedByEntryId: (void **) data
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
// inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
// {
|
// {
|
||||||
// return [[self appointmentWrapper] getPrReceivedByEntryid: data
|
// return [[self appointmentWrapper] getPidTagReceivedByEntryId: data
|
||||||
// inMemCtx: memCtx];
|
// inMemCtx: memCtx];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// /* attendee representing */
|
// /* attendee representing */
|
||||||
// - (int) getPrRcvdRepresentingEmailAddress: (void **) data
|
// - (int) getPidTagReceivedRepresentingEmailAddress: (void **) data
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
// inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
// {
|
// {
|
||||||
// return [self getPrReceivedByEmailAddress: data inMemCtx: memCtx];
|
// return [self getPidTagReceivedByEmailAddress: data inMemCtx: memCtx];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// - (int) getPrRcvdRepresentingAddrtype: (void **) data
|
// - (int) getPidTagReceivedRepresentingAddressType: (void **) data
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
// inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
// {
|
// {
|
||||||
// return [self getSMTPAddrType: data inMemCtx: memCtx];
|
// return [self getSMTPAddrType: data inMemCtx: memCtx];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// - (int) getPrRcvdRepresentingName: (void **) data
|
// - (int) getPidTagReceivedRepresentingName: (void **) data
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
// inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
// {
|
// {
|
||||||
// return [self getPrReceivedByName: data inMemCtx: memCtx];
|
// return [self getPidTagReceivedByName: data inMemCtx: memCtx];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// - (int) getPrRcvdRepresentingEntryid: (void **) data
|
// - (int) getPidTagReceivedRepresentingEntryId: (void **) data
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
// inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
// {
|
// {
|
||||||
// return [self getPrReceivedByEntryid: data inMemCtx: memCtx];
|
// return [self getPidTagReceivedByEntryId: data inMemCtx: memCtx];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
- (int) getPrResponseRequested: (void **) data
|
- (int) getPidTagResponseRequested: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getYes: data inMemCtx: memCtx];
|
return [self getYes: data inMemCtx: memCtx];
|
||||||
|
@ -542,43 +560,50 @@
|
||||||
return uid;
|
return uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) _fixupEventWithExistingUID
|
- (void) _fixupAppointmentObjectWithUID: (NSString *) uid
|
||||||
{
|
{
|
||||||
NSString *uid, *existingCName, *existingURL;
|
NSString *cname, *url;
|
||||||
MAPIStoreMapping *mapping;
|
MAPIStoreMapping *mapping;
|
||||||
uint64_t objectId;
|
uint64_t objectId;
|
||||||
SOGoAppointmentObject *existingObject;
|
SOGoAppointmentFolder *folder;
|
||||||
|
SOGoAppointmentObject *newObject;
|
||||||
WOContext *woContext;
|
WOContext *woContext;
|
||||||
|
|
||||||
uid = [self _uidFromGlobalObjectId];
|
cname = [[container sogoObject] resourceNameForEventUID: uid];
|
||||||
existingCName = [[container sogoObject] resourceNameForEventUID: uid];
|
if (cname)
|
||||||
if (existingCName)
|
isNew = NO;
|
||||||
{
|
else
|
||||||
|
cname = [NSString stringWithFormat: @"%@.ics", uid];
|
||||||
|
|
||||||
mapping = [self mapping];
|
mapping = [self mapping];
|
||||||
|
|
||||||
|
url = [NSString stringWithFormat: @"%@%@", [container url], cname];
|
||||||
|
folder = [container sogoObject];
|
||||||
|
/* reinstantiate the old sogo object and attach it to self */
|
||||||
|
woContext = [[self userContext] woContext];
|
||||||
|
if (isNew)
|
||||||
|
newObject = [SOGoAppointmentObject objectWithName: cname
|
||||||
|
inContainer: folder];
|
||||||
|
else
|
||||||
|
{
|
||||||
/* dissociate the object url from the old object's id */
|
/* dissociate the object url from the old object's id */
|
||||||
existingURL = [NSString stringWithFormat: @"%@%@",
|
objectId = [mapping idFromURL: url];
|
||||||
[container url], existingCName];
|
|
||||||
objectId = [mapping idFromURL: existingURL];
|
|
||||||
[mapping unregisterURLWithID: objectId];
|
[mapping unregisterURLWithID: objectId];
|
||||||
|
newObject = [folder lookupName: cname
|
||||||
|
inContext: woContext
|
||||||
|
acquire: NO];
|
||||||
|
}
|
||||||
|
|
||||||
/* dissociate the object url associated with this object, as we want to
|
/* dissociate the object url associated with this object, as we want to
|
||||||
discard it */
|
discard it */
|
||||||
objectId = [self objectId];
|
objectId = [self objectId];
|
||||||
[mapping unregisterURLWithID: objectId];
|
[mapping unregisterURLWithID: objectId];
|
||||||
|
|
||||||
/* associate the object url with this object id */
|
/* associate the new object url with this object id */
|
||||||
[mapping registerURL: existingURL withID: objectId];
|
[mapping registerURL: url withID: objectId];
|
||||||
|
|
||||||
/* reinstantiate the old sogo object and attach it to self */
|
[newObject setContext: woContext];
|
||||||
woContext = [[self userContext] woContext];
|
ASSIGN (sogoObject, newObject);
|
||||||
existingObject = [[container sogoObject] lookupName: existingCName
|
|
||||||
inContext: woContext
|
|
||||||
acquire: NO];
|
|
||||||
[existingObject setContext: woContext];
|
|
||||||
ASSIGN (sogoObject, existingObject);
|
|
||||||
isNew = NO;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) _setupAlarmDataInEvent: (iCalEvent *) newEvent
|
- (void) _setupAlarmDataInEvent: (iCalEvent *) newEvent
|
||||||
|
@ -657,22 +682,28 @@
|
||||||
iCalDateTime *start, *end;
|
iCalDateTime *start, *end;
|
||||||
iCalTimeZone *tz;
|
iCalTimeZone *tz;
|
||||||
NSCalendarDate *now;
|
NSCalendarDate *now;
|
||||||
NSString *content, *tzName, *priority;
|
NSString *uid, *content, *tzName, *priority, *newParticipationStatus = nil;
|
||||||
iCalEvent *newEvent;
|
iCalEvent *newEvent;
|
||||||
iCalPerson *userPerson;
|
// iCalPerson *userPerson;
|
||||||
NSUInteger responseStatus = 0;
|
NSUInteger responseStatus = 0;
|
||||||
NSInteger tzOffset;
|
NSInteger tzOffset;
|
||||||
SOGoUser *activeUser, *ownerUser;
|
SOGoUser *activeUser, *ownerUser;
|
||||||
id value;
|
id value;
|
||||||
|
|
||||||
if (isNew)
|
if (isNew)
|
||||||
|
{
|
||||||
|
uid = [self _uidFromGlobalObjectId];
|
||||||
|
if (uid)
|
||||||
{
|
{
|
||||||
/* Hack required because of what's explained in oxocal 3.1.4.7.1:
|
/* Hack required because of what's explained in oxocal 3.1.4.7.1:
|
||||||
basically, Outlook creates a copy of the event and then removes the
|
basically, Outlook creates a copy of the event and then removes the
|
||||||
old instance. We perform a trickery to avoid performing those
|
old instance. We perform a trickery to avoid performing those
|
||||||
operations in the backend, in a way that enables us to recover the
|
operations in the backend, in a way that enables us to recover the
|
||||||
initial instance and act solely on it. */
|
initial instance and act solely on it. */
|
||||||
[self _fixupEventWithExistingUID];
|
[self _fixupAppointmentObjectWithUID: uid];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
uid = [SOGoObject globallyUniqueObjectId];
|
||||||
}
|
}
|
||||||
|
|
||||||
[self logWithFormat: @"-save, event props:"];
|
[self logWithFormat: @"-save, event props:"];
|
||||||
|
@ -686,63 +717,14 @@
|
||||||
newEvent = [sogoObject component: YES secure: NO];
|
newEvent = [sogoObject component: YES secure: NO];
|
||||||
vCalendar = [newEvent parent];
|
vCalendar = [newEvent parent];
|
||||||
[vCalendar setProdID: @"-//Inverse inc.//OpenChange+SOGo//EN"];
|
[vCalendar setProdID: @"-//Inverse inc.//OpenChange+SOGo//EN"];
|
||||||
content = [vCalendar versitString];
|
|
||||||
[newEvent setCreated: now];
|
[newEvent setCreated: now];
|
||||||
|
[newEvent setUid: uid];
|
||||||
|
content = [vCalendar versitString];
|
||||||
}
|
}
|
||||||
|
|
||||||
vCalendar = [iCalCalendar parseSingleFromSource: content];
|
vCalendar = [iCalCalendar parseSingleFromSource: content];
|
||||||
newEvent = [[vCalendar events] objectAtIndex: 0];
|
newEvent = [[vCalendar events] objectAtIndex: 0];
|
||||||
|
|
||||||
ownerUser = [[self userContext] sogoUser];
|
|
||||||
userPerson = [newEvent userAsAttendee: ownerUser];
|
|
||||||
[newEvent setTimeStampAsDate: now];
|
[newEvent setTimeStampAsDate: now];
|
||||||
|
|
||||||
if (userPerson)
|
|
||||||
{
|
|
||||||
// iCalPersonPartStat newPartStat;
|
|
||||||
NSString *newPartStat;
|
|
||||||
|
|
||||||
value
|
|
||||||
= [properties objectForKey: MAPIPropertyKey (PidLidResponseStatus)];
|
|
||||||
if (value)
|
|
||||||
responseStatus = [value unsignedLongValue];
|
|
||||||
|
|
||||||
/* FIXME: we should provide a data converter between OL partstats and
|
|
||||||
SOGo */
|
|
||||||
switch (responseStatus)
|
|
||||||
{
|
|
||||||
case 0x02: /* respTentative */
|
|
||||||
// newPartStat = iCalPersonPartStatTentative;
|
|
||||||
newPartStat = @"TENTATIVE";
|
|
||||||
break;
|
|
||||||
case 0x03: /* respAccepted */
|
|
||||||
// newPartStat = iCalPersonPartStatAccepted;
|
|
||||||
newPartStat = @"ACCEPTED";
|
|
||||||
break;
|
|
||||||
case 0x04: /* respDeclined */
|
|
||||||
// newPartStat = iCalPersonPartStatDeclined;
|
|
||||||
newPartStat = @"DECLINED";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
newPartStat = nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newPartStat // != iCalPersonPartStatUndefined
|
|
||||||
)
|
|
||||||
{
|
|
||||||
// iCalPerson *participant;
|
|
||||||
|
|
||||||
// participant = [newEvent userAsAttendee: ownerUser];
|
|
||||||
// [participant setParticipationStatus: newPartStat];
|
|
||||||
// [sogoObject saveComponent: newEvent];
|
|
||||||
|
|
||||||
[sogoObject changeParticipationStatus: newPartStat
|
|
||||||
withDelegate: nil];
|
|
||||||
// [[self context] tearDownRequest];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
[newEvent setLastModified: now];
|
[newEvent setLastModified: now];
|
||||||
|
|
||||||
// summary
|
// summary
|
||||||
|
@ -901,7 +883,159 @@
|
||||||
iCalPersonPartStat newPartStat;
|
iCalPersonPartStat newPartStat;
|
||||||
NSNumber *flags, *trackStatus;
|
NSNumber *flags, *trackStatus;
|
||||||
int i, effective;
|
int i, effective;
|
||||||
|
BOOL organizerIsSet = NO;
|
||||||
|
|
||||||
|
recipients = [value objectForKey: @"to"];
|
||||||
|
effective = 0;
|
||||||
|
for (i = 0; i < [recipients count]; i++)
|
||||||
|
{
|
||||||
|
dict = [recipients objectAtIndex: i];
|
||||||
|
person = [iCalPerson new];
|
||||||
|
[person setCn: [dict objectForKey: @"fullName"]];
|
||||||
|
attEmail = [dict objectForKey: @"email"];
|
||||||
|
[person setEmail: attEmail];
|
||||||
|
|
||||||
|
flags = [dict objectForKey: MAPIPropertyKey (PR_RECIPIENT_FLAGS)];
|
||||||
|
if (!flags)
|
||||||
|
{
|
||||||
|
[self logWithFormat:
|
||||||
|
@"no recipient flags specified: skipping recipient"];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (([flags unsignedIntValue] & 0x0002)) /* recipOrganizer */
|
||||||
|
{
|
||||||
|
[newEvent setOrganizer: person];
|
||||||
|
organizerIsSet = YES;
|
||||||
|
[self logWithFormat: @"organizer set via recipient flags"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BOOL isOrganizer = NO;
|
||||||
|
|
||||||
|
// /* Work-around: it happens that Outlook still passes the
|
||||||
|
// organizer as a recipient, maybe because of a feature
|
||||||
|
// documented in a pre-mesozoic PDF still buried in a
|
||||||
|
// cavern... In that case we remove it, and we keep the
|
||||||
|
// number of effective recipients in "effective". If the
|
||||||
|
// total is 0, we remove the "ORGANIZER" too. */
|
||||||
|
// if ([attEmail isEqualToString: orgEmail])
|
||||||
|
// {
|
||||||
|
// [self logWithFormat:
|
||||||
|
// @"avoiding setting organizer as recipient"];
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
|
||||||
|
trackStatus = [dict objectForKey: MAPIPropertyKey (PidTagRecipientTrackStatus)];
|
||||||
|
if (trackStatus)
|
||||||
|
{
|
||||||
|
/* FIXME: we should provide a data converter between OL
|
||||||
|
partstats and SOGo */
|
||||||
|
switch ([trackStatus unsignedIntValue])
|
||||||
|
{
|
||||||
|
case 0x01: /* respOrganized */
|
||||||
|
isOrganizer = YES;
|
||||||
|
break;
|
||||||
|
case 0x02: /* respTentative */
|
||||||
|
newPartStat = iCalPersonPartStatTentative;
|
||||||
|
break;
|
||||||
|
case 0x03: /* respAccepted */
|
||||||
|
newPartStat = iCalPersonPartStatAccepted;
|
||||||
|
break;
|
||||||
|
case 0x04: /* respDeclined */
|
||||||
|
newPartStat = iCalPersonPartStatDeclined;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
newPartStat = iCalPersonPartStatNeedsAction;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isOrganizer)
|
||||||
|
{
|
||||||
|
[newEvent setOrganizer: person];
|
||||||
|
organizerIsSet = YES;
|
||||||
|
[self logWithFormat: @"organizer set via track status"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[person setParticipationStatus: newPartStat];
|
||||||
|
[person setRsvp: @"TRUE"];
|
||||||
|
[person setRole: @"REQ-PARTICIPANT"];
|
||||||
|
[newEvent addToAttendees: person];
|
||||||
|
effective++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
[self errorWithFormat: @"skipped recipient due"
|
||||||
|
@" to missing track status"];
|
||||||
|
}
|
||||||
|
|
||||||
|
[person release];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (effective == 0) /* See work-around above */
|
||||||
|
[newEvent setOrganizer: nil];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ownerUser = [[self userContext] sogoUser];
|
||||||
|
if (organizerIsSet)
|
||||||
|
{
|
||||||
|
/* We must reset the participation status to the value
|
||||||
|
obtained from PidLidResponseStatus as the value in
|
||||||
|
PidTagRecipientTrackStatus is not correct. Note (hack):
|
||||||
|
the method used here requires that the user directory
|
||||||
|
from LDAP and Samba matches perfectly. This can be solved
|
||||||
|
more appropriately by making use of the sender
|
||||||
|
properties... */
|
||||||
|
person = [newEvent userAsAttendee: ownerUser];
|
||||||
|
if (person)
|
||||||
|
{
|
||||||
|
value
|
||||||
|
= [properties objectForKey: MAPIPropertyKey (PidLidResponseStatus)];
|
||||||
|
if (value)
|
||||||
|
responseStatus = [value unsignedLongValue];
|
||||||
|
|
||||||
|
/* FIXME: we should provide a data converter between OL partstats and
|
||||||
|
SOGo */
|
||||||
|
switch (responseStatus)
|
||||||
|
{
|
||||||
|
case 0x02: /* respTentative */
|
||||||
|
newPartStat = iCalPersonPartStatTentative;
|
||||||
|
break;
|
||||||
|
case 0x03: /* respAccepted */
|
||||||
|
newPartStat = iCalPersonPartStatAccepted;
|
||||||
|
break;
|
||||||
|
case 0x04: /* respDeclined */
|
||||||
|
newPartStat = iCalPersonPartStatDeclined;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
newPartStat = iCalPersonPartStatNeedsAction;
|
||||||
|
}
|
||||||
|
[person setParticipationStatus: newPartStat];
|
||||||
|
newParticipationStatus = [person partStatWithDefault];
|
||||||
|
|
||||||
|
// if (newPartStat // != iCalPersonPartStatUndefined
|
||||||
|
// )
|
||||||
|
// {
|
||||||
|
// // iCalPerson *participant;
|
||||||
|
|
||||||
|
// // participant = [newEvent userAsAttendee: ownerUser];
|
||||||
|
// // [participant setParticipationStatus: newPartStat];
|
||||||
|
// // [sogoObject saveComponent: newEvent];
|
||||||
|
|
||||||
|
// [sogoObject changeParticipationStatus: newPartStat
|
||||||
|
// withDelegate: nil];
|
||||||
|
// // [[self context] tearDownRequest];
|
||||||
|
// }
|
||||||
|
// // }1005
|
||||||
|
|
||||||
|
// // else
|
||||||
|
// // {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self errorWithFormat: @"organizer was not set although a"
|
||||||
|
@" recipient list was specified"];
|
||||||
/* We must set the organizer preliminarily here because, unlike what
|
/* We must set the organizer preliminarily here because, unlike what
|
||||||
the doc states, Outlook does not always pass the real organizer
|
the doc states, Outlook does not always pass the real organizer
|
||||||
in the recipients list. */
|
in the recipients list. */
|
||||||
|
@ -921,81 +1055,16 @@
|
||||||
}
|
}
|
||||||
[newEvent setOrganizer: person];
|
[newEvent setOrganizer: person];
|
||||||
[person release];
|
[person release];
|
||||||
|
|
||||||
recipients = [value objectForKey: @"to"];
|
|
||||||
effective = 0;
|
|
||||||
for (i = 0; i < [recipients count]; i++)
|
|
||||||
{
|
|
||||||
dict = [recipients objectAtIndex: i];
|
|
||||||
|
|
||||||
flags = [dict objectForKey: MAPIPropertyKey (PR_RECIPIENT_FLAGS)];
|
|
||||||
if (!flags)
|
|
||||||
{
|
|
||||||
[self logWithFormat:
|
|
||||||
@"no recipient flags specified: skipping recipient"];
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
person = [iCalPerson new];
|
|
||||||
[person setCn: [dict objectForKey: @"fullName"]];
|
|
||||||
attEmail = [dict objectForKey: @"email"];
|
|
||||||
[person setEmail: attEmail];
|
|
||||||
|
|
||||||
if (([flags unsignedIntValue] & 0x0002)) /* recipOrganizer */
|
|
||||||
[newEvent setOrganizer: person];
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Work-around: it happens that Outlook still passes the
|
|
||||||
organizer as a recipient, maybe because of a feature
|
|
||||||
documented in a pre-mesozoic PDF still buried in a
|
|
||||||
cavern... In that case we remove it, and we keep the
|
|
||||||
number of effective recipients in "effective". If the
|
|
||||||
total is 0, we remove the "ORGANIZER" too. */
|
|
||||||
if ([attEmail isEqualToString: orgEmail])
|
|
||||||
{
|
|
||||||
[self logWithFormat:
|
|
||||||
@"avoiding setting organizer as recipient"];
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trackStatus
|
|
||||||
= [dict
|
|
||||||
objectForKey: MAPIPropertyKey (PR_RECIPIENT_TRACKSTATUS)];
|
|
||||||
|
|
||||||
/* FIXME: we should provide a data converter between OL
|
|
||||||
partstats and SOGo */
|
|
||||||
switch ([trackStatus unsignedIntValue])
|
|
||||||
{
|
|
||||||
case 0x02: /* respTentative */
|
|
||||||
newPartStat = iCalPersonPartStatTentative;
|
|
||||||
break;
|
|
||||||
case 0x03: /* respAccepted */
|
|
||||||
newPartStat = iCalPersonPartStatAccepted;
|
|
||||||
break;
|
|
||||||
case 0x04: /* respDeclined */
|
|
||||||
newPartStat = iCalPersonPartStatDeclined;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
newPartStat = iCalPersonPartStatNeedsAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
[person setParticipationStatus: newPartStat];
|
|
||||||
[person setRsvp: @"TRUE"];
|
|
||||||
[person setRole: @"REQ-PARTICIPANT"];
|
|
||||||
[newEvent addToAttendees: person];
|
|
||||||
effective++;
|
|
||||||
}
|
|
||||||
|
|
||||||
[person release];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (effective == 0) /* See work-around above */
|
|
||||||
[newEvent setOrganizer: nil];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[sogoObject saveComponent: newEvent];
|
[sogoObject saveComponent: newEvent];
|
||||||
}
|
if (newParticipationStatus)
|
||||||
|
[sogoObject changeParticipationStatus: newParticipationStatus
|
||||||
|
withDelegate: nil];
|
||||||
|
|
||||||
[(MAPIStoreCalendarFolder *) container synchroniseCache];
|
[(MAPIStoreCalendarFolder *) container synchroniseCache];
|
||||||
value = [properties objectForKey: MAPIPropertyKey (PR_CHANGE_KEY)];
|
value = [properties objectForKey: MAPIPropertyKey (PR_CHANGE_KEY)];
|
||||||
if (value)
|
if (value)
|
||||||
|
|
|
@ -94,37 +94,37 @@ extern NSTimeZone *utcTZ;
|
||||||
return [container lastModificationTime];
|
return [container lastModificationTime];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachEncoding: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
- (int) getPidTagAttachEncoding: (void **) data inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
{
|
{
|
||||||
*data = [[NSData data] asBinaryInMemCtx: memCtx];
|
*data = [[NSData data] asBinaryInMemCtx: memCtx];
|
||||||
|
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachFlags: (void **) data
|
- (int) getPidTagAttachFlags: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachmentFlags: (void **) data
|
- (int) getPidTagAttachmentFlags: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachmentHidden: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
- (int) getPidTagAttachmentHidden: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getNo: data inMemCtx: memCtx];
|
return [self getNo: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachmentLinkid: (void **) data
|
- (int) getPidTagAttachmentLinkId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachMethod: (void **) data
|
- (int) getPidTagAttachMethod: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, 0x00000001);
|
*data = MAPILongValue (memCtx, 0x00000001);
|
||||||
|
@ -132,13 +132,13 @@ extern NSTimeZone *utcTZ;
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachmentContactphoto: (void **) data
|
- (int) getPidTagAttachmentContactPhoto: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getYes: data inMemCtx: memCtx];
|
return [self getYes: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachDataBin: (void **) data
|
- (int) getPidTagAttachDataBinary: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
if (!photoData)
|
if (!photoData)
|
||||||
|
@ -150,7 +150,7 @@ extern NSTimeZone *utcTZ;
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachSize: (void **) data
|
- (int) getPidTagAttachSize: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
if (!photoData)
|
if (!photoData)
|
||||||
|
@ -162,7 +162,7 @@ extern NSTimeZone *utcTZ;
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachExtension: (void **) data
|
- (int) getPidTagAttachExtension: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [[self fileExtension] asUnicodeInMemCtx: memCtx];
|
*data = [[self fileExtension] asUnicodeInMemCtx: memCtx];
|
||||||
|
@ -170,7 +170,7 @@ extern NSTimeZone *utcTZ;
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachLongFilename: (void **) data
|
- (int) getPidTagAttachLongFilename: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *filename;
|
NSString *filename;
|
||||||
|
@ -183,17 +183,17 @@ extern NSTimeZone *utcTZ;
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachFilename: (void **) data
|
- (int) getPidTagAttachFilename: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrAttachLongFilename: data
|
return [self getPidTagAttachLongFilename: data
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDisplayName: (void **) data
|
- (int) getPidTagDisplayName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrAttachLongFilename: data inMemCtx: memCtx];
|
return [self getPidTagAttachLongFilename: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -45,18 +45,9 @@
|
||||||
return [MAPIStoreContactsMessageTable tableForContainer: self];
|
return [MAPIStoreContactsMessageTable tableForContainer: self];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (EOQualifier *) componentQualifier
|
- (NSString *) component
|
||||||
{
|
{
|
||||||
static EOQualifier *componentQualifier = nil;
|
return @"vcard";
|
||||||
|
|
||||||
/* TODO: we need to support vlist as well */
|
|
||||||
if (!componentQualifier)
|
|
||||||
componentQualifier
|
|
||||||
= [[EOKeyValueQualifier alloc] initWithKey: @"c_component"
|
|
||||||
operatorSelector: EOQualifierOperatorEqual
|
|
||||||
value: @"vcard"];
|
|
||||||
|
|
||||||
return componentQualifier;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (MAPIStoreMessage *) createMessage
|
- (MAPIStoreMessage *) createMessage
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrIconIndex: (void **) data // TODO
|
- (int) getPidTagIconIndex: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
/* see http://msdn.microsoft.com/en-us/library/cc815472.aspx */
|
/* see http://msdn.microsoft.com/en-us/library/cc815472.aspx */
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageClass: (void **) data
|
- (int) getPidTagMessageClass: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = talloc_strdup (memCtx, "IPM.Contact");
|
*data = talloc_strdup (memCtx, "IPM.Contact");
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - (int) getPrOabName: (void **) data
|
// - (int) getPidTagOfflineAddressBookName: (void **) data
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
// inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
// {
|
// {
|
||||||
// *data = talloc_strdup (memCtx, "PR_OAB_NAME_UNICODE");
|
// *data = talloc_strdup (memCtx, "PR_OAB_NAME_UNICODE");
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
// return MAPISTORE_SUCCESS;
|
// return MAPISTORE_SUCCESS;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// - (int) getPrOabLangid: (void **) data
|
// - (int) getPidTagOfflineAddressBookLanguageId: (void **) data
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
// inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
// {
|
// {
|
||||||
// /* see http://msdn.microsoft.com/en-us/goglobal/bb895996.asxp */
|
// /* see http://msdn.microsoft.com/en-us/goglobal/bb895996.asxp */
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
- (int) getPrTitle: (void **) data
|
- (int) getPidTagTitle: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrCompanyName: (void **) data
|
- (int) getPidTagCompanyName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
CardElement *org;
|
CardElement *org;
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDepartmentName: (void **) data
|
- (int) getPidTagDepartmentName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
CardElement *org;
|
CardElement *org;
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSendInternetEncoding: (void **) data
|
- (int) getPidTagSendInternetEncoding: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, 0x00065001);
|
*data = MAPILongValue (memCtx, 0x00065001);
|
||||||
|
@ -179,16 +179,16 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSubject: (void **) data
|
- (int) getPidTagSubject: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrDisplayName: data inMemCtx: memCtx];
|
return [self getPidTagDisplayName: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidLidFileUnder: (void **) data
|
- (int) getPidLidFileUnder: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrDisplayName: data inMemCtx: memCtx];
|
return [self getPidTagDisplayName: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidLidFileUnderId: (void **) data
|
- (int) getPidLidFileUnderId: (void **) data
|
||||||
|
@ -231,13 +231,13 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAccount: (void **) data
|
- (int) getPidTagAccount: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPidLidEmail1EmailAddress: data inMemCtx: memCtx];
|
return [self getPidLidEmail1EmailAddress: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrContactEmailAddresses: (void **) data
|
- (int) getPidTagContactEmailAddresses: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -251,7 +251,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrEmsAbTargetAddress: (void **) data
|
- (int) getPidTagEmsAbTargetAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -263,7 +263,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSearchKey: (void **) data // TODO
|
- (int) getPidTagSearchKey: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -275,7 +275,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMailPermission: (void **) data
|
- (int) getPidTagMailPermission: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getYes: data inMemCtx: memCtx];
|
return [self getYes: data inMemCtx: memCtx];
|
||||||
|
@ -321,7 +321,7 @@
|
||||||
return [self getPidLidEmail2EmailAddress: data inMemCtx: memCtx];
|
return [self getPidLidEmail2EmailAddress: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrBody: (void **) data
|
- (int) getPidTagBody: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
int rc = MAPISTORE_SUCCESS;
|
int rc = MAPISTORE_SUCCESS;
|
||||||
|
@ -372,56 +372,56 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrOfficeTelephoneNumber: (void **) data
|
- (int) getPidTagBusinessTelephoneNumber: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"tel" ofType: @"work" excluding: @"fax"
|
return [self _getElement: @"tel" ofType: @"work" excluding: @"fax"
|
||||||
atPos: 0 inData: data inMemCtx: memCtx];
|
atPos: 0 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrHomeTelephoneNumber: (void **) data
|
- (int) getPidTagHomeTelephoneNumber: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"tel" ofType: @"home" excluding: @"fax"
|
return [self _getElement: @"tel" ofType: @"home" excluding: @"fax"
|
||||||
atPos: 0 inData: data inMemCtx: memCtx];
|
atPos: 0 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMobileTelephoneNumber: (void **) data
|
- (int) getPidTagMobileTelephoneNumber: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"tel" ofType: @"cell" excluding: nil
|
return [self _getElement: @"tel" ofType: @"cell" excluding: nil
|
||||||
atPos: 0 inData: data inMemCtx: memCtx];
|
atPos: 0 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrPagerTelephoneNumber: (void **) data
|
- (int) getPidTagPagerTelephoneNumber: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"tel" ofType: @"pager" excluding: nil
|
return [self _getElement: @"tel" ofType: @"pager" excluding: nil
|
||||||
atPos: 0 inData: data inMemCtx: memCtx];
|
atPos: 0 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrPrimaryTelephoneNumber: (void **) data
|
- (int) getPidTagPrimaryTelephoneNumber: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"tel" ofType: @"pref" excluding: nil
|
return [self _getElement: @"tel" ofType: @"pref" excluding: nil
|
||||||
atPos: 0 inData: data inMemCtx: memCtx];
|
atPos: 0 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrBusinessFaxNumber: (void **) data
|
- (int) getPidTagBusinessFaxNumber: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"tel" ofType: @"fax" excluding: nil
|
return [self _getElement: @"tel" ofType: @"fax" excluding: nil
|
||||||
atPos: 0 inData: data inMemCtx: memCtx];
|
atPos: 0 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrBusinessHomePage: (void **) data
|
- (int) getPidTagBusinessHomePage: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"url" ofType: @"work" excluding: nil
|
return [self _getElement: @"url" ofType: @"work" excluding: nil
|
||||||
atPos: 0 inData: data inMemCtx: memCtx];
|
atPos: 0 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrPersonalHomePage: (void **) data
|
- (int) getPidTagPersonalHomePage: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"url" ofType: @"home" excluding: nil
|
return [self _getElement: @"url" ofType: @"home" excluding: nil
|
||||||
|
@ -491,49 +491,49 @@
|
||||||
//
|
//
|
||||||
// getters when no address is selected as the Mailing Address
|
// getters when no address is selected as the Mailing Address
|
||||||
//
|
//
|
||||||
- (int) getPrPostalAddress: (void **) data
|
- (int) getPidTagPostalAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"label" ofType: @"pref" excluding: nil
|
return [self _getElement: @"label" ofType: @"pref" excluding: nil
|
||||||
atPos: 0 inData: data inMemCtx: memCtx];
|
atPos: 0 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrPostOfficeBox: (void **) data
|
- (int) getPidTagPostOfficeBox: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
||||||
atPos: 0 inData: data inMemCtx: memCtx];
|
atPos: 0 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrStreetAddress: (void **) data
|
- (int) getPidTagStreetAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
||||||
atPos: 2 inData: data inMemCtx: memCtx];
|
atPos: 2 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrLocality: (void **) data
|
- (int) getPidTagLocality: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
||||||
atPos: 3 inData: data inMemCtx: memCtx];
|
atPos: 3 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrStateOrProvince: (void **) data
|
- (int) getPidTagStateOrProvince: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
||||||
atPos: 4 inData: data inMemCtx: memCtx];
|
atPos: 4 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrPostalCode: (void **) data
|
- (int) getPidTagPostalCode: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
||||||
atPos: 5 inData: data inMemCtx: memCtx];
|
atPos: 5 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrCountry: (void **) data
|
- (int) getPidTagCountry: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
return [self _getElement: @"adr" ofType: @"pref" excluding: nil
|
||||||
|
@ -550,41 +550,41 @@
|
||||||
atPos: 0 inData: data inMemCtx: memCtx];
|
atPos: 0 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrHomeAddressPostOfficeBox: (void **) data
|
- (int) getPidTagHomeAddressPostOfficeBox: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
||||||
atPos: 0 inData: data inMemCtx: memCtx];
|
atPos: 0 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrHomeAddressStreet: (void **) data
|
- (int) getPidTagHomeAddressStreet: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
||||||
atPos: 2 inData: data inMemCtx: memCtx];
|
atPos: 2 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrHomeAddressCity: (void **) data
|
- (int) getPidTagHomeAddressCity: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
||||||
atPos: 3 inData: data inMemCtx: memCtx];
|
atPos: 3 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrHomeAddressStateOrProvince: (void **) data
|
- (int) getPidTagHomeAddressStateOrProvince: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
||||||
atPos: 4 inData: data inMemCtx: memCtx];
|
atPos: 4 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrHomeAddressPostalCode: (void **) data
|
- (int) getPidTagHomeAddressPostalCode: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
||||||
atPos: 5 inData: data inMemCtx: memCtx];
|
atPos: 5 inData: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
- (int) getPrHomeAddressCountry: (void **) data
|
- (int) getPidTagHomeAddressCountry: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
return [self _getElement: @"adr" ofType: @"home" excluding: nil
|
||||||
|
@ -646,7 +646,7 @@
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
- (int) getPrNickname: (void **) data
|
- (int) getPidTagNickname: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -657,7 +657,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrBirthday: (void **) data
|
- (int) getPidTagBirthday: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSCalendarDate *dateValue;
|
NSCalendarDate *dateValue;
|
||||||
|
@ -681,7 +681,7 @@
|
||||||
//
|
//
|
||||||
// Decomposed fullname getters
|
// Decomposed fullname getters
|
||||||
//
|
//
|
||||||
- (int) getPrSurname: (void **) data
|
- (int) getPidTagSurname: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -694,7 +694,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrGivenName: (void **) data
|
- (int) getPidTagGivenName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -707,7 +707,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMiddleName: (void **) data
|
- (int) getPidTagMiddleName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -720,7 +720,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDisplayNamePrefix: (void **) data
|
- (int) getPidTagDisplayNamePrefix: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -733,7 +733,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrGeneration: (void **) data
|
- (int) getPidTagGeneration: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -746,7 +746,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSensitivity: (void **) data
|
- (int) getPidTagSensitivity: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
|
@ -808,7 +808,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) _updatePhotoInVCard: (NGVCard *) card
|
- (void) _updatePhotoInVCard: (NGVCard *) card
|
||||||
fromProperties: (NSDictionary *) attachmentProps
|
fromProperties: (NSDictionary *) attachmentProps
|
||||||
{
|
{
|
||||||
NSString *photoExt, *photoType, *content;
|
NSString *photoExt, *photoType, *content;
|
||||||
CardElement *photo;
|
CardElement *photo;
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
|
|
||||||
/* sogo://username:password@{contacts,calendar,tasks,journal,notes,mail}/dossier/id */
|
/* sogo://username:password@{contacts,calendar,tasks,journal,notes,mail}/dossier/id */
|
||||||
|
|
||||||
static Class NSExceptionK, MAPIStoreFallbackContextK;
|
static Class NSExceptionK, MAPIStoreFallbackContextK, SOGoObjectK;
|
||||||
|
|
||||||
static NSMutableDictionary *contextClassMapping;
|
static NSMutableDictionary *contextClassMapping;
|
||||||
|
|
||||||
|
@ -79,6 +79,7 @@ static NSMutableDictionary *contextClassMapping;
|
||||||
NSString *moduleName;
|
NSString *moduleName;
|
||||||
|
|
||||||
NSExceptionK = [NSException class];
|
NSExceptionK = [NSException class];
|
||||||
|
SOGoObjectK = [SOGoObject class];
|
||||||
|
|
||||||
contextClassMapping = [NSMutableDictionary new];
|
contextClassMapping = [NSMutableDictionary new];
|
||||||
classes = GSObjCAllSubclassesOfClass (self);
|
classes = GSObjCAllSubclassesOfClass (self);
|
||||||
|
@ -441,10 +442,11 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri)
|
||||||
= [currentFolder lookupName: [pathComponents objectAtIndex: count]
|
= [currentFolder lookupName: [pathComponents objectAtIndex: count]
|
||||||
inContext: woContext
|
inContext: woContext
|
||||||
acquire: NO];
|
acquire: NO];
|
||||||
if ([currentFolder isKindOfClass: NSExceptionK])
|
if ([currentFolder isKindOfClass: SOGoObjectK]) /* class common to all
|
||||||
currentFolder = nil;
|
SOGo folder types */
|
||||||
else
|
|
||||||
[containersBag addObject: currentFolder];
|
[containersBag addObject: currentFolder];
|
||||||
|
else
|
||||||
|
currentFolder = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentFolder)
|
if (currentFolder)
|
||||||
|
@ -457,8 +459,10 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri)
|
||||||
*folderPtr = baseFolder;
|
*folderPtr = baseFolder;
|
||||||
rc = MAPISTORE_SUCCESS;
|
rc = MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
else
|
else if ([[userContext sogoUser] isEqual: activeUser])
|
||||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||||
|
else
|
||||||
|
rc = MAPISTORE_ERR_DENIED;
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
andType: MAPISTORE_FAI_TABLE];
|
andType: MAPISTORE_FAI_TABLE];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAssociated: (void **) data
|
- (int) getPidTagAssociated: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getYes: data inMemCtx: memCtx];
|
return [self getYes: data inMemCtx: memCtx];
|
||||||
|
|
|
@ -163,8 +163,9 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
|
||||||
NSUInteger count, max;
|
NSUInteger count, max;
|
||||||
NSDate *date, *fileDate;
|
NSDate *date, *fileDate;
|
||||||
MAPIStoreFSMessage *msg;
|
MAPIStoreFSMessage *msg;
|
||||||
|
NSArray *messageKeys;
|
||||||
|
|
||||||
[self messageKeys];
|
messageKeys = [self messageKeys];
|
||||||
|
|
||||||
date = [NSCalendarDate date];
|
date = [NSCalendarDate date];
|
||||||
[self logWithFormat: @"current date: %@", date];
|
[self logWithFormat: @"current date: %@", date];
|
||||||
|
|
|
@ -59,7 +59,7 @@ static Class MAPIStoreFSMessageK = Nil;
|
||||||
NSNumber *version;
|
NSNumber *version;
|
||||||
uint64_t cVersion;
|
uint64_t cVersion;
|
||||||
|
|
||||||
if ((uint32_t) res->ulPropTag == PR_CHANGE_NUM)
|
if ((uint32_t) res->ulPropTag == PidTagChangeNumber)
|
||||||
{
|
{
|
||||||
value = NSObjectFromMAPISPropValue (&res->lpProp);
|
value = NSObjectFromMAPISPropValue (&res->lpProp);
|
||||||
cVersion = exchange_globcnt ([value unsignedLongLongValue] >> 16);
|
cVersion = exchange_globcnt ([value unsignedLongLongValue] >> 16);
|
||||||
|
|
|
@ -46,9 +46,9 @@
|
||||||
@interface MAPIStoreFolder : MAPIStoreObject
|
@interface MAPIStoreFolder : MAPIStoreObject
|
||||||
{
|
{
|
||||||
MAPIStoreContext *context;
|
MAPIStoreContext *context;
|
||||||
NSArray *messageKeys;
|
// NSArray *messageKeys;
|
||||||
NSArray *faiMessageKeys;
|
// NSArray *faiMessageKeys;
|
||||||
NSArray *folderKeys;
|
// NSArray *folderKeys;
|
||||||
|
|
||||||
SOGoMAPIFSFolder *faiFolder;
|
SOGoMAPIFSFolder *faiFolder;
|
||||||
SOGoMAPIFSFolder *propsFolder;
|
SOGoMAPIFSFolder *propsFolder;
|
||||||
|
|
|
@ -56,7 +56,6 @@
|
||||||
#include <util/attr.h>
|
#include <util/attr.h>
|
||||||
#include <libmapiproxy.h>
|
#include <libmapiproxy.h>
|
||||||
#include <mapistore/mapistore.h>
|
#include <mapistore/mapistore.h>
|
||||||
#include <mapistore/mapistore_nameid.h>
|
|
||||||
#include <mapistore/mapistore_errors.h>
|
#include <mapistore/mapistore_errors.h>
|
||||||
|
|
||||||
Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMessageTableK, MAPIStoreFolderTableK;
|
Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMessageTableK, MAPIStoreFolderTableK;
|
||||||
|
@ -76,9 +75,9 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
{
|
{
|
||||||
if ((self = [super init]))
|
if ((self = [super init]))
|
||||||
{
|
{
|
||||||
messageKeys = nil;
|
// messageKeys = nil;
|
||||||
faiMessageKeys = nil;
|
// faiMessageKeys = nil;
|
||||||
folderKeys = nil;
|
// folderKeys = nil;
|
||||||
faiFolder = nil;
|
faiFolder = nil;
|
||||||
context = nil;
|
context = nil;
|
||||||
|
|
||||||
|
@ -142,11 +141,11 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
|
// [messageKeys release];
|
||||||
|
// [faiMessageKeys release];
|
||||||
|
// [folderKeys release];
|
||||||
[propsMessage release];
|
[propsMessage release];
|
||||||
[propsFolder release];
|
[propsFolder release];
|
||||||
[messageKeys release];
|
|
||||||
[faiMessageKeys release];
|
|
||||||
[folderKeys release];
|
|
||||||
[faiFolder release];
|
[faiFolder release];
|
||||||
[context release];
|
[context release];
|
||||||
|
|
||||||
|
@ -167,16 +166,16 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
uint64_t cn;
|
uint64_t cn;
|
||||||
|
|
||||||
props = [propsMessage properties];
|
props = [propsMessage properties];
|
||||||
value = [props objectForKey: MAPIPropertyKey (PR_CHANGE_NUM)];
|
value = [props objectForKey: MAPIPropertyKey (PidTagChangeNumber)];
|
||||||
if (value)
|
if (value)
|
||||||
cn = [value unsignedLongLongValue];
|
cn = [value unsignedLongLongValue];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[self logWithFormat: @"no value for PR_CHANGE_NUM, adding one now"];
|
[self logWithFormat: @"no value for PidTagChangeNumber, adding one now"];
|
||||||
cn = [[self context] getNewChangeNumber];
|
cn = [[self context] getNewChangeNumber];
|
||||||
value = [NSNumber numberWithUnsignedLongLong: cn];
|
value = [NSNumber numberWithUnsignedLongLong: cn];
|
||||||
props = [NSDictionary dictionaryWithObject: value
|
props = [NSDictionary dictionaryWithObject: value
|
||||||
forKey: MAPIPropertyKey (PR_CHANGE_NUM)];
|
forKey: MAPIPropertyKey (PidTagChangeNumber)];
|
||||||
[propsMessage appendProperties: props];
|
[propsMessage appendProperties: props];
|
||||||
[propsMessage save];
|
[propsMessage save];
|
||||||
}
|
}
|
||||||
|
@ -262,8 +261,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
|
|
||||||
if (messageKey)
|
if (messageKey)
|
||||||
{
|
{
|
||||||
[self faiMessageKeys];
|
if ([[self faiMessageKeys] containsObject: messageKey])
|
||||||
if ([faiMessageKeys containsObject: messageKey])
|
|
||||||
{
|
{
|
||||||
msgObject = [faiFolder lookupName: messageKey
|
msgObject = [faiFolder lookupName: messageKey
|
||||||
inContext: nil
|
inContext: nil
|
||||||
|
@ -770,9 +768,14 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
isAddition: (BOOL) isAddition
|
isAddition: (BOOL) isAddition
|
||||||
withACLFolder: (SOGoFolder *) aclFolder
|
withACLFolder: (SOGoFolder *) aclFolder
|
||||||
{
|
{
|
||||||
|
if (user)
|
||||||
|
{
|
||||||
if (isAddition)
|
if (isAddition)
|
||||||
[aclFolder addUserInAcls: user];
|
[aclFolder addUserInAcls: user];
|
||||||
[aclFolder setRoles: roles forUser: user];
|
[aclFolder setRoles: roles forUser: user];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
[self logWithFormat: @"user is nil, keeping intended entry intact"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setupVersionsMessage
|
- (void) setupVersionsMessage
|
||||||
|
@ -951,6 +954,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
{
|
{
|
||||||
int rc = MAPISTORE_SUCCESS;
|
int rc = MAPISTORE_SUCCESS;
|
||||||
MAPIStoreTable *table;
|
MAPIStoreTable *table;
|
||||||
|
SOGoUser *ownerUser;
|
||||||
|
|
||||||
if (tableType == MAPISTORE_MESSAGE_TABLE)
|
if (tableType == MAPISTORE_MESSAGE_TABLE)
|
||||||
table = [self messageTable];
|
table = [self messageTable];
|
||||||
|
@ -959,13 +963,22 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
else if (tableType == MAPISTORE_FOLDER_TABLE)
|
else if (tableType == MAPISTORE_FOLDER_TABLE)
|
||||||
table = [self folderTable];
|
table = [self folderTable];
|
||||||
else if (tableType == MAPISTORE_PERMISSIONS_TABLE)
|
else if (tableType == MAPISTORE_PERMISSIONS_TABLE)
|
||||||
|
{
|
||||||
|
ownerUser = [[self userContext] sogoUser];
|
||||||
|
if ([[context activeUser] isEqual: ownerUser])
|
||||||
table = [self permissionsTable];
|
table = [self permissionsTable];
|
||||||
|
else
|
||||||
|
rc = MAPISTORE_ERR_DENIED;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
table = nil;
|
table = nil;
|
||||||
[NSException raise: @"MAPIStoreIOException"
|
[NSException raise: @"MAPIStoreIOException"
|
||||||
format: @"unsupported table type: %d", tableType];
|
format: @"unsupported table type: %d", tableType];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rc == MAPISTORE_SUCCESS)
|
||||||
|
{
|
||||||
if (table)
|
if (table)
|
||||||
{
|
{
|
||||||
[table setHandleId: handleId];
|
[table setHandleId: handleId];
|
||||||
|
@ -974,6 +987,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -1004,14 +1018,16 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
|
|
||||||
- (NSArray *) messageKeys
|
- (NSArray *) messageKeys
|
||||||
{
|
{
|
||||||
if (!messageKeys)
|
return [self messageKeysMatchingQualifier: nil
|
||||||
{
|
|
||||||
messageKeys = [self messageKeysMatchingQualifier: nil
|
|
||||||
andSortOrderings: nil];
|
andSortOrderings: nil];
|
||||||
[messageKeys retain];
|
// if (!messageKeys)
|
||||||
}
|
// {
|
||||||
|
// messageKeys = [self messageKeysMatchingQualifier: nil
|
||||||
|
// andSortOrderings: nil];
|
||||||
|
// [messageKeys retain];
|
||||||
|
// }
|
||||||
|
|
||||||
return messageKeys;
|
// return messageKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (MAPIStoreFAIMessageTable *) faiMessageTable
|
- (MAPIStoreFAIMessageTable *) faiMessageTable
|
||||||
|
@ -1029,14 +1045,16 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
|
|
||||||
- (NSArray *) faiMessageKeys
|
- (NSArray *) faiMessageKeys
|
||||||
{
|
{
|
||||||
if (!faiMessageKeys)
|
return [self faiMessageKeysMatchingQualifier: nil
|
||||||
{
|
|
||||||
faiMessageKeys = [self faiMessageKeysMatchingQualifier: nil
|
|
||||||
andSortOrderings: nil];
|
andSortOrderings: nil];
|
||||||
[faiMessageKeys retain];
|
// if (!faiMessageKeys)
|
||||||
}
|
// {
|
||||||
|
// faiMessageKeys = [self faiMessageKeysMatchingQualifier: nil
|
||||||
|
// andSortOrderings: nil];
|
||||||
|
// [faiMessageKeys retain];
|
||||||
|
// }
|
||||||
|
|
||||||
return faiMessageKeys;
|
// return faiMessageKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (MAPIStoreFolderTable *) folderTable
|
- (MAPIStoreFolderTable *) folderTable
|
||||||
|
@ -1046,14 +1064,16 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
|
|
||||||
- (NSArray *) folderKeys
|
- (NSArray *) folderKeys
|
||||||
{
|
{
|
||||||
if (!folderKeys)
|
return [self folderKeysMatchingQualifier: nil
|
||||||
{
|
|
||||||
folderKeys = [self folderKeysMatchingQualifier: nil
|
|
||||||
andSortOrderings: nil];
|
andSortOrderings: nil];
|
||||||
[folderKeys retain];
|
// if (!folderKeys)
|
||||||
}
|
// {
|
||||||
|
// folderKeys = [self folderKeysMatchingQualifier: nil
|
||||||
|
// andSortOrderings: nil];
|
||||||
|
// [folderKeys retain];
|
||||||
|
// }
|
||||||
|
|
||||||
return folderKeys;
|
// return folderKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSArray *) folderKeysMatchingQualifier: (EOQualifier *) qualifier
|
- (NSArray *) folderKeysMatchingQualifier: (EOQualifier *) qualifier
|
||||||
|
@ -1099,15 +1119,15 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
[self _cleanupTableCaches: MAPISTORE_MESSAGE_TABLE];
|
[self _cleanupTableCaches: MAPISTORE_MESSAGE_TABLE];
|
||||||
[self _cleanupTableCaches: MAPISTORE_FAI_TABLE];
|
[self _cleanupTableCaches: MAPISTORE_FAI_TABLE];
|
||||||
[self _cleanupTableCaches: MAPISTORE_FOLDER_TABLE];
|
[self _cleanupTableCaches: MAPISTORE_FOLDER_TABLE];
|
||||||
[faiMessageKeys release];
|
// [faiMessageKeys release];
|
||||||
faiMessageKeys = nil;
|
// faiMessageKeys = nil;
|
||||||
[messageKeys release];
|
// [messageKeys release];
|
||||||
messageKeys = nil;
|
// messageKeys = nil;
|
||||||
[folderKeys release];
|
// [folderKeys release];
|
||||||
folderKeys = nil;
|
// folderKeys = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrParentFid: (void **) data
|
- (int) getPidTagParentFolderId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongLongValue (memCtx, [container objectId]);
|
*data = MAPILongLongValue (memCtx, [container objectId]);
|
||||||
|
@ -1115,7 +1135,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrFid: (void **) data
|
- (int) getPidTagFolderId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongLongValue (memCtx, [self objectId]);
|
*data = MAPILongLongValue (memCtx, [self objectId]);
|
||||||
|
@ -1133,7 +1153,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
0x00000010 Create Contents Table
|
0x00000010 Create Contents Table
|
||||||
0x00000020 Create Associated Contents Table
|
0x00000020 Create Associated Contents Table
|
||||||
*/
|
*/
|
||||||
- (int) getPrAccess: (void **) data
|
- (int) getPidTagAccess: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
uint32_t access = 0;
|
uint32_t access = 0;
|
||||||
|
@ -1168,7 +1188,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
0x00000000 Read-Only
|
0x00000000 Read-Only
|
||||||
0x00000001 Modify
|
0x00000001 Modify
|
||||||
*/
|
*/
|
||||||
- (int) getPrAccessLevel: (void **) data
|
- (int) getPidTagAccessLevel: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, 0x01);
|
*data = MAPILongValue (memCtx, 0x01);
|
||||||
|
@ -1176,33 +1196,33 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttrHidden: (void **) data
|
- (int) getPidTagAttributeHidden: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getNo: data inMemCtx: memCtx];
|
return [self getNo: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttrSystem: (void **) data
|
- (int) getPidTagAttributeSystem: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getNo: data inMemCtx: memCtx];
|
return [self getNo: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttrReadOnly: (void **) data
|
- (int) getPidTagAttributeReadOnly: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getNo: data inMemCtx: memCtx];
|
return [self getNo: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSubfolders: (void **) data
|
- (int) getPidTagSubfolders: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPIBoolValue (memCtx, [folderKeys count] > 0);
|
*data = MAPIBoolValue (memCtx, [[self folderKeys] count] > 0);
|
||||||
|
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrFolderChildCount: (void **) data
|
- (int) getPidTagFolderChildCount: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, [[self folderKeys] count]);
|
*data = MAPILongValue (memCtx, [[self folderKeys] count]);
|
||||||
|
@ -1210,7 +1230,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrContentCount: (void **) data
|
- (int) getPidTagContentCount: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, [[self messageKeys] count]);
|
*data = MAPILongValue (memCtx, [[self messageKeys] count]);
|
||||||
|
@ -1218,7 +1238,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrContentUnread: (void **) data
|
- (int) getPidTagContentUnreadCount: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, 0);
|
*data = MAPILongValue (memCtx, 0);
|
||||||
|
@ -1226,7 +1246,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAssocContentCount: (void **) data
|
- (int) getPidTagAssociatedContentCount: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, [[self faiMessageKeys] count]);
|
*data = MAPILongValue (memCtx, [[self faiMessageKeys] count]);
|
||||||
|
@ -1234,7 +1254,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDeletedCountTotal: (void **) data
|
- (int) getPidTagDeletedCountTotal: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
/* TODO */
|
/* TODO */
|
||||||
|
@ -1243,12 +1263,19 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrLocalCommitTimeMax: (void **) data
|
- (int) getPidTagLocalCommitTimeMax: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [[self lastMessageModificationTime] asFileTimeInMemCtx: memCtx];
|
int rc = MAPISTORE_SUCCESS;
|
||||||
|
NSDate *date;
|
||||||
|
|
||||||
return MAPISTORE_SUCCESS;
|
date = [self lastMessageModificationTime];
|
||||||
|
if (date)
|
||||||
|
*data = [date asFileTimeInMemCtx: memCtx];
|
||||||
|
else
|
||||||
|
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||||
|
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getProperty: (void **) data
|
- (int) getProperty: (void **) data
|
||||||
|
@ -1390,6 +1417,8 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
NSString *username;
|
NSString *username;
|
||||||
struct ldb_context *samCtx;
|
struct ldb_context *samCtx;
|
||||||
|
|
||||||
|
if (bin && bin->cb)
|
||||||
|
{
|
||||||
bin32.cb = bin->cb;
|
bin32.cb = bin->cb;
|
||||||
bin32.lpb = bin->lpb;
|
bin32.lpb = bin->lpb;
|
||||||
|
|
||||||
|
@ -1404,6 +1433,9 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
else
|
else
|
||||||
username = nil;
|
username = nil;
|
||||||
talloc_free (entryId);
|
talloc_free (entryId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
username = nil;
|
||||||
|
|
||||||
return username;
|
return username;
|
||||||
}
|
}
|
||||||
|
@ -1415,6 +1447,12 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
NSUInteger count, max;
|
NSUInteger count, max;
|
||||||
MAPIStorePermissionEntry *entry;
|
MAPIStorePermissionEntry *entry;
|
||||||
|
|
||||||
|
if (memberId == 0)
|
||||||
|
username = [[self aclFolder] defaultUserID];
|
||||||
|
else if (memberId == ULLONG_MAX)
|
||||||
|
username = @"anonymous";
|
||||||
|
else
|
||||||
|
{
|
||||||
max = [entries count];
|
max = [entries count];
|
||||||
for (count = 0; !username && count < max; count++)
|
for (count = 0; !username && count < max; count++)
|
||||||
{
|
{
|
||||||
|
@ -1422,6 +1460,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
if ([entry memberId] == memberId)
|
if ([entry memberId] == memberId)
|
||||||
username = [entry userId];
|
username = [entry userId];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return username;
|
return username;
|
||||||
}
|
}
|
||||||
|
@ -1450,7 +1489,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
NSString *permissionUser;
|
NSString *permissionUser;
|
||||||
NSArray *entries;
|
NSArray *entries;
|
||||||
NSArray *permissionRoles;
|
NSArray *permissionRoles;
|
||||||
BOOL reset, isAdd;
|
BOOL reset, isAdd = NO, isDelete = NO, isModify = NO;
|
||||||
SOGoFolder *aclFolder;
|
SOGoFolder *aclFolder;
|
||||||
|
|
||||||
aclFolder = [self aclFolder];
|
aclFolder = [self aclFolder];
|
||||||
|
@ -1468,7 +1507,13 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
permissionUser = nil;
|
permissionUser = nil;
|
||||||
permissionRoles = nil;
|
permissionRoles = nil;
|
||||||
|
|
||||||
isAdd = (currentPermission->PermissionDataFlags == ROW_ADD);
|
if (currentPermission->PermissionDataFlags == ROW_ADD)
|
||||||
|
isAdd = YES;
|
||||||
|
else if (currentPermission->PermissionDataFlags == ROW_MODIFY)
|
||||||
|
isModify = YES;
|
||||||
|
else
|
||||||
|
isDelete = YES;
|
||||||
|
|
||||||
for (propCount = 0;
|
for (propCount = 0;
|
||||||
propCount < currentPermission->lpProps.cValues;
|
propCount < currentPermission->lpProps.cValues;
|
||||||
propCount++)
|
propCount++)
|
||||||
|
@ -1477,16 +1522,19 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
switch (mapiValue->ulPropTag)
|
switch (mapiValue->ulPropTag)
|
||||||
{
|
{
|
||||||
case PR_ENTRYID:
|
case PR_ENTRYID:
|
||||||
|
if (isAdd)
|
||||||
permissionUser
|
permissionUser
|
||||||
= [self _usernameFromEntryId: &mapiValue->value.bin];
|
= [self _usernameFromEntryId: &mapiValue->value.bin];
|
||||||
break;
|
break;
|
||||||
case PR_MEMBER_ID:
|
case PR_MEMBER_ID:
|
||||||
|
if (isModify || isDelete)
|
||||||
permissionUser = [self _usernameFromMemberId: mapiValue->value.d
|
permissionUser = [self _usernameFromMemberId: mapiValue->value.d
|
||||||
inEntries: entries];
|
inEntries: entries];
|
||||||
break;
|
break;
|
||||||
case PR_MEMBER_RIGHTS:
|
case PR_MEMBER_RIGHTS:
|
||||||
permissionRoles = [self
|
if (isAdd || isModify)
|
||||||
rolesForExchangeRights: mapiValue->value.l];
|
permissionRoles
|
||||||
|
= [self rolesForExchangeRights: mapiValue->value.l];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (mapiValue->ulPropTag != PR_MEMBER_NAME)
|
if (mapiValue->ulPropTag != PR_MEMBER_NAME)
|
||||||
|
|
|
@ -95,7 +95,7 @@
|
||||||
/* HACK: we cheat here as we current have no mechanism for searching
|
/* HACK: we cheat here as we current have no mechanism for searching
|
||||||
folders based on PR_CHANGE_NUM, which is used by the oxcfxics
|
folders based on PR_CHANGE_NUM, which is used by the oxcfxics
|
||||||
mechanism... */
|
mechanism... */
|
||||||
case PR_CHANGE_NUM:
|
case PidTagChangeNumber:
|
||||||
rc = MAPIRestrictionStateAlwaysTrue;
|
rc = MAPIRestrictionStateAlwaysTrue;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
{
|
{
|
||||||
SOGoMAPIFSMessage *versionsMessage;
|
SOGoMAPIFSMessage *versionsMessage;
|
||||||
NSArray *activeUserRoles;
|
NSArray *activeUserRoles;
|
||||||
|
EOQualifier *componentQualifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* synchronisation */
|
/* synchronisation */
|
||||||
|
@ -50,9 +51,12 @@
|
||||||
|
|
||||||
- (NSArray *) activeUserRoles;
|
- (NSArray *) activeUserRoles;
|
||||||
|
|
||||||
|
- (EOQualifier *) componentQualifier;
|
||||||
|
- (EOQualifier *) contentComponentQualifier;
|
||||||
|
|
||||||
/* subclasses */
|
/* subclasses */
|
||||||
- (EOQualifier *) aclQualifier;
|
- (EOQualifier *) aclQualifier;
|
||||||
- (EOQualifier *) componentQualifier;
|
- (NSString *) component;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,15 @@
|
||||||
#include <mapistore/mapistore.h>
|
#include <mapistore/mapistore.h>
|
||||||
#include <mapistore/mapistore_errors.h>
|
#include <mapistore/mapistore_errors.h>
|
||||||
|
|
||||||
|
static Class NSNumberK;
|
||||||
|
|
||||||
@implementation MAPIStoreGCSFolder
|
@implementation MAPIStoreGCSFolder
|
||||||
|
|
||||||
|
+ (void) initialize
|
||||||
|
{
|
||||||
|
NSNumberK = [NSNumber class];
|
||||||
|
}
|
||||||
|
|
||||||
- (id) initWithSOGoObject: (id) newSOGoObject
|
- (id) initWithSOGoObject: (id) newSOGoObject
|
||||||
inContainer: (MAPIStoreObject *) newContainer
|
inContainer: (MAPIStoreObject *) newContainer
|
||||||
{
|
{
|
||||||
|
@ -72,6 +79,7 @@
|
||||||
{
|
{
|
||||||
[versionsMessage release];
|
[versionsMessage release];
|
||||||
[activeUserRoles release];
|
[activeUserRoles release];
|
||||||
|
[componentQualifier release];
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +135,7 @@
|
||||||
[sogoObject renameTo: newDisplayName];
|
[sogoObject renameTo: newDisplayName];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDisplayName: (void **) data
|
- (int) getPidTagDisplayName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *displayName;
|
NSString *displayName;
|
||||||
|
@ -207,17 +215,17 @@
|
||||||
|
|
||||||
- (NSDate *) lastMessageModificationTime
|
- (NSDate *) lastMessageModificationTime
|
||||||
{
|
{
|
||||||
|
NSDate *value;
|
||||||
NSNumber *ti;
|
NSNumber *ti;
|
||||||
NSDate *value = nil;
|
|
||||||
|
[self synchroniseCache];
|
||||||
|
|
||||||
ti = [[versionsMessage properties]
|
ti = [[versionsMessage properties]
|
||||||
objectForKey: @"SyncLastSynchronisationDate"];
|
objectForKey: @"SyncLastModificationDate"];
|
||||||
if (ti)
|
if (ti)
|
||||||
value = [NSDate dateWithTimeIntervalSince1970: [ti doubleValue]];
|
value = [NSDate dateWithTimeIntervalSince1970: [ti doubleValue]];
|
||||||
else
|
else
|
||||||
value = [NSDate date];
|
value = nil;
|
||||||
|
|
||||||
[self logWithFormat: @"lastMessageModificationTime: %@", value];
|
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
@ -283,12 +291,41 @@
|
||||||
[changeList setObject: globCnt forKey: guid];
|
[changeList setObject: globCnt forKey: guid];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (EOQualifier *) componentQualifier
|
||||||
|
{
|
||||||
|
if (!componentQualifier)
|
||||||
|
componentQualifier
|
||||||
|
= [[EOKeyValueQualifier alloc] initWithKey: @"c_component"
|
||||||
|
operatorSelector: EOQualifierOperatorEqual
|
||||||
|
value: [self component]];
|
||||||
|
|
||||||
|
return componentQualifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (EOQualifier *) contentComponentQualifier
|
||||||
|
{
|
||||||
|
EOQualifier *contentComponentQualifier;
|
||||||
|
NSString *likeString;
|
||||||
|
|
||||||
|
likeString = [NSString stringWithFormat: @"%%BEGIN:%@%%",
|
||||||
|
[[self component] uppercaseString]];
|
||||||
|
contentComponentQualifier = [[EOKeyValueQualifier alloc]
|
||||||
|
initWithKey: @"c_content"
|
||||||
|
operatorSelector: EOQualifierOperatorLike
|
||||||
|
value: likeString];
|
||||||
|
[contentComponentQualifier autorelease];
|
||||||
|
|
||||||
|
return contentComponentQualifier;
|
||||||
|
}
|
||||||
|
|
||||||
- (BOOL) synchroniseCache
|
- (BOOL) synchroniseCache
|
||||||
{
|
{
|
||||||
BOOL rc = YES, foundChange = NO;
|
BOOL rc = YES, foundChange = NO;
|
||||||
uint64_t newChangeNum;
|
uint64_t newChangeNum;
|
||||||
NSData *changeKey;
|
NSData *changeKey;
|
||||||
NSNumber *ti, *changeNumber, *lastModificationDate, *cName, *cVersion, *cLastModified;
|
NSString *cName;
|
||||||
|
NSNumber *ti, *changeNumber, *lastModificationDate, *cVersion,
|
||||||
|
*cLastModified, *cDeleted;
|
||||||
EOFetchSpecification *fs;
|
EOFetchSpecification *fs;
|
||||||
EOQualifier *searchQualifier, *fetchQualifier;
|
EOQualifier *searchQualifier, *fetchQualifier;
|
||||||
NSUInteger count, max;
|
NSUInteger count, max;
|
||||||
|
@ -303,7 +340,7 @@
|
||||||
if (!fields)
|
if (!fields)
|
||||||
fields = [[NSArray alloc]
|
fields = [[NSArray alloc]
|
||||||
initWithObjects: @"c_name", @"c_version", @"c_lastmodified",
|
initWithObjects: @"c_name", @"c_version", @"c_lastmodified",
|
||||||
nil];
|
@"c_deleted", nil];
|
||||||
|
|
||||||
if (!sortOrdering)
|
if (!sortOrdering)
|
||||||
{
|
{
|
||||||
|
@ -312,12 +349,36 @@
|
||||||
[sortOrdering retain];
|
[sortOrdering retain];
|
||||||
}
|
}
|
||||||
|
|
||||||
now = [NSCalendarDate date];
|
currentProperties = [versionsMessage properties];
|
||||||
|
|
||||||
currentProperties = [[versionsMessage properties] mutableCopy];
|
lastModificationDate = [currentProperties objectForKey: @"SyncLastModificationDate"];
|
||||||
if (!currentProperties)
|
if (lastModificationDate)
|
||||||
currentProperties = [NSMutableDictionary new];
|
{
|
||||||
[currentProperties autorelease];
|
searchQualifier = [[EOKeyValueQualifier alloc]
|
||||||
|
initWithKey: @"c_lastmodified"
|
||||||
|
operatorSelector: EOQualifierOperatorGreaterThanOrEqualTo
|
||||||
|
value: lastModificationDate];
|
||||||
|
fetchQualifier = [[EOAndQualifier alloc]
|
||||||
|
initWithQualifiers: searchQualifier,
|
||||||
|
[self contentComponentQualifier],
|
||||||
|
nil];
|
||||||
|
[fetchQualifier autorelease];
|
||||||
|
[searchQualifier release];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
fetchQualifier = [self componentQualifier];
|
||||||
|
|
||||||
|
ocsFolder = [sogoObject ocsFolder];
|
||||||
|
fs = [EOFetchSpecification
|
||||||
|
fetchSpecificationWithEntityName: [ocsFolder folderName]
|
||||||
|
qualifier: fetchQualifier
|
||||||
|
sortOrderings: [NSArray arrayWithObject: sortOrdering]];
|
||||||
|
fetchResults = [ocsFolder fetchFields: fields
|
||||||
|
fetchSpecification: fs
|
||||||
|
ignoreDeleted: NO];
|
||||||
|
max = [fetchResults count];
|
||||||
|
if (max > 0)
|
||||||
|
{
|
||||||
messages = [currentProperties objectForKey: @"Messages"];
|
messages = [currentProperties objectForKey: @"Messages"];
|
||||||
if (!messages)
|
if (!messages)
|
||||||
{
|
{
|
||||||
|
@ -333,37 +394,16 @@
|
||||||
[mapping release];
|
[mapping release];
|
||||||
}
|
}
|
||||||
|
|
||||||
lastModificationDate = [currentProperties objectForKey: @"SyncLastModificationDate"];
|
|
||||||
if (lastModificationDate)
|
|
||||||
{
|
|
||||||
searchQualifier = [[EOKeyValueQualifier alloc]
|
|
||||||
initWithKey: @"c_lastmodified"
|
|
||||||
operatorSelector: EOQualifierOperatorGreaterThanOrEqualTo
|
|
||||||
value: lastModificationDate];
|
|
||||||
fetchQualifier = [[EOAndQualifier alloc]
|
|
||||||
initWithQualifiers:
|
|
||||||
searchQualifier, [self componentQualifier], nil];
|
|
||||||
[fetchQualifier autorelease];
|
|
||||||
[searchQualifier release];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
fetchQualifier = [self componentQualifier];
|
|
||||||
|
|
||||||
ocsFolder = [sogoObject ocsFolder];
|
|
||||||
fs = [EOFetchSpecification
|
|
||||||
fetchSpecificationWithEntityName: [ocsFolder folderName]
|
|
||||||
qualifier: fetchQualifier
|
|
||||||
sortOrderings: [NSArray arrayWithObject: sortOrdering]];
|
|
||||||
fetchResults = [ocsFolder fetchFields: fields fetchSpecification: fs];
|
|
||||||
max = [fetchResults count];
|
|
||||||
if (max > 0)
|
|
||||||
{
|
|
||||||
ldb_transaction_start([[self context] connectionInfo]->oc_ctx);
|
ldb_transaction_start([[self context] connectionInfo]->oc_ctx);
|
||||||
|
|
||||||
for (count = 0; count < max; count++)
|
for (count = 0; count < max; count++)
|
||||||
{
|
{
|
||||||
result = [fetchResults objectAtIndex: count];
|
result = [fetchResults objectAtIndex: count];
|
||||||
cName = [result objectForKey: @"c_name"];
|
cName = [result objectForKey: @"c_name"];
|
||||||
|
cDeleted = [result objectForKey: @"c_deleted"];
|
||||||
|
if ([cDeleted isKindOfClass: NSNumberK] && [cDeleted intValue])
|
||||||
|
cVersion = [NSNumber numberWithInt: -1];
|
||||||
|
else
|
||||||
cVersion = [result objectForKey: @"c_version"];
|
cVersion = [result objectForKey: @"c_version"];
|
||||||
cLastModified = [result objectForKey: @"c_lastmodified"];
|
cLastModified = [result objectForKey: @"c_lastmodified"];
|
||||||
|
|
||||||
|
@ -374,9 +414,12 @@
|
||||||
[messages setObject: messageEntry forKey: cName];
|
[messages setObject: messageEntry forKey: cName];
|
||||||
[messageEntry release];
|
[messageEntry release];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (![[messageEntry objectForKey: @"c_version"]
|
if (![[messageEntry objectForKey: @"c_version"]
|
||||||
isEqual: cVersion])
|
isEqual: cVersion])
|
||||||
{
|
{
|
||||||
|
[sogoObject removeChildRecordWithName: cName];
|
||||||
|
|
||||||
foundChange = YES;
|
foundChange = YES;
|
||||||
|
|
||||||
newChangeNum = [[self context] getNewChangeNumber];
|
newChangeNum = [[self context] getNewChangeNumber];
|
||||||
|
@ -402,6 +445,7 @@
|
||||||
|
|
||||||
if (foundChange)
|
if (foundChange)
|
||||||
{
|
{
|
||||||
|
now = [NSCalendarDate date];
|
||||||
ti = [NSNumber numberWithDouble: [now timeIntervalSince1970]];
|
ti = [NSNumber numberWithDouble: [now timeIntervalSince1970]];
|
||||||
[currentProperties setObject: ti
|
[currentProperties setObject: ti
|
||||||
forKey: @"SyncLastSynchronisationDate"];
|
forKey: @"SyncLastSynchronisationDate"];
|
||||||
|
@ -526,9 +570,9 @@
|
||||||
NSArray *deletedKeys, *deletedCNames, *records;
|
NSArray *deletedKeys, *deletedCNames, *records;
|
||||||
NSNumber *changeNumNbr, *lastModified;
|
NSNumber *changeNumNbr, *lastModified;
|
||||||
NSString *cName;
|
NSString *cName;
|
||||||
NSDictionary *versionProperties;
|
NSDictionary *versionProperties, *messageEntry;
|
||||||
NSMutableDictionary *messages, *mapping;
|
NSMutableDictionary *messages;
|
||||||
uint64_t newChangeNum = 0;
|
uint64_t maxChangeNum = changeNum, currentChangeNum;
|
||||||
EOAndQualifier *fetchQualifier;
|
EOAndQualifier *fetchQualifier;
|
||||||
EOKeyValueQualifier *cDeletedQualifier, *cLastModifiedQualifier;
|
EOKeyValueQualifier *cDeletedQualifier, *cLastModifiedQualifier;
|
||||||
EOFetchSpecification *fs;
|
EOFetchSpecification *fs;
|
||||||
|
@ -573,28 +617,28 @@
|
||||||
ignoreDeleted: NO];
|
ignoreDeleted: NO];
|
||||||
deletedCNames = [records objectsForKey: @"c_name" notFoundMarker: nil];
|
deletedCNames = [records objectsForKey: @"c_name" notFoundMarker: nil];
|
||||||
max = [deletedCNames count];
|
max = [deletedCNames count];
|
||||||
if (max > 0)
|
|
||||||
{
|
|
||||||
mapping = [versionProperties objectForKey: @"VersionsMapping"];
|
|
||||||
for (count = 0; count < max; count++)
|
for (count = 0; count < max; count++)
|
||||||
{
|
{
|
||||||
cName = [deletedCNames objectAtIndex: count];
|
cName = [deletedCNames objectAtIndex: count];
|
||||||
if ([messages objectForKey: cName])
|
[sogoObject removeChildRecordWithName: cName];
|
||||||
|
messageEntry = [messages objectForKey: cName];
|
||||||
|
if (messageEntry)
|
||||||
|
{
|
||||||
|
currentChangeNum
|
||||||
|
= [[messageEntry objectForKey: @"version"]
|
||||||
|
unsignedLongLongValue];
|
||||||
|
if (MAPICNCompare (changeNum, currentChangeNum)
|
||||||
|
== NSOrderedAscending)
|
||||||
{
|
{
|
||||||
[messages removeObjectForKey: cName];
|
|
||||||
[(NSMutableArray *) deletedKeys addObject: cName];
|
[(NSMutableArray *) deletedKeys addObject: cName];
|
||||||
newChangeNum = [[self context] getNewChangeNumber];
|
if (MAPICNCompare (maxChangeNum, currentChangeNum)
|
||||||
|
== NSOrderedAscending)
|
||||||
|
maxChangeNum = currentChangeNum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (newChangeNum)
|
|
||||||
{
|
|
||||||
changeNumNbr
|
|
||||||
= [NSNumber numberWithUnsignedLongLong: newChangeNum];
|
|
||||||
[mapping setObject: lastModified forKey: changeNumNbr];
|
|
||||||
*cnNbr = changeNumNbr;
|
|
||||||
[versionsMessage save];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (maxChangeNum != changeNum)
|
||||||
|
*cnNbr = [NSNumber numberWithUnsignedLongLong: maxChangeNum];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -639,7 +683,7 @@
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (EOQualifier *) componentQualifier
|
- (NSString *) component
|
||||||
{
|
{
|
||||||
[self subclassResponsibility: _cmd];
|
[self subclassResponsibility: _cmd];
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
return [sogoObject lastModified];
|
return [sogoObject lastModified];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAccess: (void **) data // TODO
|
- (int) getPidTagAccess: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
MAPIStoreContext *context;
|
MAPIStoreContext *context;
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAccessLevel: (void **) data // TODO
|
- (int) getPidTagAccessLevel: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
MAPIStoreContext *context;
|
MAPIStoreContext *context;
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrChangeKey: (void **) data
|
- (int) getPidTagChangeKey: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
int rc = MAPISTORE_SUCCESS;
|
int rc = MAPISTORE_SUCCESS;
|
||||||
|
@ -145,18 +145,26 @@
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrPredecessorChangeList: (void **) data
|
- (int) getPidTagPredecessorChangeList: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
int rc = MAPISTORE_SUCCESS;
|
int rc = MAPISTORE_SUCCESS;
|
||||||
NSData *changeList;
|
NSData *changeList;
|
||||||
|
MAPIStoreGCSFolder *parentFolder;
|
||||||
|
|
||||||
if (isNew)
|
if (isNew)
|
||||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
changeList = [(MAPIStoreGCSFolder *)[self container]
|
parentFolder = (MAPIStoreGCSFolder *)[self container];
|
||||||
|
changeList = [parentFolder
|
||||||
predecessorChangeListForMessageWithKey: [self nameInContainer]];
|
predecessorChangeListForMessageWithKey: [self nameInContainer]];
|
||||||
|
if (!changeList)
|
||||||
|
{
|
||||||
|
[parentFolder synchroniseCache];
|
||||||
|
changeList = [parentFolder
|
||||||
|
predecessorChangeListForMessageWithKey: [self nameInContainer]];
|
||||||
|
}
|
||||||
if (!changeList)
|
if (!changeList)
|
||||||
abort ();
|
abort ();
|
||||||
*data = [changeList asBinaryInMemCtx: memCtx];
|
*data = [changeList asBinaryInMemCtx: memCtx];
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
MAPIRestrictionState rc;
|
MAPIRestrictionState rc;
|
||||||
TALLOC_CTX *memCtx = NULL;
|
TALLOC_CTX *memCtx = NULL;
|
||||||
|
|
||||||
if (res->ulPropTag == PR_CHANGE_NUM)
|
if (res->ulPropTag == PidTagChangeNumber)
|
||||||
{
|
{
|
||||||
value = NSObjectFromMAPISPropValue (&res->lpProp);
|
value = NSObjectFromMAPISPropValue (&res->lpProp);
|
||||||
lastModified = [(MAPIStoreGCSFolder *)
|
lastModified = [(MAPIStoreGCSFolder *)
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
ASSIGN (bodyInfo, newBodyInfo);
|
ASSIGN (bodyInfo, newBodyInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachMethod: (void **) data
|
- (int) getPidTagAttachMethod: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, 0x00000001); // afByValue
|
*data = MAPILongValue (memCtx, 0x00000001); // afByValue
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachTag: (void **) data
|
- (int) getPidTagAttachTag: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [[self mimeAttachTag] asBinaryInMemCtx: memCtx];
|
*data = [[self mimeAttachTag] asBinaryInMemCtx: memCtx];
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachSize: (void **) data
|
- (int) getPidTagAttachSize: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
uint32_t longValue;
|
uint32_t longValue;
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrRecordKey: (void **) data
|
- (int) getPidTagRecordKey: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
static char recordBytes[] = {0xd9, 0xd8, 0x11, 0xa3, 0xe2, 0x90, 0x18, 0x41,
|
static char recordBytes[] = {0xd9, 0xd8, 0x11, 0xa3, 0xe2, 0x90, 0x18, 0x41,
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
return fileName;
|
return fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachLongFilename: (void **) data
|
- (int) getPidTagAttachLongFilename: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [[self _fileName] asUnicodeInMemCtx: memCtx];
|
*data = [[self _fileName] asUnicodeInMemCtx: memCtx];
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachFilename: (void **) data
|
- (int) getPidTagAttachFilename: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *fileName, *baseName, *ext;
|
NSString *fileName, *baseName, *ext;
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDisplayName: (void **) data
|
- (int) getPidTagDisplayName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [[bodyInfo objectForKey: @"description"]
|
*data = [[bodyInfo objectForKey: @"description"]
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachContentId: (void **) data
|
- (int) getPidTagAttachContentId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [[bodyInfo objectForKey: @"bodyId"]
|
*data = [[bodyInfo objectForKey: @"bodyId"]
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachMimeTag: (void **) data
|
- (int) getPidTagAttachMimeTag: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *mimeTag;
|
NSString *mimeTag;
|
||||||
|
@ -184,7 +184,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAttachDataBin: (void **) data
|
- (int) getPidTagAttachDataBinary: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [[sogoObject fetchBLOBWithPeek: YES] asBinaryInMemCtx: memCtx];
|
*data = [[sogoObject fetchBLOBWithPeek: YES] asBinaryInMemCtx: memCtx];
|
||||||
|
|
|
@ -201,7 +201,7 @@ static Class SOGoMailFolderK, MAPIStoreOutboxFolderK;
|
||||||
return (rc == MAPISTORE_SUCCESS) ? [super deleteFolder] : rc;
|
return (rc == MAPISTORE_SUCCESS) ? [super deleteFolder] : rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrContentUnread: (void **) data
|
- (int) getPidTagContentUnreadCount: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
EOQualifier *searchQualifier;
|
EOQualifier *searchQualifier;
|
||||||
|
@ -217,7 +217,7 @@ static Class SOGoMailFolderK, MAPIStoreOutboxFolderK;
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrContainerClass: (void **) data
|
- (int) getPidTagContainerClass: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [@"IPF.Note" asUnicodeInMemCtx: memCtx];
|
*data = [@"IPF.Note" asUnicodeInMemCtx: memCtx];
|
||||||
|
@ -225,7 +225,7 @@ static Class SOGoMailFolderK, MAPIStoreOutboxFolderK;
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageClass: (void **) data
|
- (int) getPidTagMessageClass: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [@"IPM.Note" asUnicodeInMemCtx: memCtx];
|
*data = [@"IPM.Note" asUnicodeInMemCtx: memCtx];
|
||||||
|
@ -902,7 +902,7 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
||||||
{
|
{
|
||||||
NGImap4Connection *connection;
|
NGImap4Connection *connection;
|
||||||
NGImap4Client *client;
|
NGImap4Client *client;
|
||||||
NSString *sourceFolderName, *targetFolderName, *messageURL, *v;
|
NSString *sourceFolderName, *targetFolderName, *messageURL, *messageKey, *v;
|
||||||
NSMutableArray *uids, *oldMessageURLs;
|
NSMutableArray *uids, *oldMessageURLs;
|
||||||
NSNumber *uid;
|
NSNumber *uid;
|
||||||
NSArray *destUIDs;
|
NSArray *destUIDs;
|
||||||
|
@ -910,6 +910,7 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
||||||
NSDictionary *result;
|
NSDictionary *result;
|
||||||
NSUInteger count;
|
NSUInteger count;
|
||||||
NSArray *a;
|
NSArray *a;
|
||||||
|
NSData *changeKey;
|
||||||
|
|
||||||
if (![sourceFolder isKindOfClass: [MAPIStoreMailFolder class]])
|
if (![sourceFolder isKindOfClass: [MAPIStoreMailFolder class]])
|
||||||
return [super moveCopyMessagesWithMIDs: srcMids andCount: midCount
|
return [super moveCopyMessagesWithMIDs: srcMids andCount: midCount
|
||||||
|
@ -989,6 +990,17 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
||||||
[mapping registerURL: messageURL withID: targetMids[count]];
|
[mapping registerURL: messageURL withID: targetMids[count]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Update the change keys */
|
||||||
|
[self synchroniseCache];
|
||||||
|
for (count = 0; count < midCount; count++)
|
||||||
|
{
|
||||||
|
changeKey = [NSData dataWithBinary: targetChangeKeys[count]];
|
||||||
|
messageKey = [NSString stringWithFormat: @"%@.eml",
|
||||||
|
[destUIDs objectAtIndex: count]];
|
||||||
|
[self setChangeKey: changeKey
|
||||||
|
forMessageWithKey: messageKey];
|
||||||
|
}
|
||||||
|
|
||||||
[self postNotificationsForMoveCopyMessagesWithMIDs: srcMids
|
[self postNotificationsForMoveCopyMessagesWithMIDs: srcMids
|
||||||
andMessageURLs: oldMessageURLs
|
andMessageURLs: oldMessageURLs
|
||||||
andCount: midCount
|
andCount: midCount
|
||||||
|
@ -1085,7 +1097,7 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
||||||
|
|
||||||
@implementation MAPIStoreOutboxFolder
|
@implementation MAPIStoreOutboxFolder
|
||||||
|
|
||||||
- (int) getPrDisplayName: (void **) data
|
- (int) getPidTagDisplayName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [@"Outbox" asUnicodeInMemCtx: memCtx];
|
*data = [@"Outbox" asUnicodeInMemCtx: memCtx];
|
||||||
|
|
|
@ -48,26 +48,26 @@
|
||||||
|
|
||||||
- (NSString *) subject;
|
- (NSString *) subject;
|
||||||
|
|
||||||
- (int) getPrIconIndex: (void **) data
|
- (int) getPidTagIconIndex: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrFlagStatus: (void **) data
|
- (int) getPidTagFlagStatus: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
|
|
||||||
- (int) getPrMessageFlags: (void **) data
|
- (int) getPidTagMessageFlags: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrFollowupIcon: (void **) data
|
- (int) getPidTagFollowupIcon: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrImportance: (void **) data
|
- (int) getPidTagImportance: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrReceivedByEmailAddress: (void **) data
|
- (int) getPidTagReceivedByEmailAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrSenderEmailAddress: (void **) data
|
- (int) getPidTagSenderEmailAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrDisplayTo: (void **) data
|
- (int) getPidTagDisplayTo: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrDisplayCc: (void **) data
|
- (int) getPidTagDisplayCc: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrDisplayBcc: (void **) data
|
- (int) getPidTagDisplayBcc: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -58,7 +58,6 @@
|
||||||
#include <gen_ndr/exchange.h>
|
#include <gen_ndr/exchange.h>
|
||||||
#include <mapistore/mapistore.h>
|
#include <mapistore/mapistore.h>
|
||||||
#include <mapistore/mapistore_errors.h>
|
#include <mapistore/mapistore_errors.h>
|
||||||
#include <mapistore/mapistore_nameid.h>
|
|
||||||
|
|
||||||
@class iCalCalendar, iCalEvent;
|
@class iCalCalendar, iCalEvent;
|
||||||
|
|
||||||
|
@ -294,7 +293,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return appointmentWrapper;
|
return appointmentWrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrChangeKey: (void **) data
|
- (int) getPidTagChangeKey: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
int rc = MAPISTORE_SUCCESS;
|
int rc = MAPISTORE_SUCCESS;
|
||||||
|
@ -330,7 +329,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrPredecessorChangeList: (void **) data
|
- (int) getPidTagPredecessorChangeList: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
int rc = MAPISTORE_SUCCESS;
|
int rc = MAPISTORE_SUCCESS;
|
||||||
|
@ -397,7 +396,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrIconIndex: (void **) data
|
- (int) getPidTagIconIndex: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
uint32_t longValue;
|
uint32_t longValue;
|
||||||
|
@ -406,7 +405,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
[self _fetchHeaderData];
|
[self _fetchHeaderData];
|
||||||
|
|
||||||
if (mailIsEvent)
|
if (mailIsEvent)
|
||||||
[[self _appointmentWrapper] getPrIconIndex: data inMemCtx: memCtx];
|
[[self _appointmentWrapper] getPidTagIconIndex: data inMemCtx: memCtx];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* see http://msdn.microsoft.com/en-us/library/cc815472.aspx */
|
/* see http://msdn.microsoft.com/en-us/library/cc815472.aspx */
|
||||||
|
@ -448,7 +447,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSubject: (void **) data
|
- (int) getPidTagSubject: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -461,7 +460,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSubjectPrefix: (void **) data
|
- (int) getPidTagSubjectPrefix: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *subject;
|
NSString *subject;
|
||||||
|
@ -480,7 +479,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrNormalizedSubject: (void **) data
|
- (int) getPidTagNormalizedSubject: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *subject;
|
NSString *subject;
|
||||||
|
@ -507,14 +506,14 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return [self getYes: data inMemCtx: memCtx];
|
return [self getYes: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageClass: (void **) data
|
- (int) getPidTagMessageClass: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
if (!headerSetup)
|
if (!headerSetup)
|
||||||
[self _fetchHeaderData];
|
[self _fetchHeaderData];
|
||||||
|
|
||||||
if (mailIsEvent)
|
if (mailIsEvent)
|
||||||
[[self _appointmentWrapper] getPrMessageClass: data
|
[[self _appointmentWrapper] getPidTagMessageClass: data
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
else
|
else
|
||||||
*data = talloc_strdup (memCtx, "IPM.Note");
|
*data = talloc_strdup (memCtx, "IPM.Note");
|
||||||
|
@ -523,7 +522,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note: this applies to regular mails... */
|
/* Note: this applies to regular mails... */
|
||||||
// - (int) getPrReplyRequested: (void **) data // TODO
|
// - (int) getPidTagReplyRequested: (void **) data // TODO
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
// inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
// {
|
// {
|
||||||
// if (!headerSetup)
|
// if (!headerSetup)
|
||||||
|
@ -535,7 +534,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/* ... while this applies to invitations. */
|
/* ... while this applies to invitations. */
|
||||||
- (int) getPrResponseRequested: (void **) data // TODO
|
- (int) getPidTagResponseRequested: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
if (!headerSetup)
|
if (!headerSetup)
|
||||||
|
@ -546,31 +545,31 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
: MAPISTORE_ERR_NOT_FOUND);
|
: MAPISTORE_ERR_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrLatestDeliveryTime: (void **) data // DOUBT
|
- (int) getPidTagLatestDeliveryTime: (void **) data // DOUBT
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrCreationTime: data inMemCtx: memCtx];
|
return [self getPidTagCreationTime: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrOriginalSubmitTime: (void **) data
|
- (int) getPidTagOriginalSubmitTime: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrCreationTime: data inMemCtx: memCtx];
|
return [self getPidTagCreationTime: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrClientSubmitTime: (void **) data
|
- (int) getPidTagClientSubmitTime: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrCreationTime: data inMemCtx: memCtx];
|
return [self getPidTagCreationTime: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageDeliveryTime: (void **) data
|
- (int) getPidTagMessageDeliveryTime: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrCreationTime: data inMemCtx: memCtx];
|
return [self getPidTagCreationTime: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageFlags: (void **) data // TODO
|
- (int) getPidTagMessageFlags: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSDictionary *coreInfos;
|
NSDictionary *coreInfos;
|
||||||
|
@ -594,7 +593,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrFlagStatus: (void **) data
|
- (int) getPidTagFlagStatus: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSDictionary *coreInfos;
|
NSDictionary *coreInfos;
|
||||||
|
@ -614,7 +613,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrFollowupIcon: (void **) data
|
- (int) getPidTagFollowupIcon: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSDictionary *coreInfos;
|
NSDictionary *coreInfos;
|
||||||
|
@ -634,37 +633,37 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSensitivity: (void **) data // TODO
|
- (int) getPidTagSensitivity: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrOriginalSensitivity: (void **) data // TODO
|
- (int) getPidTagOriginalSensitivity: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrSensitivity: data inMemCtx: memCtx];
|
return [self getPidTagSensitivity: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSentRepresentingAddrtype: (void **) data
|
- (int) getPidTagSentRepresentingAddressType: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getSMTPAddrType: data inMemCtx: memCtx];
|
return [self getSMTPAddrType: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrRcvdRepresentingAddrtype: (void **) data
|
- (int) getPidTagReceivedRepresentingAddressType: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getSMTPAddrType: data inMemCtx: memCtx];
|
return [self getSMTPAddrType: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrReceivedByAddrtype: (void **) data
|
- (int) getPidTagReceivedByAddressType: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getSMTPAddrType: data inMemCtx: memCtx];
|
return [self getSMTPAddrType: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSenderAddrtype: (void **) data
|
- (int) getPidTagSenderAddressType: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getSMTPAddrType: data inMemCtx: memCtx];
|
return [self getSMTPAddrType: data inMemCtx: memCtx];
|
||||||
|
@ -762,7 +761,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSenderEmailAddress: (void **) data
|
- (int) getPidTagSenderEmailAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getEmailAddressFromEmail: [sogoObject from]
|
return [self _getEmailAddressFromEmail: [sogoObject from]
|
||||||
|
@ -770,7 +769,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSenderName: (void **) data
|
- (int) getPidTagSenderName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getCNFromEmail: [sogoObject from]
|
return [self _getCNFromEmail: [sogoObject from]
|
||||||
|
@ -778,38 +777,38 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSenderEntryid: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
- (int) getPidTagSenderEntryId: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getEntryIdFromEmail: [sogoObject from]
|
return [self _getEntryIdFromEmail: [sogoObject from]
|
||||||
inData: data
|
inData: data
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrOriginalAuthorName: (void **) data
|
- (int) getPidTagOriginalAuthorName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrSenderEmailAddress: data inMemCtx: memCtx];
|
return [self getPidTagSenderEmailAddress: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSentRepresentingEmailAddress: (void **) data
|
- (int) getPidTagSentRepresentingEmailAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrSenderEmailAddress: data inMemCtx: memCtx];
|
return [self getPidTagSenderEmailAddress: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSentRepresentingName: (void **) data
|
- (int) getPidTagSentRepresentingName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrSenderName: data inMemCtx: memCtx];
|
return [self getPidTagSenderName: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSentRepresentingEntryid: (void **) data
|
- (int) getPidTagSentRepresentingEntryId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrSenderEntryid: data inMemCtx: memCtx];
|
return [self getPidTagSenderEntryId: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrReceivedByEmailAddress: (void **) data
|
- (int) getPidTagReceivedByEmailAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getEmailAddressFromEmail: [sogoObject to]
|
return [self _getEmailAddressFromEmail: [sogoObject to]
|
||||||
|
@ -817,7 +816,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrReceivedByName: (void **) data
|
- (int) getPidTagReceivedByName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getCNFromEmail: [sogoObject to]
|
return [self _getCNFromEmail: [sogoObject to]
|
||||||
|
@ -825,7 +824,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrReceivedByEntryid: (void **) data
|
- (int) getPidTagReceivedByEntryId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self _getEntryIdFromEmail: [sogoObject to]
|
return [self _getEntryIdFromEmail: [sogoObject to]
|
||||||
|
@ -833,25 +832,25 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrRcvdRepresentingName: (void **) data
|
- (int) getPidTagReceivedRepresentingName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrReceivedByName: data inMemCtx: memCtx];
|
return [self getPidTagReceivedByName: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrRcvdRepresentingEmailAddress: (void **) data
|
- (int) getPidTagReceivedRepresentingEmailAddress: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrReceivedByEmailAddress: data inMemCtx: memCtx];
|
return [self getPidTagReceivedByEmailAddress: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrRcvdRepresentingEntryid: (void **) data
|
- (int) getPidTagReceivedRepresentingEntryId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrReceivedByEntryid: data inMemCtx: memCtx];
|
return [self getPidTagReceivedByEntryId: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDisplayTo: (void **) data
|
- (int) getPidTagDisplayTo: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [[sogoObject to] asUnicodeInMemCtx: memCtx];
|
*data = [[sogoObject to] asUnicodeInMemCtx: memCtx];
|
||||||
|
@ -859,13 +858,13 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrOriginalDisplayTo: (void **) data
|
- (int) getPidTagOriginalDisplayTo: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrDisplayTo: data inMemCtx: memCtx];
|
return [self getPidTagDisplayTo: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDisplayCc: (void **) data
|
- (int) getPidTagDisplayCc: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -879,22 +878,22 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrOriginalDisplayCc: (void **) data
|
- (int) getPidTagOriginalDisplayCc: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrDisplayCc: data inMemCtx: memCtx];
|
return [self getPidTagDisplayCc: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDisplayBcc: (void **) data
|
- (int) getPidTagDisplayBcc: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getEmptyString: data inMemCtx: memCtx];
|
return [self getEmptyString: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrOriginalDisplayBcc: (void **) data
|
- (int) getPidTagOriginalDisplayBcc: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrDisplayBcc: data inMemCtx: memCtx];
|
return [self getPidTagDisplayBcc: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidNameContentType: (void **) data
|
- (int) getPidNameContentType: (void **) data
|
||||||
|
@ -905,7 +904,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrImportance: (void **) data
|
- (int) getPidTagImportance: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
uint32_t v;
|
uint32_t v;
|
||||||
|
@ -924,7 +923,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrInternetCpid: (void **) data
|
- (int) getPidTagInternetCodepage: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
/* ref:
|
/* ref:
|
||||||
|
@ -940,7 +939,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrBody: (void **) data
|
- (int) getPidTagBody: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -955,7 +954,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
else if (mailIsEvent)
|
else if (mailIsEvent)
|
||||||
rc = [[self _appointmentWrapper] getPrBody: data
|
rc = [[self _appointmentWrapper] getPidTagBody: data
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -966,7 +965,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrHtml: (void **) data
|
- (int) getPidTagHtml: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
int rc = MAPISTORE_SUCCESS;
|
int rc = MAPISTORE_SUCCESS;
|
||||||
|
@ -985,7 +984,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrRtfCompressed: (void **) data
|
- (int) getPidTagRtfCompressed: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = NULL;
|
*data = NULL;
|
||||||
|
@ -993,13 +992,13 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_ERR_NOT_FOUND;
|
return MAPISTORE_ERR_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrRtfInSync: (void **) data
|
- (int) getPidTagRtfInSync: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getNo: data inMemCtx: memCtx];
|
return [self getNo: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrInternetMessageId: (void **) data
|
- (int) getPidTagInternetMessageId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [[sogoObject messageId] asUnicodeInMemCtx: memCtx];
|
*data = [[sogoObject messageId] asUnicodeInMemCtx: memCtx];
|
||||||
|
@ -1007,13 +1006,13 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrReadReceiptRequested: (void **) data // TODO
|
- (int) getPidTagReadReceiptRequested: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getNo: data inMemCtx: memCtx];
|
return [self getNo: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDeleteAfterSubmit: (void **) data // TODO
|
- (int) getPidTagDeleteAfterSubmit: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getNo: data inMemCtx: memCtx];
|
return [self getNo: data inMemCtx: memCtx];
|
||||||
|
@ -1065,7 +1064,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
: MAPISTORE_ERR_NOT_FOUND);
|
: MAPISTORE_ERR_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrProcessed: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
- (int) getPidTagProcessed: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
@ -1104,7 +1103,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
: [self getNo: data inMemCtx: memCtx]);
|
: [self getNo: data inMemCtx: memCtx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMsgEditorFormat: (void **) data
|
- (int) getPidTagMessageEditorFormat: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
uint32_t format;
|
uint32_t format;
|
||||||
|
@ -1149,14 +1148,14 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* event getters */
|
/* event getters */
|
||||||
- (int) getPrStartDate: (void **) data
|
- (int) getPidTagStartDate: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
if (!headerSetup)
|
if (!headerSetup)
|
||||||
[self _fetchHeaderData];
|
[self _fetchHeaderData];
|
||||||
|
|
||||||
return (mailIsEvent
|
return (mailIsEvent
|
||||||
? [[self _appointmentWrapper] getPrStartDate: data inMemCtx: memCtx]
|
? [[self _appointmentWrapper] getPidTagStartDate: data inMemCtx: memCtx]
|
||||||
: MAPISTORE_ERR_NOT_FOUND);
|
: MAPISTORE_ERR_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1200,14 +1199,14 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
: MAPISTORE_ERR_NOT_FOUND);
|
: MAPISTORE_ERR_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrEndDate: (void **) data
|
- (int) getPidTagEndDate: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
if (!headerSetup)
|
if (!headerSetup)
|
||||||
[self _fetchHeaderData];
|
[self _fetchHeaderData];
|
||||||
|
|
||||||
return (mailIsEvent
|
return (mailIsEvent
|
||||||
? [[self _appointmentWrapper] getPrEndDate: data inMemCtx: memCtx]
|
? [[self _appointmentWrapper] getPidTagEndDate: data inMemCtx: memCtx]
|
||||||
: MAPISTORE_ERR_NOT_FOUND);
|
: MAPISTORE_ERR_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1319,14 +1318,14 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
: MAPISTORE_ERR_NOT_FOUND);
|
: MAPISTORE_ERR_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrOwnerApptId: (void **) data
|
- (int) getPidTagOwnerAppointmentId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
if (!headerSetup)
|
if (!headerSetup)
|
||||||
[self _fetchHeaderData];
|
[self _fetchHeaderData];
|
||||||
|
|
||||||
return (mailIsEvent
|
return (mailIsEvent
|
||||||
? [[self _appointmentWrapper] getPrOwnerApptId: data
|
? [[self _appointmentWrapper] getPidTagOwnerAppointmentId: data
|
||||||
inMemCtx: memCtx]
|
inMemCtx: memCtx]
|
||||||
: MAPISTORE_ERR_NOT_FOUND);
|
: MAPISTORE_ERR_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,11 +149,11 @@ static Class MAPIStoreMailMessageK, NSDataK, NSStringK;
|
||||||
rc = MAPIRestrictionStateAlwaysFalse;
|
rc = MAPIRestrictionStateAlwaysFalse;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_CONVERSATION_KEY:
|
case PidTagConversationKey:
|
||||||
rc = MAPIRestrictionStateAlwaysFalse;
|
rc = MAPIRestrictionStateAlwaysFalse;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_CHANGE_NUM:
|
case PidTagChangeNumber:
|
||||||
{
|
{
|
||||||
modseq = [(MAPIStoreMailFolder *)
|
modseq = [(MAPIStoreMailFolder *)
|
||||||
container modseqFromMessageChangeNumber: value];
|
container modseqFromMessageChangeNumber: value];
|
||||||
|
@ -205,7 +205,7 @@ static Class MAPIStoreMailMessageK, NSDataK, NSStringK;
|
||||||
else
|
else
|
||||||
rc = MAPIRestrictionStateAlwaysFalse;
|
rc = MAPIRestrictionStateAlwaysFalse;
|
||||||
break;
|
break;
|
||||||
case PR_CONVERSATION_KEY:
|
case PidTagConversationKey:
|
||||||
rc = MAPIRestrictionStateAlwaysFalse;
|
rc = MAPIRestrictionStateAlwaysFalse;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -774,16 +774,18 @@ MakeMessageBody (NSDictionary *mailProperties, NSDictionary *attachmentParts,
|
||||||
NSData *messageData;
|
NSData *messageData;
|
||||||
NSMutableArray *recipientEmails;
|
NSMutableArray *recipientEmails;
|
||||||
NSArray *list;
|
NSArray *list;
|
||||||
NSString *recId;
|
NSString *recId, *from, *msgClass;
|
||||||
NSUInteger count;
|
NSUInteger count;
|
||||||
struct mapistore_connection_info *connInfo;
|
|
||||||
SOGoUser *activeUser;
|
SOGoUser *activeUser;
|
||||||
NSString *from;
|
|
||||||
// SOGoMailFolder *sentFolder;
|
// SOGoMailFolder *sentFolder;
|
||||||
SOGoDomainDefaults *dd;
|
SOGoDomainDefaults *dd;
|
||||||
NSException *error;
|
NSException *error;
|
||||||
MAPIStoreMapping *mapping;
|
MAPIStoreMapping *mapping;
|
||||||
|
|
||||||
|
mailProperties = [sogoObject properties];
|
||||||
|
msgClass = [mailProperties objectForKey: MAPIPropertyKey (PidTagMessageClass)];
|
||||||
|
if ([msgClass isEqualToString: @"IPM.Note"]) /* we skip invitation replies */
|
||||||
|
{
|
||||||
/* send mail */
|
/* send mail */
|
||||||
|
|
||||||
messageData = [self _generateMailDataWithBcc: NO];
|
messageData = [self _generateMailDataWithBcc: NO];
|
||||||
|
@ -800,8 +802,7 @@ MakeMessageBody (NSDictionary *mailProperties, NSDictionary *attachmentParts,
|
||||||
notFoundMarker: nil]];
|
notFoundMarker: nil]];
|
||||||
}
|
}
|
||||||
|
|
||||||
connInfo = [[self context] connectionInfo];
|
activeUser = [[self context] activeUser];
|
||||||
activeUser = [SOGoUser userWithLogin: [NSString stringWithUTF8String: connInfo->username]];
|
|
||||||
|
|
||||||
[self logWithFormat: @"recipients: %@", recipientEmails];
|
[self logWithFormat: @"recipients: %@", recipientEmails];
|
||||||
dd = [activeUser domainDefaults];
|
dd = [activeUser domainDefaults];
|
||||||
|
@ -818,6 +819,10 @@ MakeMessageBody (NSDictionary *mailProperties, NSDictionary *attachmentParts,
|
||||||
[self setIsNew: NO];
|
[self setIsNew: NO];
|
||||||
[properties removeAllObjects];
|
[properties removeAllObjects];
|
||||||
[[self container] cleanupCaches];
|
[[self container] cleanupCaches];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
[self logWithFormat: @"skipping submit of message with class '%@'",
|
||||||
|
msgClass];
|
||||||
|
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,6 @@
|
||||||
#include <gen_ndr/exchange.h>
|
#include <gen_ndr/exchange.h>
|
||||||
#include <mapistore/mapistore.h>
|
#include <mapistore/mapistore.h>
|
||||||
#include <mapistore/mapistore_errors.h>
|
#include <mapistore/mapistore_errors.h>
|
||||||
#include <mapistore/mapistore_nameid.h>
|
|
||||||
|
|
||||||
static NSString *resourcesDir = nil;
|
static NSString *resourcesDir = nil;
|
||||||
|
|
||||||
|
@ -165,14 +164,14 @@ rtf2html (NSData *compressedRTF)
|
||||||
|
|
||||||
msgData = talloc_zero (memCtx, struct mapistore_message);
|
msgData = talloc_zero (memCtx, struct mapistore_message);
|
||||||
|
|
||||||
if ([self getPrSubjectPrefix: &propValue
|
if ([self getPidTagSubjectPrefix: &propValue
|
||||||
inMemCtx: msgData] == MAPISTORE_SUCCESS
|
inMemCtx: msgData] == MAPISTORE_SUCCESS
|
||||||
&& propValue)
|
&& propValue)
|
||||||
msgData->subject_prefix = propValue;
|
msgData->subject_prefix = propValue;
|
||||||
else
|
else
|
||||||
msgData->subject_prefix = "";
|
msgData->subject_prefix = "";
|
||||||
|
|
||||||
if ([self getPrNormalizedSubject: &propValue
|
if ([self getPidTagNormalizedSubject: &propValue
|
||||||
inMemCtx: msgData] == MAPISTORE_SUCCESS
|
inMemCtx: msgData] == MAPISTORE_SUCCESS
|
||||||
&& propValue)
|
&& propValue)
|
||||||
msgData->normalized_subject = propValue;
|
msgData->normalized_subject = propValue;
|
||||||
|
@ -517,7 +516,7 @@ rtf2html (NSData *compressedRTF)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* getters */
|
/* getters */
|
||||||
- (int) getPrInstId: (void **) data // TODO: DOUBT
|
- (int) getPidTagInstID: (void **) data // TODO: DOUBT
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
/* we return a unique id based on the key */
|
/* we return a unique id based on the key */
|
||||||
|
@ -526,13 +525,13 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrInstanceNum: (void **) data // TODO: DOUBT
|
- (int) getPidTagInstanceNum: (void **) data // TODO: DOUBT
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrRowType: (void **) data // TODO: DOUBT
|
- (int) getPidTagRowType: (void **) data // TODO: DOUBT
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, TBL_LEAF_ROW);
|
*data = MAPILongValue (memCtx, TBL_LEAF_ROW);
|
||||||
|
@ -540,7 +539,7 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDepth: (void **) data // TODO: DOUBT
|
- (int) getPidTagDepth: (void **) data // TODO: DOUBT
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongLongValue (memCtx, 0);
|
*data = MAPILongLongValue (memCtx, 0);
|
||||||
|
@ -558,7 +557,7 @@ rtf2html (NSData *compressedRTF)
|
||||||
0x00000010 Create Contents Table
|
0x00000010 Create Contents Table
|
||||||
0x00000020 Create Associated Contents Table
|
0x00000020 Create Associated Contents Table
|
||||||
*/
|
*/
|
||||||
- (int) getPrAccess: (void **) data
|
- (int) getPidTagAccess: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
uint32_t access = 0;
|
uint32_t access = 0;
|
||||||
|
@ -587,7 +586,7 @@ rtf2html (NSData *compressedRTF)
|
||||||
0x00000000 Read-Only
|
0x00000000 Read-Only
|
||||||
0x00000001 Modify
|
0x00000001 Modify
|
||||||
*/
|
*/
|
||||||
- (int) getPrAccessLevel: (void **) data
|
- (int) getPidTagAccessLevel: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
uint32_t access = 0;
|
uint32_t access = 0;
|
||||||
|
@ -645,7 +644,7 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrFid: (void **) data
|
- (int) getPidTagFolderId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongLongValue (memCtx, [container objectId]);
|
*data = MAPILongLongValue (memCtx, [container objectId]);
|
||||||
|
@ -653,7 +652,7 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMid: (void **) data
|
- (int) getPidTagMid: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongLongValue (memCtx, [self objectId]);
|
*data = MAPILongLongValue (memCtx, [self objectId]);
|
||||||
|
@ -661,7 +660,7 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageLocaleId: (void **) data
|
- (int) getPidTagMessageLocaleId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, 0x0409);
|
*data = MAPILongValue (memCtx, 0x0409);
|
||||||
|
@ -669,7 +668,7 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageFlags: (void **) data // TODO
|
- (int) getPidTagMessageFlags: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, MSGFLAG_FROMME | MSGFLAG_READ | MSGFLAG_UNMODIFIED);
|
*data = MAPILongValue (memCtx, MSGFLAG_FROMME | MSGFLAG_READ | MSGFLAG_UNMODIFIED);
|
||||||
|
@ -677,7 +676,7 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageSize: (void **) data // TODO
|
- (int) getPidTagMessageSize: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
/* TODO: choose another name in SOGo for that method */
|
/* TODO: choose another name in SOGo for that method */
|
||||||
|
@ -686,13 +685,13 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMsgStatus: (void **) data // TODO
|
- (int) getPidTagMessageStatus: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrImportance: (void **) data // TODO -> subclass?
|
- (int) getPidTagImportance: (void **) data // TODO -> subclass?
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongValue (memCtx, 1);
|
*data = MAPILongValue (memCtx, 1);
|
||||||
|
@ -700,19 +699,19 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrPriority: (void **) data // TODO -> subclass?
|
- (int) getPidTagPriority: (void **) data // TODO -> subclass?
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSensitivity: (void **) data // TODO -> subclass in calendar
|
- (int) getPidTagSensitivity: (void **) data // TODO -> subclass in calendar
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSubject: (void **) data
|
- (int) getPidTagSubject: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
[self subclassResponsibility: _cmd];
|
[self subclassResponsibility: _cmd];
|
||||||
|
@ -720,64 +719,64 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_ERR_NOT_FOUND;
|
return MAPISTORE_ERR_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrNormalizedSubject: (void **) data
|
- (int) getPidTagNormalizedSubject: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrSubject: data inMemCtx: memCtx];
|
return [self getPidTagSubject: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrOriginalSubject: (void **) data
|
- (int) getPidTagOriginalSubject: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrNormalizedSubject: data inMemCtx: memCtx];
|
return [self getPidTagNormalizedSubject: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrConversationTopic: (void **) data
|
- (int) getPidTagConversationTopic: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrNormalizedSubject: data inMemCtx: memCtx];
|
return [self getPidTagNormalizedSubject: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSubjectPrefix: (void **) data
|
- (int) getPidTagSubjectPrefix: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getEmptyString: data inMemCtx: memCtx];
|
return [self getEmptyString: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDisplayTo: (void **) data
|
- (int) getPidTagDisplayTo: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getEmptyString: data inMemCtx: memCtx];
|
return [self getEmptyString: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDisplayCc: (void **) data
|
- (int) getPidTagDisplayCc: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getEmptyString: data inMemCtx: memCtx];
|
return [self getEmptyString: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrDisplayBcc: (void **) data
|
- (int) getPidTagDisplayBcc: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getEmptyString: data inMemCtx: memCtx];
|
return [self getEmptyString: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
// - (int) getPrOriginalDisplayTo: (void **) data
|
// - (int) getPidTagOriginalDisplayTo: (void **) data
|
||||||
// {
|
// {
|
||||||
// return [self getPrDisplayTo: data];
|
// return [self getPidTagDisplayTo: data];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// - (int) getPrOriginalDisplayCc: (void **) data
|
// - (int) getPidTagOriginalDisplayCc: (void **) data
|
||||||
// {
|
// {
|
||||||
// return [self getPrDisplayCc: data];
|
// return [self getPidTagDisplayCc: data];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// - (int) getPrOriginalDisplayBcc: (void **) data
|
// - (int) getPidTagOriginalDisplayBcc: (void **) data
|
||||||
// {
|
// {
|
||||||
// return [self getPrDisplayBcc: data];
|
// return [self getPidTagDisplayBcc: data];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
- (int) getPrLastModifierName: (void **) data
|
- (int) getPidTagLastModifierName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSURL *contextUrl;
|
NSURL *contextUrl;
|
||||||
|
@ -788,7 +787,7 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageClass: (void **) data
|
- (int) getPidTagMessageClass: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
[self subclassResponsibility: _cmd];
|
[self subclassResponsibility: _cmd];
|
||||||
|
@ -796,13 +795,13 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_ERR_NOT_FOUND;
|
return MAPISTORE_ERR_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrOrigMessageClass: (void **) data
|
- (int) getPidTagOriginalMessageClass: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrMessageClass: data inMemCtx: memCtx];
|
return [self getPidTagMessageClass: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrHasattach: (void **) data
|
- (int) getPidTagHasAttachments: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPIBoolValue (memCtx,
|
*data = MAPIBoolValue (memCtx,
|
||||||
|
@ -811,7 +810,7 @@ rtf2html (NSData *compressedRTF)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrAssociated: (void **) data
|
- (int) getPidTagAssociated: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getNo: data inMemCtx: memCtx];;
|
return [self getNo: data inMemCtx: memCtx];;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
@implementation MAPIStoreNotesMessage
|
@implementation MAPIStoreNotesMessage
|
||||||
|
|
||||||
- (int) getPrIconIndex: (void **) data // TODO
|
- (int) getPidTagIconIndex: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
/* see http://msdn.microsoft.com/en-us/library/cc815472.aspx */
|
/* see http://msdn.microsoft.com/en-us/library/cc815472.aspx */
|
||||||
|
@ -46,23 +46,23 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageClass: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
- (int) getPidTagMessageClass: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [@"IPM.StickyNote" asUnicodeInMemCtx: memCtx];
|
*data = [@"IPM.StickyNote" asUnicodeInMemCtx: memCtx];
|
||||||
|
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSubject: (void **) data
|
- (int) getPidTagSubject: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
id value;
|
id value;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
value = [[sogoObject properties]
|
value = [[sogoObject properties]
|
||||||
objectForKey: MAPIPropertyKey (PR_NORMALIZED_SUBJECT_UNICODE)];
|
objectForKey: MAPIPropertyKey (PidTagNormalizedSubject)];
|
||||||
if (value)
|
if (value)
|
||||||
rc = [value getValue: data forTag: PR_NORMALIZED_SUBJECT_UNICODE
|
rc = [value getValue: data forTag: PidTagNormalizedSubject
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
else
|
else
|
||||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||||
|
|
|
@ -107,21 +107,21 @@
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
|
|
||||||
/* implemented getters */
|
/* implemented getters */
|
||||||
- (int) getPrDisplayName: (void **) data
|
- (int) getPidTagDisplayName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrSearchKey: (void **) data
|
- (int) getPidTagSearchKey: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrGenerateExchangeViews: (void **) data
|
- (int) getPidTagGenerateExchangeViews: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrParentSourceKey: (void **) data
|
- (int) getPidTagParentSourceKey: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrSourceKey: (void **) data
|
- (int) getPidTagSourceKey: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrChangeKey: (void **) data
|
- (int) getPidTagChangeKey: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrCreationTime: (void **) data
|
- (int) getPidTagCreationTime: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getPrLastModificationTime: (void **) data
|
- (int) getPidTagLastModificationTime: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
|
|
||||||
/* subclasses */
|
/* subclasses */
|
||||||
|
|
|
@ -294,7 +294,7 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* getters */
|
/* getters */
|
||||||
- (int) getPrDisplayName: (void **) data
|
- (int) getPidTagDisplayName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [[sogoObject displayName] asUnicodeInMemCtx: memCtx];
|
*data = [[sogoObject displayName] asUnicodeInMemCtx: memCtx];
|
||||||
|
@ -302,7 +302,7 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSearchKey: (void **) data
|
- (int) getPidTagSearchKey: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *stringValue;
|
NSString *stringValue;
|
||||||
|
@ -314,20 +314,20 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrGenerateExchangeViews: (void **) data
|
- (int) getPidTagGenerateExchangeViews: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getNo: data inMemCtx: memCtx];
|
return [self getNo: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrParentSourceKey: (void **) data
|
- (int) getPidTagParentSourceKey: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getReplicaKey: data fromGlobCnt: [container objectId] >> 16
|
return [self getReplicaKey: data fromGlobCnt: [container objectId] >> 16
|
||||||
inMemCtx: memCtx];
|
inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSourceKey: (void **) data
|
- (int) getPidTagSourceKey: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getReplicaKey: data fromGlobCnt: [self objectId] >> 16
|
return [self getReplicaKey: data fromGlobCnt: [self objectId] >> 16
|
||||||
|
@ -341,7 +341,7 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
||||||
return ULLONG_MAX;
|
return ULLONG_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrChangeKey: (void **) data
|
- (int) getPidTagChangeKey: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -357,7 +357,7 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrChangeNum: (void **) data
|
- (int) getPidTagChangeNumber: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -376,7 +376,7 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrCreationTime: (void **) data
|
- (int) getPidTagCreationTime: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [[self creationTime] asFileTimeInMemCtx: memCtx];
|
*data = [[self creationTime] asFileTimeInMemCtx: memCtx];
|
||||||
|
@ -384,7 +384,7 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrLastModificationTime: (void **) data
|
- (int) getPidTagLastModificationTime: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [[self lastModificationTime] asFileTimeInMemCtx: memCtx];
|
*data = [[self lastModificationTime] asFileTimeInMemCtx: memCtx];
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
return memberId;
|
return memberId;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMemberId: (void **) data
|
- (int) getPidTagMemberId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = MAPILongLongValue (memCtx, memberId);
|
*data = MAPILongLongValue (memCtx, memberId);
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrEntryid: (void **) data
|
- (int) getPidTagEntryId: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSData *entryId;
|
NSData *entryId;
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMemberName: (void **) data
|
- (int) getPidTagMemberName: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSString *displayName;
|
NSString *displayName;
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMemberRights: (void **) data
|
- (int) getPidTagMemberRights: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
uint32_t rights;
|
uint32_t rights;
|
||||||
|
|
|
@ -48,17 +48,9 @@
|
||||||
return [MAPIStoreTasksMessageTable tableForContainer: self];
|
return [MAPIStoreTasksMessageTable tableForContainer: self];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (EOQualifier *) componentQualifier
|
- (NSString *) component
|
||||||
{
|
{
|
||||||
static EOQualifier *componentQualifier = nil;
|
return @"vtodo";
|
||||||
|
|
||||||
if (!componentQualifier)
|
|
||||||
componentQualifier
|
|
||||||
= [[EOKeyValueQualifier alloc] initWithKey: @"c_component"
|
|
||||||
operatorSelector: EOQualifierOperatorEqual
|
|
||||||
value: @"vtodo"];
|
|
||||||
|
|
||||||
return componentQualifier;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (MAPIStoreMessage *) createMessage
|
- (MAPIStoreMessage *) createMessage
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
|
|
||||||
@implementation MAPIStoreTasksMessage
|
@implementation MAPIStoreTasksMessage
|
||||||
|
|
||||||
- (int) getPrIconIndex: (void **) data // TODO
|
- (int) getPidTagIconIndex: (void **) data // TODO
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
/* see http://msdn.microsoft.com/en-us/library/cc815472.aspx */
|
/* see http://msdn.microsoft.com/en-us/library/cc815472.aspx */
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageClass: (void **) data
|
- (int) getPidTagMessageClass: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = talloc_strdup(memCtx, "IPM.Task");
|
*data = talloc_strdup(memCtx, "IPM.Task");
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSubject: (void **) data // SUMMARY
|
- (int) getPidTagSubject: (void **) data // SUMMARY
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
iCalToDo *task;
|
iCalToDo *task;
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrImportance: (void **) data
|
- (int) getPidTagImportance: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
uint32_t v;
|
uint32_t v;
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrHasattach: (void **) data
|
- (int) getPidTagHasAttachments: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getNo: data inMemCtx: memCtx];
|
return [self getNo: data inMemCtx: memCtx];
|
||||||
|
@ -242,22 +242,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (int) getPrMessageDeliveryTime: (void **) data
|
- (int) getPidTagMessageDeliveryTime: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrLastModificationTime: data inMemCtx: memCtx];
|
return [self getPidTagLastModificationTime: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getClientSubmitTime: (void **) data
|
- (int) getClientSubmitTime: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrLastModificationTime: data inMemCtx: memCtx];
|
return [self getPidTagLastModificationTime: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getLocalCommitTime: (void **) data
|
- (int) getLocalCommitTime: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getPrLastModificationTime: data inMemCtx: memCtx];
|
return [self getPidTagLastModificationTime: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidLidTaskStatus: (void **) data // status
|
- (int) getPidLidTaskStatus: (void **) data // status
|
||||||
|
|
|
@ -42,6 +42,8 @@ id NSObjectFromSPropValue (const struct SPropValue *);
|
||||||
id NSObjectFromMAPISPropValue (const struct mapi_SPropValue *);
|
id NSObjectFromMAPISPropValue (const struct mapi_SPropValue *);
|
||||||
id NSObjectFromValuePointer (enum MAPITAGS, const void *);
|
id NSObjectFromValuePointer (enum MAPITAGS, const void *);
|
||||||
|
|
||||||
|
NSComparisonResult MAPICNCompare (uint64_t cn1, uint64_t cn2);
|
||||||
|
|
||||||
static inline NSNumber *
|
static inline NSNumber *
|
||||||
MAPIPropertyKey (enum MAPITAGS propTag)
|
MAPIPropertyKey (enum MAPITAGS propTag)
|
||||||
{
|
{
|
||||||
|
|
|
@ -96,6 +96,7 @@ NSObjectFromMAPISPropValue (const struct mapi_SPropValue *value)
|
||||||
result = [NSNumber numberWithUnsignedShort: value->value.i];
|
result = [NSNumber numberWithUnsignedShort: value->value.i];
|
||||||
break;
|
break;
|
||||||
case PT_LONG:
|
case PT_LONG:
|
||||||
|
case PT_ERROR:
|
||||||
result = [NSNumber numberWithUnsignedLong: value->value.l];
|
result = [NSNumber numberWithUnsignedLong: value->value.l];
|
||||||
break;
|
break;
|
||||||
case PT_I8:
|
case PT_I8:
|
||||||
|
@ -175,6 +176,7 @@ NSObjectFromSPropValue (const struct SPropValue *value)
|
||||||
result = [NSNumber numberWithShort: value->value.i];
|
result = [NSNumber numberWithShort: value->value.i];
|
||||||
break;
|
break;
|
||||||
case PT_LONG:
|
case PT_LONG:
|
||||||
|
case PT_ERROR:
|
||||||
result = [NSNumber numberWithLong: value->value.l];
|
result = [NSNumber numberWithLong: value->value.l];
|
||||||
break;
|
break;
|
||||||
case PT_I8:
|
case PT_I8:
|
||||||
|
@ -268,6 +270,34 @@ NSObjectFromValuePointer (enum MAPITAGS propTag, const void *data)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static uint64_t
|
||||||
|
_reverseCN (uint64_t cn)
|
||||||
|
{
|
||||||
|
return ((cn & UINT64_C (0x00000000000000ff)) << 56
|
||||||
|
| (cn & UINT64_C (0x000000000000ff00)) << 40
|
||||||
|
| (cn & UINT64_C (0x0000000000ff0000)) << 24
|
||||||
|
| (cn & UINT64_C (0x00000000ff000000)) << 8
|
||||||
|
| (cn & UINT64_C (0x000000ff00000000)) >> 8
|
||||||
|
| (cn & UINT64_C (0x0000ff0000000000)) >> 24
|
||||||
|
| (cn & UINT64_C (0x00ff000000000000)) >> 40
|
||||||
|
| (cn & UINT64_C (0xff00000000000000)) >> 56);
|
||||||
|
}
|
||||||
|
|
||||||
|
NSComparisonResult
|
||||||
|
MAPICNCompare (uint64_t cn1, uint64_t cn2)
|
||||||
|
{
|
||||||
|
NSComparisonResult result;
|
||||||
|
|
||||||
|
if (cn1 == cn2)
|
||||||
|
result = NSOrderedSame;
|
||||||
|
else if (_reverseCN (cn1) < _reverseCN (cn2))
|
||||||
|
result = NSOrderedAscending;
|
||||||
|
else
|
||||||
|
result = NSOrderedDescending;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MAPIStoreDumpMessageProperties (NSDictionary *properties)
|
MAPIStoreDumpMessageProperties (NSDictionary *properties)
|
||||||
{
|
{
|
||||||
|
|
|
@ -188,7 +188,7 @@ static NSMapTable *contextsTable = nil;
|
||||||
[rootFolders setObject: currentFolder
|
[rootFolders setObject: currentFolder
|
||||||
forKey: @"mail"];
|
forKey: @"mail"];
|
||||||
[[currentFolder imap4Connection]
|
[[currentFolder imap4Connection]
|
||||||
enableExtension: @"QRESYNC"];
|
enableExtensions: [NSArray arrayWithObject: @"QRESYNC"]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return rootFolders;
|
return rootFolders;
|
||||||
|
|
|
@ -121,21 +121,21 @@ Class NSNumberK;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrSubject: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
- (int) getPidTagSubject: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
/* if we get here, it means that the properties file didn't contain a
|
/* if we get here, it means that the properties file didn't contain a
|
||||||
relevant value */
|
relevant value */
|
||||||
return [self getEmptyString: data inMemCtx: memCtx];
|
return [self getEmptyString: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrMessageClass: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
- (int) getPidTagMessageClass: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
*data = [@"IPM.Note" asUnicodeInMemCtx: memCtx];
|
*data = [@"IPM.Note" asUnicodeInMemCtx: memCtx];
|
||||||
|
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPrChangeKey: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
- (int) getPidTagChangeKey: (void **) data inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSData *changeKey;
|
NSData *changeKey;
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -148,7 +148,7 @@ Class NSNumberK;
|
||||||
rc = MAPISTORE_SUCCESS;
|
rc = MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rc = [super getPrChangeKey: data inMemCtx: memCtx];
|
rc = [super getPidTagChangeKey: data inMemCtx: memCtx];
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
/* mapi structs */
|
/* mapi structs */
|
||||||
+ (id) arrayFromMAPIMVLong: (const struct mapi_MV_LONG_STRUCT *) mvLong;
|
+ (id) arrayFromMAPIMVLong: (const struct mapi_MV_LONG_STRUCT *) mvLong;
|
||||||
+ (id) arrayFromMAPIMVUnicode: (const struct mapi_SPLSTRArrayW *) mvUnicode;
|
+ (id) arrayFromMAPIMVUnicode: (const struct mapi_SLPSTRArrayW *) mvUnicode;
|
||||||
+ (id) arrayFromMAPIMVString: (const struct mapi_SLPSTRArray *) mvString;
|
+ (id) arrayFromMAPIMVString: (const struct mapi_SLPSTRArray *) mvString;
|
||||||
+ (id) arrayFromMAPIMVBinary: (const struct mapi_SBinaryArray *) mvBinary;
|
+ (id) arrayFromMAPIMVBinary: (const struct mapi_SBinaryArray *) mvBinary;
|
||||||
+ (id) arrayFromMAPIMVGuid: (const struct mapi_SGuidArray *) mvGuid;
|
+ (id) arrayFromMAPIMVGuid: (const struct mapi_SGuidArray *) mvGuid;
|
||||||
|
@ -39,8 +39,8 @@
|
||||||
- (struct LongArray_r *) asMVLongInMemCtx: (void *) memCtx;
|
- (struct LongArray_r *) asMVLongInMemCtx: (void *) memCtx;
|
||||||
+ (id) arrayFromMVI8: (const struct I8Array_r *) mvI8;
|
+ (id) arrayFromMVI8: (const struct I8Array_r *) mvI8;
|
||||||
+ (id) arrayFromMVString: (const struct StringArray_r *) mvString;
|
+ (id) arrayFromMVString: (const struct StringArray_r *) mvString;
|
||||||
+ (id) arrayFromMVUnicode: (const struct WStringArray_r *) mvUnicode;
|
+ (id) arrayFromMVUnicode: (const struct StringArrayW_r *) mvUnicode;
|
||||||
- (struct WStringArray_r *) asMVUnicodeInMemCtx: (void *) memCtx;
|
- (struct StringArrayW_r *) asMVUnicodeInMemCtx: (void *) memCtx;
|
||||||
+ (id) arrayFromMVBinary: (const struct BinaryArray_r *) mvBinary;
|
+ (id) arrayFromMVBinary: (const struct BinaryArray_r *) mvBinary;
|
||||||
- (struct BinaryArray_r *) asMVBinaryInMemCtx: (void *) memCtx;
|
- (struct BinaryArray_r *) asMVBinaryInMemCtx: (void *) memCtx;
|
||||||
+ (id) arrayFromMVGuid: (const struct FlatUIDArray_r *) mvGuid;
|
+ (id) arrayFromMVGuid: (const struct FlatUIDArray_r *) mvGuid;
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
return mvResult;
|
return mvResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (id) arrayFromMAPIMVUnicode: (struct mapi_SPLSTRArrayW *) mvUnicode
|
+ (id) arrayFromMAPIMVUnicode: (struct mapi_SLPSTRArrayW *) mvUnicode
|
||||||
{
|
{
|
||||||
NSUInteger count;
|
NSUInteger count;
|
||||||
NSString *subObject;
|
NSString *subObject;
|
||||||
|
@ -185,7 +185,7 @@
|
||||||
return mvResult;
|
return mvResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (id) arrayFromMVUnicode: (const struct WStringArray_r *) mvUnicode
|
+ (id) arrayFromMVUnicode: (const struct StringArrayW_r *) mvUnicode
|
||||||
{
|
{
|
||||||
NSUInteger count;
|
NSUInteger count;
|
||||||
NSString *subObject;
|
NSString *subObject;
|
||||||
|
@ -201,14 +201,14 @@
|
||||||
return mvResult;
|
return mvResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (struct WStringArray_r *) asMVUnicodeInMemCtx: (void *) memCtx
|
- (struct StringArrayW_r *) asMVUnicodeInMemCtx: (void *) memCtx
|
||||||
{
|
{
|
||||||
struct WStringArray_r *list;
|
struct StringArrayW_r *list;
|
||||||
NSInteger count, max;
|
NSInteger count, max;
|
||||||
|
|
||||||
max = [self count];
|
max = [self count];
|
||||||
|
|
||||||
list = talloc_zero (memCtx, struct WStringArray_r);
|
list = talloc_zero (memCtx, struct StringArrayW_r);
|
||||||
list->cValues = max;
|
list->cValues = max;
|
||||||
list->lppszW = talloc_array (list, const char *, max);
|
list->lppszW = talloc_array (list, const char *, max);
|
||||||
|
|
||||||
|
|
|
@ -106,15 +106,32 @@ extern const enum MAPITAGS MAPIStoreSupportedProperties[];
|
||||||
|
|
||||||
# hack: some properties have multiple and incompatible types. Sometimes those
|
# hack: some properties have multiple and incompatible types. Sometimes those
|
||||||
# props are not related at all...
|
# props are not related at all...
|
||||||
bannedProps = { "PrBodyHtml": True, "PrFavAutosubfolders": True,
|
bannedProps = [ "PidTagBodyHtml", "PidTagFavAutosubfolders",
|
||||||
"PrAttachDataObj": True, "PrAclTable": True,
|
"PidTagAttachDataObj", "PidTagAclTable", "PidTagAclData",
|
||||||
"PrAclData": True, "PrRulesTable": True, "PrRulesData": True,
|
"PidTagRulesTable", "PidTagRulesData", "PidTagDisableWinsock",
|
||||||
"PrDisableWinsock": True, "PrHierarchyServer": True,
|
"PidTagHierarchyServer", "PidTagOfflineAddrbookEntryid",
|
||||||
"PrOfflineAddrbookEntryid": True,
|
"PidTagShorttermEntryidFromObject",
|
||||||
"PrShorttermEntryidFromObject": True,
|
"PidTagNormalMessageSizeExtended",
|
||||||
"PrNormalMessageSizeExtended": True,
|
"PidTagAssocMessageSizeExtended", "PidTagMessageSizeExtended",
|
||||||
"PrAssocMessageSizeExtended": True,
|
"PidTagOabContainerGuid",
|
||||||
"PrMessageSizeExtended": True }
|
"PidTagOfflineAddressBookMessageClass", "PidTagScriptData",
|
||||||
|
"PidTagOfflineAddressBookTruncatedProperties",
|
||||||
|
"PidTagOfflineAddressBookContainerGuid",
|
||||||
|
"PidTagOfflineAddressBookDistinguishedName",
|
||||||
|
"PidTagOfflineAddressBookShaHash",
|
||||||
|
"PidTagSenderTelephoneNumber", "PidTagGatewayNeedsToRefresh",
|
||||||
|
"PidTagWlinkType", "PidTagWlinkFlags",
|
||||||
|
"PidTagWlinkGroupClsid", "PidTagWlinkGroupName",
|
||||||
|
"PidTagWlinkGroupHeaderID",
|
||||||
|
"PidTagScheduleInfoDelegatorWantsCopy", "PidTagWlinkOrdinal",
|
||||||
|
"PidTagWlinkSection", "PidTagWlinkCalendarColor",
|
||||||
|
"PidTagWlinkAddressBookEID", "PidTagWlinkFolderType",
|
||||||
|
"PidTagScheduleInfoDelegateNames",
|
||||||
|
"PidTagScheduleInfoDelegateEntryIds",
|
||||||
|
"PidTagBusiness2TelephoneNumbers",
|
||||||
|
"PidTagHome2TelephoneNumbers",
|
||||||
|
"PidTagAttachDataObject", "PidTagShorttermEntryIdFromObject",
|
||||||
|
]
|
||||||
|
|
||||||
def ParseExchangeH(names, lines):
|
def ParseExchangeH(names, lines):
|
||||||
state = 0
|
state = 0
|
||||||
|
@ -135,23 +152,15 @@ def ParseExchangeH(names, lines):
|
||||||
ParseExchangeHDefinition(names, stripped)
|
ParseExchangeHDefinition(names, stripped)
|
||||||
x = x + 1
|
x = x + 1
|
||||||
|
|
||||||
def GenExchangeHName(startname):
|
|
||||||
parts = startname.split("_")
|
|
||||||
newParts = []
|
|
||||||
for part in parts:
|
|
||||||
newParts.append("%s%s" % (part[0].upper(), part[1:].lower()))
|
|
||||||
|
|
||||||
return "".join(newParts)
|
|
||||||
|
|
||||||
def ParseExchangeHDefinition(names, line):
|
def ParseExchangeHDefinition(names, line):
|
||||||
stripped = line.strip()
|
stripped = line.strip()
|
||||||
eqIdx = stripped.find("=")
|
eqIdx = stripped.find("=")
|
||||||
if eqIdx == -1:
|
if eqIdx == -1:
|
||||||
raise Exception, "line does not contain a '='"
|
raise Exception, "line does not contain a '='"
|
||||||
propName = GenExchangeHName(stripped[0:eqIdx])
|
|
||||||
if not propName.endswith("Error") and not propName.endswith("Unicode") \
|
propName = stripped[0:eqIdx]
|
||||||
and not propName.startswith("PrProfile") \
|
if not propName.endswith("_Error") and not propName.endswith("_string8") \
|
||||||
and not bannedProps.has_key(propName):
|
and propName not in bannedProps:
|
||||||
intIdx = stripped.find("(int", eqIdx)
|
intIdx = stripped.find("(int", eqIdx)
|
||||||
valueIdx = stripped.find("0x", intIdx + 1)
|
valueIdx = stripped.find("0x", intIdx + 1)
|
||||||
endIdx = stripped.find(")", valueIdx)
|
endIdx = stripped.find(")", valueIdx)
|
||||||
|
@ -172,8 +181,8 @@ def ParseMapistoreNameIDHDefinition(names, line):
|
||||||
raise Exception, "line does not contain a 'Pid'"
|
raise Exception, "line does not contain a 'Pid'"
|
||||||
valueIdx = stripped.find("0x")
|
valueIdx = stripped.find("0x")
|
||||||
propName = stripped[pidIdx:valueIdx].strip()
|
propName = stripped[pidIdx:valueIdx].strip()
|
||||||
|
if not propName.startswith("PidLidUnknown") and propName not in bannedProps:
|
||||||
value = int(stripped[valueIdx:], 16)
|
value = int(stripped[valueIdx:], 16)
|
||||||
|
|
||||||
names[propName] = value
|
names[propName] = value
|
||||||
|
|
||||||
def FindHFile(filename):
|
def FindHFile(filename):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
diff -durpN unrtf-0.21.2.old/outputs/html.conf unrtf-0.21.2/outputs/html.conf
|
diff -durpN unrtf-0.21.2.old/outputs/html.conf unrtf-0.21.2/outputs/html.conf
|
||||||
--- unrtf-0.21.2.old/outputs/html.conf 2010-08-15 08:44:09.000000000 -0400
|
--- unrtf-0.21.2.old/outputs/html.conf 2010-08-15 08:44:09.000000000 -0400
|
||||||
+++ unrtf-0.21.2/outputs/html.conf 2011-11-09 15:53:21.802783775 -0500
|
+++ unrtf-0.21.2/outputs/html.conf 2012-03-13 16:38:53.295941363 -0400
|
||||||
@@ -5,7 +5,7 @@ comment_end
|
@@ -5,7 +5,7 @@ comment_end
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
@ -10,9 +10,18 @@ diff -durpN unrtf-0.21.2.old/outputs/html.conf unrtf-0.21.2/outputs/html.conf
|
||||||
#Second test of comments
|
#Second test of comments
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ align_right_end
|
||||||
|
</div>
|
||||||
|
|
||||||
|
forced_space
|
||||||
|
-  
|
||||||
|
+
|
||||||
|
line_break
|
||||||
|
<br>
|
||||||
|
|
||||||
diff -durpN unrtf-0.21.2.old/src/attr.c unrtf-0.21.2/src/attr.c
|
diff -durpN unrtf-0.21.2.old/src/attr.c unrtf-0.21.2/src/attr.c
|
||||||
--- unrtf-0.21.2.old/src/attr.c 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/attr.c 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/attr.c 2011-12-01 10:14:45.282855488 -0500
|
+++ unrtf-0.21.2/src/attr.c 2012-03-13 16:38:41.323940752 -0400
|
||||||
@@ -1,23 +1,23 @@
|
@@ -1,23 +1,23 @@
|
||||||
/*=============================================================================
|
/*=============================================================================
|
||||||
- GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
- GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
||||||
|
@ -1265,7 +1274,7 @@ diff -durpN unrtf-0.21.2.old/src/attr.c unrtf-0.21.2/src/attr.c
|
||||||
-
|
-
|
||||||
diff -durpN unrtf-0.21.2.old/src/attr.h unrtf-0.21.2/src/attr.h
|
diff -durpN unrtf-0.21.2.old/src/attr.h unrtf-0.21.2/src/attr.h
|
||||||
--- unrtf-0.21.2.old/src/attr.h 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/attr.h 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/attr.h 2011-11-09 15:53:21.806783776 -0500
|
+++ unrtf-0.21.2/src/attr.h 2012-03-13 16:38:41.323940752 -0400
|
||||||
@@ -1,23 +1,23 @@
|
@@ -1,23 +1,23 @@
|
||||||
/*=============================================================================
|
/*=============================================================================
|
||||||
- GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
- GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
||||||
|
@ -1415,7 +1424,7 @@ diff -durpN unrtf-0.21.2.old/src/attr.h unrtf-0.21.2/src/attr.h
|
||||||
+#endif /* ATTR_H */
|
+#endif /* ATTR_H */
|
||||||
diff -durpN unrtf-0.21.2.old/src/convert.c unrtf-0.21.2/src/convert.c
|
diff -durpN unrtf-0.21.2.old/src/convert.c unrtf-0.21.2/src/convert.c
|
||||||
--- unrtf-0.21.2.old/src/convert.c 2011-06-07 08:00:23.000000000 -0400
|
--- unrtf-0.21.2.old/src/convert.c 2011-06-07 08:00:23.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/convert.c 2011-12-01 10:32:16.958862025 -0500
|
+++ unrtf-0.21.2/src/convert.c 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -1,24 +1,24 @@
|
@@ -1,24 +1,24 @@
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
|
@ -7111,7 +7120,7 @@ diff -durpN unrtf-0.21.2.old/src/convert.c unrtf-0.21.2/src/convert.c
|
||||||
}
|
}
|
||||||
diff -durpN unrtf-0.21.2.old/src/convert.h unrtf-0.21.2/src/convert.h
|
diff -durpN unrtf-0.21.2.old/src/convert.h unrtf-0.21.2/src/convert.h
|
||||||
--- unrtf-0.21.2.old/src/convert.h 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/convert.h 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/convert.h 2011-11-09 15:53:21.810783765 -0500
|
+++ unrtf-0.21.2/src/convert.h 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -36,18 +36,135 @@
|
@@ -36,18 +36,135 @@
|
||||||
|
|
||||||
#ifndef _CONVERT
|
#ifndef _CONVERT
|
||||||
|
@ -7255,7 +7264,7 @@ diff -durpN unrtf-0.21.2.old/src/convert.h unrtf-0.21.2/src/convert.h
|
||||||
|
|
||||||
diff -durpN unrtf-0.21.2.old/src/defs.h unrtf-0.21.2/src/defs.h
|
diff -durpN unrtf-0.21.2.old/src/defs.h unrtf-0.21.2/src/defs.h
|
||||||
--- unrtf-0.21.2.old/src/defs.h 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/defs.h 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/defs.h 2011-11-09 15:53:21.810783765 -0500
|
+++ unrtf-0.21.2/src/defs.h 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -64,9 +64,6 @@
|
@@ -64,9 +64,6 @@
|
||||||
#define SKIP_ONE_WORD 2
|
#define SKIP_ONE_WORD 2
|
||||||
#endif
|
#endif
|
||||||
|
@ -7275,7 +7284,7 @@ diff -durpN unrtf-0.21.2.old/src/defs.h unrtf-0.21.2/src/defs.h
|
||||||
+#define DEFAULT_OUTPUT "html"
|
+#define DEFAULT_OUTPUT "html"
|
||||||
diff -durpN unrtf-0.21.2.old/src/error.c unrtf-0.21.2/src/error.c
|
diff -durpN unrtf-0.21.2.old/src/error.c unrtf-0.21.2/src/error.c
|
||||||
--- unrtf-0.21.2.old/src/error.c 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/error.c 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/error.c 2011-11-09 15:53:21.810783765 -0500
|
+++ unrtf-0.21.2/src/error.c 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -51,27 +51,11 @@
|
@@ -51,27 +51,11 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -7320,7 +7329,7 @@ diff -durpN unrtf-0.21.2.old/src/error.c unrtf-0.21.2/src/error.c
|
||||||
#endif
|
#endif
|
||||||
diff -durpN unrtf-0.21.2.old/src/error.h unrtf-0.21.2/src/error.h
|
diff -durpN unrtf-0.21.2.old/src/error.h unrtf-0.21.2/src/error.h
|
||||||
--- unrtf-0.21.2.old/src/error.h 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/error.h 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/error.h 2011-11-09 15:53:21.810783765 -0500
|
+++ unrtf-0.21.2/src/error.h 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -37,9 +37,10 @@
|
@@ -37,9 +37,10 @@
|
||||||
|
|
||||||
#define CHECK_MALLOC_SUCCESS(XX) { if ((XX)==NULL) { fprintf (stderr, "internal error: cannot allocate memory in %s at %d\n", __FILE__, __LINE__); exit (1); }}
|
#define CHECK_MALLOC_SUCCESS(XX) { if ((XX)==NULL) { fprintf (stderr, "internal error: cannot allocate memory in %s at %d\n", __FILE__, __LINE__); exit (1); }}
|
||||||
|
@ -7335,7 +7344,7 @@ diff -durpN unrtf-0.21.2.old/src/error.h unrtf-0.21.2/src/error.h
|
||||||
|
|
||||||
diff -durpN unrtf-0.21.2.old/src/hash.c unrtf-0.21.2/src/hash.c
|
diff -durpN unrtf-0.21.2.old/src/hash.c unrtf-0.21.2/src/hash.c
|
||||||
--- unrtf-0.21.2.old/src/hash.c 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/hash.c 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/hash.c 2011-11-09 15:53:21.810783765 -0500
|
+++ unrtf-0.21.2/src/hash.c 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -53,24 +53,16 @@
|
@@ -53,24 +53,16 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -7540,7 +7549,7 @@ diff -durpN unrtf-0.21.2.old/src/hash.c unrtf-0.21.2/src/hash.c
|
||||||
+}
|
+}
|
||||||
diff -durpN unrtf-0.21.2.old/src/hash.h unrtf-0.21.2/src/hash.h
|
diff -durpN unrtf-0.21.2.old/src/hash.h unrtf-0.21.2/src/hash.h
|
||||||
--- unrtf-0.21.2.old/src/hash.h 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/hash.h 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/hash.h 2011-11-09 15:53:21.810783765 -0500
|
+++ unrtf-0.21.2/src/hash.h 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -32,11 +32,15 @@
|
@@ -32,11 +32,15 @@
|
||||||
* 16 Dec 07, daved@physiol.usyd.edu.au: updated to GPL v3
|
* 16 Dec 07, daved@physiol.usyd.edu.au: updated to GPL v3
|
||||||
*--------------------------------------------------------------------*/
|
*--------------------------------------------------------------------*/
|
||||||
|
@ -7564,7 +7573,7 @@ diff -durpN unrtf-0.21.2.old/src/hash.h unrtf-0.21.2/src/hash.h
|
||||||
+#endif /* HASH_H */
|
+#endif /* HASH_H */
|
||||||
diff -durpN unrtf-0.21.2.old/src/main.c unrtf-0.21.2/src/main.c
|
diff -durpN unrtf-0.21.2.old/src/main.c unrtf-0.21.2/src/main.c
|
||||||
--- unrtf-0.21.2.old/src/main.c 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/main.c 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/main.c 2011-11-09 15:53:21.810783765 -0500
|
+++ unrtf-0.21.2/src/main.c 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -1,23 +1,23 @@
|
@@ -1,23 +1,23 @@
|
||||||
/*=============================================================================
|
/*=============================================================================
|
||||||
- GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
- GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
||||||
|
@ -7986,7 +7995,7 @@ diff -durpN unrtf-0.21.2.old/src/main.c unrtf-0.21.2/src/main.c
|
||||||
-
|
-
|
||||||
diff -durpN unrtf-0.21.2.old/src/main.h unrtf-0.21.2/src/main.h
|
diff -durpN unrtf-0.21.2.old/src/main.h unrtf-0.21.2/src/main.h
|
||||||
--- unrtf-0.21.2.old/src/main.h 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/main.h 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/main.h 2011-11-09 15:53:21.810783765 -0500
|
+++ unrtf-0.21.2/src/main.h 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -35,21 +35,8 @@
|
@@ -35,21 +35,8 @@
|
||||||
* 17 Jan 10, daved@physiol.usyd.edu.au: change CONFIG_DIR to drop outputs/
|
* 17 Jan 10, daved@physiol.usyd.edu.au: change CONFIG_DIR to drop outputs/
|
||||||
*--------------------------------------------------------------------*/
|
*--------------------------------------------------------------------*/
|
||||||
|
@ -8012,7 +8021,7 @@ diff -durpN unrtf-0.21.2.old/src/main.h unrtf-0.21.2/src/main.h
|
||||||
+#define USAGE "unrtf [--version] [--verbose] [--help] [--nopict|-n] [--noremap] [--html] [--text] [--vt] [--latex] [--rtf] [-P config_search_path] [-t <file_with_tags>)] <filename>"
|
+#define USAGE "unrtf [--version] [--verbose] [--help] [--nopict|-n] [--noremap] [--html] [--text] [--vt] [--latex] [--rtf] [-P config_search_path] [-t <file_with_tags>)] <filename>"
|
||||||
diff -durpN unrtf-0.21.2.old/src/Makefile.am unrtf-0.21.2/src/Makefile.am
|
diff -durpN unrtf-0.21.2.old/src/Makefile.am unrtf-0.21.2/src/Makefile.am
|
||||||
--- unrtf-0.21.2.old/src/Makefile.am 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/Makefile.am 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/Makefile.am 2011-11-09 15:53:21.810783765 -0500
|
+++ unrtf-0.21.2/src/Makefile.am 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -13,7 +13,6 @@ unrtf_SOURCES = attr.c attr.h \
|
@@ -13,7 +13,6 @@ unrtf_SOURCES = attr.c attr.h \
|
||||||
malloc.c malloc.h \
|
malloc.c malloc.h \
|
||||||
output.c output.h \
|
output.c output.h \
|
||||||
|
@ -8023,7 +8032,7 @@ diff -durpN unrtf-0.21.2.old/src/Makefile.am unrtf-0.21.2/src/Makefile.am
|
||||||
util.c util.h \
|
util.c util.h \
|
||||||
diff -durpN unrtf-0.21.2.old/src/malloc.c unrtf-0.21.2/src/malloc.c
|
diff -durpN unrtf-0.21.2.old/src/malloc.c unrtf-0.21.2/src/malloc.c
|
||||||
--- unrtf-0.21.2.old/src/malloc.c 2010-07-09 01:13:05.000000000 -0400
|
--- unrtf-0.21.2.old/src/malloc.c 2010-07-09 01:13:05.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/malloc.c 2011-12-01 10:36:18.514864760 -0500
|
+++ unrtf-0.21.2/src/malloc.c 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -135,19 +135,19 @@ total_malloced (void) {
|
@@ -135,19 +135,19 @@ total_malloced (void) {
|
||||||
*=======================================================================*/
|
*=======================================================================*/
|
||||||
|
|
||||||
|
@ -8063,7 +8072,7 @@ diff -durpN unrtf-0.21.2.old/src/malloc.c unrtf-0.21.2/src/malloc.c
|
||||||
}
|
}
|
||||||
diff -durpN unrtf-0.21.2.old/src/malloc.h unrtf-0.21.2/src/malloc.h
|
diff -durpN unrtf-0.21.2.old/src/malloc.h unrtf-0.21.2/src/malloc.h
|
||||||
--- unrtf-0.21.2.old/src/malloc.h 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/malloc.h 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/malloc.h 2011-11-09 15:53:21.810783765 -0500
|
+++ unrtf-0.21.2/src/malloc.h 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -32,9 +32,10 @@
|
@@ -32,9 +32,10 @@
|
||||||
* 09 Nov 08, arkadiusz.firus@gmail.com: added my_realloc
|
* 09 Nov 08, arkadiusz.firus@gmail.com: added my_realloc
|
||||||
*--------------------------------------------------------------------*/
|
*--------------------------------------------------------------------*/
|
||||||
|
@ -8079,7 +8088,7 @@ diff -durpN unrtf-0.21.2.old/src/malloc.h unrtf-0.21.2/src/malloc.h
|
||||||
+extern char * my_strdup (struct ConversionContext *, char*);
|
+extern char * my_strdup (struct ConversionContext *, char*);
|
||||||
diff -durpN unrtf-0.21.2.old/src/my_iconv.c unrtf-0.21.2/src/my_iconv.c
|
diff -durpN unrtf-0.21.2.old/src/my_iconv.c unrtf-0.21.2/src/my_iconv.c
|
||||||
--- unrtf-0.21.2.old/src/my_iconv.c 2010-08-16 00:12:43.000000000 -0400
|
--- unrtf-0.21.2.old/src/my_iconv.c 2010-08-16 00:12:43.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/my_iconv.c 2011-11-09 15:53:21.814783744 -0500
|
+++ unrtf-0.21.2/src/my_iconv.c 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -12,154 +12,133 @@
|
@@ -12,154 +12,133 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -8321,7 +8330,7 @@ diff -durpN unrtf-0.21.2.old/src/my_iconv.c unrtf-0.21.2/src/my_iconv.c
|
||||||
|
|
||||||
diff -durpN unrtf-0.21.2.old/src/my_iconv.h unrtf-0.21.2/src/my_iconv.h
|
diff -durpN unrtf-0.21.2.old/src/my_iconv.h unrtf-0.21.2/src/my_iconv.h
|
||||||
--- unrtf-0.21.2.old/src/my_iconv.h 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/my_iconv.h 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/my_iconv.h 2011-11-09 15:53:21.814783744 -0500
|
+++ unrtf-0.21.2/src/my_iconv.h 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -5,6 +5,9 @@
|
@@ -5,6 +5,9 @@
|
||||||
* Purpose: my_conv definitions
|
* Purpose: my_conv definitions
|
||||||
*--------------------------------------------------------------------*/
|
*--------------------------------------------------------------------*/
|
||||||
|
@ -8351,7 +8360,7 @@ diff -durpN unrtf-0.21.2.old/src/my_iconv.h unrtf-0.21.2/src/my_iconv.h
|
||||||
+#endif /* _MY_ICONV */
|
+#endif /* _MY_ICONV */
|
||||||
diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c
|
diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c
|
||||||
--- unrtf-0.21.2.old/src/output.c 2011-06-07 08:04:38.000000000 -0400
|
--- unrtf-0.21.2.old/src/output.c 2011-06-07 08:04:38.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/output.c 2011-12-01 10:30:41.598861702 -0500
|
+++ unrtf-0.21.2/src/output.c 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -1,23 +1,23 @@
|
@@ -1,23 +1,23 @@
|
||||||
/*=============================================================================
|
/*=============================================================================
|
||||||
- GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
- GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
||||||
|
@ -9535,7 +9544,7 @@ diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c
|
||||||
-
|
-
|
||||||
diff -durpN unrtf-0.21.2.old/src/output.h unrtf-0.21.2/src/output.h
|
diff -durpN unrtf-0.21.2.old/src/output.h unrtf-0.21.2/src/output.h
|
||||||
--- unrtf-0.21.2.old/src/output.h 2010-08-11 21:09:02.000000000 -0400
|
--- unrtf-0.21.2.old/src/output.h 2010-08-11 21:09:02.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/output.h 2011-11-09 15:53:21.814783744 -0500
|
+++ unrtf-0.21.2/src/output.h 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -44,227 +44,228 @@
|
@@ -44,227 +44,228 @@
|
||||||
typedef Collection Aliases;
|
typedef Collection Aliases;
|
||||||
|
|
||||||
|
@ -9923,7 +9932,7 @@ diff -durpN unrtf-0.21.2.old/src/output.h unrtf-0.21.2/src/output.h
|
||||||
-
|
-
|
||||||
diff -durpN unrtf-0.21.2.old/src/parse.c unrtf-0.21.2/src/parse.c
|
diff -durpN unrtf-0.21.2.old/src/parse.c unrtf-0.21.2/src/parse.c
|
||||||
--- unrtf-0.21.2.old/src/parse.c 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/parse.c 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/parse.c 2011-12-01 10:27:41.486860883 -0500
|
+++ unrtf-0.21.2/src/parse.c 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -1,23 +1,23 @@
|
@@ -1,23 +1,23 @@
|
||||||
/*=============================================================================
|
/*=============================================================================
|
||||||
- GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
- GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
||||||
|
@ -10597,7 +10606,7 @@ diff -durpN unrtf-0.21.2.old/src/parse.c unrtf-0.21.2/src/parse.c
|
||||||
}
|
}
|
||||||
diff -durpN unrtf-0.21.2.old/src/parse.h unrtf-0.21.2/src/parse.h
|
diff -durpN unrtf-0.21.2.old/src/parse.h unrtf-0.21.2/src/parse.h
|
||||||
--- unrtf-0.21.2.old/src/parse.h 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/parse.h 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/parse.h 2011-11-09 15:53:21.814783744 -0500
|
+++ unrtf-0.21.2/src/parse.h 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -38,8 +38,6 @@
|
@@ -38,8 +38,6 @@
|
||||||
#include "word.h"
|
#include "word.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -10690,7 +10699,7 @@ diff -durpN unrtf-0.21.2.old/src/path.h unrtf-0.21.2/src/path.h
|
||||||
-void show_dirs();
|
-void show_dirs();
|
||||||
diff -durpN unrtf-0.21.2.old/src/unrtf.h unrtf-0.21.2/src/unrtf.h
|
diff -durpN unrtf-0.21.2.old/src/unrtf.h unrtf-0.21.2/src/unrtf.h
|
||||||
--- unrtf-0.21.2.old/src/unrtf.h 1969-12-31 19:00:00.000000000 -0500
|
--- unrtf-0.21.2.old/src/unrtf.h 1969-12-31 19:00:00.000000000 -0500
|
||||||
+++ unrtf-0.21.2/src/unrtf.h 2011-11-09 15:53:21.814783744 -0500
|
+++ unrtf-0.21.2/src/unrtf.h 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -0,0 +1,55 @@
|
@@ -0,0 +1,55 @@
|
||||||
+/*===========================================================================
|
+/*===========================================================================
|
||||||
+ GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
+ GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
||||||
|
@ -10749,7 +10758,7 @@ diff -durpN unrtf-0.21.2.old/src/unrtf.h unrtf-0.21.2/src/unrtf.h
|
||||||
+#endif /* UNRTF_H */
|
+#endif /* UNRTF_H */
|
||||||
diff -durpN unrtf-0.21.2.old/src/user.c unrtf-0.21.2/src/user.c
|
diff -durpN unrtf-0.21.2.old/src/user.c unrtf-0.21.2/src/user.c
|
||||||
--- unrtf-0.21.2.old/src/user.c 2011-06-07 08:08:17.000000000 -0400
|
--- unrtf-0.21.2.old/src/user.c 2011-06-07 08:08:17.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/user.c 2011-12-01 09:59:46.215667415 -0500
|
+++ unrtf-0.21.2/src/user.c 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -7,7 +7,7 @@
|
@@ -7,7 +7,7 @@
|
||||||
*----------------------------------------------------------------------
|
*----------------------------------------------------------------------
|
||||||
* Changes:
|
* Changes:
|
||||||
|
@ -11179,7 +11188,7 @@ diff -durpN unrtf-0.21.2.old/src/user.c unrtf-0.21.2/src/user.c
|
||||||
|
|
||||||
diff -durpN unrtf-0.21.2.old/src/user.h unrtf-0.21.2/src/user.h
|
diff -durpN unrtf-0.21.2.old/src/user.h unrtf-0.21.2/src/user.h
|
||||||
--- unrtf-0.21.2.old/src/user.h 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/user.h 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/user.h 2011-11-09 15:53:21.814783744 -0500
|
+++ unrtf-0.21.2/src/user.h 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -151,9 +151,10 @@
|
@@ -151,9 +151,10 @@
|
||||||
|
|
||||||
#ifndef _USER
|
#ifndef _USER
|
||||||
|
@ -11195,7 +11204,7 @@ diff -durpN unrtf-0.21.2.old/src/user.h unrtf-0.21.2/src/user.h
|
||||||
#endif
|
#endif
|
||||||
diff -durpN unrtf-0.21.2.old/src/word.c unrtf-0.21.2/src/word.c
|
diff -durpN unrtf-0.21.2.old/src/word.c unrtf-0.21.2/src/word.c
|
||||||
--- unrtf-0.21.2.old/src/word.c 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/word.c 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/word.c 2011-12-01 10:15:34.590855632 -0500
|
+++ unrtf-0.21.2/src/word.c 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -1,23 +1,23 @@
|
@@ -1,23 +1,23 @@
|
||||||
/*=============================================================================
|
/*=============================================================================
|
||||||
- GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
- GNU UnRTF, a command-line program to convert RTF documents to other formats.
|
||||||
|
@ -11520,7 +11529,7 @@ diff -durpN unrtf-0.21.2.old/src/word.c unrtf-0.21.2/src/word.c
|
||||||
|
|
||||||
diff -durpN unrtf-0.21.2.old/src/word.h unrtf-0.21.2/src/word.h
|
diff -durpN unrtf-0.21.2.old/src/word.h unrtf-0.21.2/src/word.h
|
||||||
--- unrtf-0.21.2.old/src/word.h 2010-07-03 22:30:58.000000000 -0400
|
--- unrtf-0.21.2.old/src/word.h 2010-07-03 22:30:58.000000000 -0400
|
||||||
+++ unrtf-0.21.2/src/word.h 2011-11-09 15:53:21.814783744 -0500
|
+++ unrtf-0.21.2/src/word.h 2012-03-13 16:38:41.327940973 -0400
|
||||||
@@ -41,14 +41,15 @@ typedef struct _w {
|
@@ -41,14 +41,15 @@ typedef struct _w {
|
||||||
struct _w * child;
|
struct _w * child;
|
||||||
} Word;
|
} Word;
|
||||||
|
|
|
@ -279,7 +279,8 @@ static NSString *defaultUserID = @"anyone";
|
||||||
{
|
{
|
||||||
[self imap4URL];
|
[self imap4URL];
|
||||||
|
|
||||||
[self imap4Connection];
|
if ([self imap4Connection])
|
||||||
|
{
|
||||||
client = [imap4 client];
|
client = [imap4 client];
|
||||||
|
|
||||||
inbox = [[self mailAccountFolder] inboxFolderInContext: context];
|
inbox = [[self mailAccountFolder] inboxFolderInContext: context];
|
||||||
|
@ -297,11 +298,20 @@ static NSString *defaultUserID = @"anyone";
|
||||||
toURL: destURL];
|
toURL: destURL];
|
||||||
if (!error)
|
if (!error)
|
||||||
{
|
{
|
||||||
|
ASSIGN (imap4URL, nil);
|
||||||
|
ASSIGN (nameInContainer,
|
||||||
|
([NSString stringWithFormat: @"folder%@", [newName asCSSIdentifier]]));
|
||||||
|
|
||||||
// We unsubscribe to the old one, and subscribe back to the new one
|
// We unsubscribe to the old one, and subscribe back to the new one
|
||||||
[client subscribe: [destURL path]];
|
[client subscribe: [destURL path]];
|
||||||
[client unsubscribe: [imap4URL path]];
|
[client unsubscribe: [imap4URL path]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
error = [NSException exceptionWithName: @"SOGoMailException"
|
||||||
|
reason: @"IMAP connection is invalid"
|
||||||
|
userInfo: nil];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
error = [NSException exceptionWithName: @"SOGoMailException"
|
error = [NSException exceptionWithName: @"SOGoMailException"
|
||||||
reason: @"given name is empty"
|
reason: @"given name is empty"
|
||||||
|
@ -386,7 +396,10 @@ static NSString *defaultUserID = @"anyone";
|
||||||
error = (NSException *) trashFolder;
|
error = (NSException *) trashFolder;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
client = [[self imap4Connection] client];
|
if ([self imap4Connection])
|
||||||
|
{
|
||||||
|
error = nil;
|
||||||
|
client = [imap4 client];
|
||||||
[imap4 selectFolder: [self imap4URL]];
|
[imap4 selectFolder: [self imap4URL]];
|
||||||
folderName = [imap4 imap4FolderNameForURL: [trashFolder imap4URL]];
|
folderName = [imap4 imap4FolderNameForURL: [trashFolder imap4URL]];
|
||||||
b = YES;
|
b = YES;
|
||||||
|
@ -405,7 +418,7 @@ static NSString *defaultUserID = @"anyone";
|
||||||
objectForKey: @"result"];
|
objectForKey: @"result"];
|
||||||
|
|
||||||
if (![result boolValue])
|
if (![result boolValue])
|
||||||
[[self imap4Connection] createMailbox: folderName
|
[imap4 createMailbox: folderName
|
||||||
atURL: [[self mailAccountFolder] imap4URL]];
|
atURL: [[self mailAccountFolder] imap4URL]];
|
||||||
|
|
||||||
result = [[client copyUids: uids toFolder: folderName]
|
result = [[client copyUids: uids toFolder: folderName]
|
||||||
|
@ -414,6 +427,11 @@ static NSString *defaultUserID = @"anyone";
|
||||||
b = [result boolValue];
|
b = [result boolValue];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
error = [NSException exceptionWithName: @"SOGoMailException"
|
||||||
|
reason: @"IMAP connection is invalid"
|
||||||
|
userInfo: nil];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
error = [NSException exceptionWithHTTPStatus: 500
|
error = [NSException exceptionWithHTTPStatus: 500
|
||||||
|
@ -608,6 +626,8 @@ static NSString *defaultUserID = @"anyone";
|
||||||
}
|
}
|
||||||
|
|
||||||
client = [[self imap4Connection] client];
|
client = [[self imap4Connection] client];
|
||||||
|
if (client)
|
||||||
|
{
|
||||||
[imap4 selectFolder: [self imap4URL]];
|
[imap4 selectFolder: [self imap4URL]];
|
||||||
|
|
||||||
// We make sure the destination IMAP folder exist, if not, we create it.
|
// We make sure the destination IMAP folder exist, if not, we create it.
|
||||||
|
@ -624,7 +644,14 @@ static NSString *defaultUserID = @"anyone";
|
||||||
result = nil;
|
result = nil;
|
||||||
else
|
else
|
||||||
result = [NSException exceptionWithHTTPStatus: 500
|
result = [NSException exceptionWithHTTPStatus: 500
|
||||||
reason: [[[result objectForKey: @"RawResponse"] objectForKey: @"ResponseResult"] objectForKey: @"description"]];
|
reason: [[[result objectForKey: @"RawResponse"]
|
||||||
|
objectForKey: @"ResponseResult"]
|
||||||
|
objectForKey: @"description"]];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
result = [NSException exceptionWithName: @"SOGoMailException"
|
||||||
|
reason: @"IMAP connection is invalid"
|
||||||
|
userInfo: nil];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
result = [NSException exceptionWithHTTPStatus: 500
|
result = [NSException exceptionWithHTTPStatus: 500
|
||||||
|
@ -645,7 +672,8 @@ static NSString *defaultUserID = @"anyone";
|
||||||
NGImap4Client *client;
|
NGImap4Client *client;
|
||||||
|
|
||||||
client = [[self imap4Connection] client];
|
client = [[self imap4Connection] client];
|
||||||
|
if (client)
|
||||||
|
{
|
||||||
result = [self copyUIDs: uids toFolder: destinationFolder inContext: localContext];
|
result = [self copyUIDs: uids toFolder: destinationFolder inContext: localContext];
|
||||||
if (![result isNotNull])
|
if (![result isNotNull])
|
||||||
{
|
{
|
||||||
|
@ -657,6 +685,11 @@ static NSString *defaultUserID = @"anyone";
|
||||||
result = nil;
|
result = nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
result = [NSException exceptionWithName: @"SOGoMailException"
|
||||||
|
reason: @"IMAP connection is invalid"
|
||||||
|
userInfo: nil];
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -740,7 +773,15 @@ static NSString *defaultUserID = @"anyone";
|
||||||
|
|
||||||
- (NSException *) expunge
|
- (NSException *) expunge
|
||||||
{
|
{
|
||||||
return [[self imap4Connection] expungeAtURL: [self imap4URL]];
|
NSException *error;
|
||||||
|
|
||||||
|
if ([self imap4Connection])
|
||||||
|
error = [imap4 expungeAtURL: [self imap4URL]];
|
||||||
|
else
|
||||||
|
error = [NSException exceptionWithName: @"SOGoMailException"
|
||||||
|
reason: @"IMAP connection is invalid"
|
||||||
|
userInfo: nil];
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) markForExpunge
|
- (void) markForExpunge
|
||||||
|
@ -796,8 +837,17 @@ static NSString *defaultUserID = @"anyone";
|
||||||
|
|
||||||
- (NSException *) addFlagsToAllMessages: (id) _f
|
- (NSException *) addFlagsToAllMessages: (id) _f
|
||||||
{
|
{
|
||||||
return [[self imap4Connection] addFlags:_f
|
NSException *error;
|
||||||
|
|
||||||
|
if ([self imap4Connection])
|
||||||
|
error = [imap4 addFlags:_f
|
||||||
toAllMessagesInURL: [self imap4URL]];
|
toAllMessagesInURL: [self imap4URL]];
|
||||||
|
else
|
||||||
|
error = [NSException exceptionWithName: @"SOGoMailException"
|
||||||
|
reason: @"IMAP connection is invalid"
|
||||||
|
userInfo: nil];
|
||||||
|
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* name lookup */
|
/* name lookup */
|
||||||
|
@ -866,7 +916,16 @@ static NSString *defaultUserID = @"anyone";
|
||||||
- (NSException *) davCreateCollection: (NSString *) _name
|
- (NSException *) davCreateCollection: (NSString *) _name
|
||||||
inContext: (id) _ctx
|
inContext: (id) _ctx
|
||||||
{
|
{
|
||||||
return [[self imap4Connection] createMailbox:_name atURL:[self imap4URL]];
|
NSException *error;
|
||||||
|
|
||||||
|
if ([self imap4Connection])
|
||||||
|
error = [imap4 createMailbox:_name atURL:[self imap4URL]];
|
||||||
|
else
|
||||||
|
error = [NSException exceptionWithName: @"SOGoMailException"
|
||||||
|
reason: @"IMAP connection is invalid"
|
||||||
|
userInfo: nil];
|
||||||
|
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) exists
|
- (BOOL) exists
|
||||||
|
@ -879,7 +938,8 @@ static NSString *defaultUserID = @"anyone";
|
||||||
NSException *error;
|
NSException *error;
|
||||||
BOOL rc;
|
BOOL rc;
|
||||||
|
|
||||||
[self imap4Connection];
|
if ([self imap4Connection])
|
||||||
|
{
|
||||||
error = [imap4 createMailbox: [self relativeImap4Name]
|
error = [imap4 createMailbox: [self relativeImap4Name]
|
||||||
atURL: [container imap4URL]];
|
atURL: [container imap4URL]];
|
||||||
if (error)
|
if (error)
|
||||||
|
@ -889,19 +949,32 @@ static NSString *defaultUserID = @"anyone";
|
||||||
[[imap4 client] subscribe: [self absoluteImap4Name]];
|
[[imap4 client] subscribe: [self absoluteImap4Name]];
|
||||||
rc = YES;
|
rc = YES;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
rc = NO;
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSException *) delete
|
- (NSException *) delete
|
||||||
{
|
{
|
||||||
return [[self imap4Connection] deleteMailboxAtURL:[self imap4URL]];
|
NSException *error;
|
||||||
|
|
||||||
|
if ([self imap4Connection])
|
||||||
|
error = [imap4 deleteMailboxAtURL: [self imap4URL]];
|
||||||
|
else
|
||||||
|
error = [NSException exceptionWithName: @"SOGoMailException"
|
||||||
|
reason: @"IMAP connection is invalid"
|
||||||
|
userInfo: nil];
|
||||||
|
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSException *) davMoveToTargetObject: (id) _target
|
- (NSException *) davMoveToTargetObject: (id) _target
|
||||||
newName: (NSString *) _name
|
newName: (NSString *) _name
|
||||||
inContext: (id)_ctx
|
inContext: (id)_ctx
|
||||||
{
|
{
|
||||||
|
NSException *error;
|
||||||
NSURL *destImapURL;
|
NSURL *destImapURL;
|
||||||
|
|
||||||
if ([_name length] == 0) { /* target already exists! */
|
if ([_name length] == 0) { /* target already exists! */
|
||||||
|
@ -927,8 +1000,15 @@ static NSString *defaultUserID = @"anyone";
|
||||||
[[self imap4URL] absoluteString],
|
[[self imap4URL] absoluteString],
|
||||||
[destImapURL absoluteString]];
|
[destImapURL absoluteString]];
|
||||||
|
|
||||||
return [[self imap4Connection] moveMailboxAtURL:[self imap4URL]
|
if ([self imap4Connection])
|
||||||
toURL:destImapURL];
|
error = [imap4 moveMailboxAtURL: [self imap4URL]
|
||||||
|
toURL: destImapURL];
|
||||||
|
else
|
||||||
|
error = [NSException exceptionWithName: @"SOGoMailException"
|
||||||
|
reason: @"IMAP connection is invalid"
|
||||||
|
userInfo: nil];
|
||||||
|
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSException *) davCopyToTargetObject: (id) _target
|
- (NSException *) davCopyToTargetObject: (id) _target
|
||||||
|
|
6
Version
6
Version
|
@ -2,6 +2,6 @@
|
||||||
# This file is included by library makefiles to set the version information
|
# This file is included by library makefiles to set the version information
|
||||||
# of the executable.
|
# of the executable.
|
||||||
|
|
||||||
MAJOR_VERSION=1
|
MAJOR_VERSION=2
|
||||||
MINOR_VERSION=3
|
MINOR_VERSION=0
|
||||||
SUBMINOR_VERSION=13
|
SUBMINOR_VERSION=0
|
||||||
|
|
Loading…
Reference in a new issue