Monotone-Parent: e81a19428dc35c851d16d525d7d41f645b87aa93
Monotone-Revision: 5bdd362f0346da09b105a6a7054e67410a0dcee5 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-08-08T19:01:24 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
580e0027f9
commit
8b8f079992
15
ChangeLog
15
ChangeLog
|
@ -1,5 +1,20 @@
|
|||
2011-08-08 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreAppointmentWrapper.m
|
||||
(-getPrOwnerApptId:inMemCtx:): properly reimplemented the method
|
||||
following the spec.
|
||||
(-getPidLidServerProcessed:inMemCtx:): now returns yes in order to
|
||||
prevent the client from uselessly updating the event.
|
||||
|
||||
* OpenChange/MAPIStoreMailMessage.m
|
||||
(-getPrReplyRequested:inMemCtx:): commented out method.
|
||||
(-getPrResponseRequested:inMemCtx:): returns NO when the message
|
||||
is an invitation, as the mail handling is performed internally by
|
||||
SOGo.
|
||||
(-getPrOwnerApptId:inMemCtx:): properly forwards the call to
|
||||
MAPIStoreAppointmentWrapper when required.
|
||||
(-getPidLidMeetingType:inMemCtx:): new method.
|
||||
|
||||
* OpenChange/MAPIStoreContext.m (-activeUser): new helper method.
|
||||
|
||||
* OpenChange/MAPIStoreSOGo.m (sogo_backend_init): invoke
|
||||
|
|
|
@ -49,12 +49,18 @@ extern NSTimeZone *utcTZ;
|
|||
/* getters */
|
||||
- (int) getPrIconIndex: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPrOwnerApptId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidMeetingType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPrMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPrBody: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPrStartDate: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidAppointmentStateFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidAppointmentStartWhole: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPidLidCommonStart: (void **) data
|
||||
|
|
|
@ -140,6 +140,85 @@ static NSCharacterSet *hexCharacterSet = nil;
|
|||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPrOwnerApptId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc;
|
||||
const char *utf8UID;
|
||||
union {
|
||||
uint32_t longValue;
|
||||
char charValue[4];
|
||||
} value;
|
||||
NSUInteger max, length;
|
||||
|
||||
if ([[event attendees] count] > 0)
|
||||
{
|
||||
utf8UID = [[event uid] UTF8String];
|
||||
length = strlen (utf8UID);
|
||||
max = 2;
|
||||
if (length < max)
|
||||
max = length;
|
||||
memcpy (value.charValue, utf8UID, max);
|
||||
memcpy (value.charValue + 2, utf8UID + length - 2, max);
|
||||
|
||||
*data = MAPILongValue (memCtx, value.longValue);
|
||||
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
else
|
||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidLidMeetingType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
/* TODO
|
||||
See 2.2.6.5 PidLidMeetingType (OXOCAL) */
|
||||
*data = MAPILongValue (memCtx, 0x00000001);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidOwnerCriticalChange: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
NSCalendarDate *lastModified;
|
||||
|
||||
if ([[event attendees] count] > 0)
|
||||
{
|
||||
lastModified = [event lastModified];
|
||||
if (lastModified)
|
||||
{
|
||||
*data = [lastModified asFileTimeInMemCtx: memCtx];
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPidLidAttendeeCriticalChange: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
NSCalendarDate *lastModified;
|
||||
|
||||
if ([[event attendees] count] > 0)
|
||||
{
|
||||
lastModified = [event lastModified];
|
||||
if (lastModified)
|
||||
{
|
||||
*data = [lastModified asFileTimeInMemCtx: memCtx];
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getPrMessageClass: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
|
@ -177,6 +256,19 @@ static NSCharacterSet *hexCharacterSet = nil;
|
|||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidAppointmentStateFlags: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
uint32_t flags = 0x00;
|
||||
|
||||
if ([[event attendees] count] > 0)
|
||||
flags |= 0x01; /* asfMeeting */
|
||||
|
||||
*data = MAPILongValue (memCtx, flags);
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPidLidAppointmentStartWhole: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
|
@ -279,7 +371,10 @@ static NSCharacterSet *hexCharacterSet = nil;
|
|||
- (int) getPidLidServerProcessed: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getNo: data inMemCtx: memCtx];
|
||||
/* TODO: we need to check whether the event has been processed internally by
|
||||
SOGo or if it was received only by mail. We only assume the SOGo case
|
||||
here. */
|
||||
return [self getYes: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPidLidPrivate: (void **) data // private (bool), should depend on CLASS and permissions
|
||||
|
|
|
@ -409,21 +409,26 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
|||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (int) getPrReplyRequested: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
// - (int) getPrReplyRequested: (void **) data // TODO
|
||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
||||
// {
|
||||
// if (!headerSetup)
|
||||
// [self _fetchHeaderData];
|
||||
|
||||
// return (mailIsEvent
|
||||
// ? [self getYes: data inMemCtx: memCtx]
|
||||
// : [self getNo: data inMemCtx: memCtx]);
|
||||
// }
|
||||
|
||||
- (int) getPrResponseRequested: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
if (!headerSetup)
|
||||
[self _fetchHeaderData];
|
||||
|
||||
return (mailIsEvent
|
||||
? [self getYes: data inMemCtx: memCtx]
|
||||
: [self getNo: data inMemCtx: memCtx]);
|
||||
}
|
||||
|
||||
- (int) getPrResponseRequested: (void **) data // TODO
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getPrReplyRequested: data inMemCtx: memCtx];
|
||||
? [self getNo: data inMemCtx: memCtx]
|
||||
: MAPISTORE_ERR_NOT_FOUND);
|
||||
}
|
||||
|
||||
- (int) getPrLatestDeliveryTime: (void **) data // DOUBT
|
||||
|
@ -834,12 +839,6 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
|||
: [self getNo: data inMemCtx: memCtx]);
|
||||
}
|
||||
|
||||
- (int) getPidLidMeetingType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
return [self getLongZero: data inMemCtx: memCtx];
|
||||
}
|
||||
|
||||
- (int) getPrMsgEditorFormat: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
|
@ -1058,17 +1057,25 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
|||
- (int) getPrOwnerApptId: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
|
||||
if (!headerSetup)
|
||||
[self _fetchHeaderData];
|
||||
|
||||
if (mailIsEvent)
|
||||
*data = MAPILongValue (memCtx, 0xabcd1234);
|
||||
else
|
||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
return (mailIsEvent
|
||||
? [[self _appointmentWrapper] getPrOwnerApptId: data
|
||||
inMemCtx: memCtx]
|
||||
: MAPISTORE_ERR_NOT_FOUND);
|
||||
}
|
||||
|
||||
return rc;
|
||||
- (int) getPidLidMeetingType: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
if (!headerSetup)
|
||||
[self _fetchHeaderData];
|
||||
|
||||
return (mailIsEvent
|
||||
? [[self _appointmentWrapper] getPidLidMeetingType: data
|
||||
inMemCtx: memCtx]
|
||||
: MAPISTORE_ERR_NOT_FOUND);
|
||||
}
|
||||
|
||||
- (void) getMessageData: (struct mapistore_message **) dataPtr
|
||||
|
|
Loading…
Reference in New Issue