From a4b083eb1e8a564e321e49788f546fb6848aac98 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 30 Mar 2012 19:51:37 +0000 Subject: [PATCH] Monotone-Parent: cb7b77723f765942d950c5620150b720f5d0c5b1 Monotone-Revision: 1900d82b81c570a73d4db548a566ed09b57ee43a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-30T19:51:37 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ OpenChange/MAPIApplication.m | 5 +++++ OpenChange/MAPIStoreAppointmentWrapper.h | 2 -- OpenChange/MAPIStoreAppointmentWrapper.m | 4 ---- OpenChange/MAPIStoreContactsAttachment.m | 2 -- OpenChange/MAPIStoreTypes.h | 3 +++ OpenChange/MAPIStoreTypes.m | 2 ++ 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8859b3097..2f00edb37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2012-03-30 Wolfgang Sourdeau + * OpenChange/MAPIApplication.m (-init): utcTZ is now initialized + here. + + * OpenChange/MAPIStoreTypes.[hm]: new host module for utcTZ. + * OpenChange/MAPIStoreUserContext.m (-timeZone): new method that returns the timezone of an owner user. diff --git a/OpenChange/MAPIApplication.m b/OpenChange/MAPIApplication.m index 707e0f579..8da1c1078 100644 --- a/OpenChange/MAPIApplication.m +++ b/OpenChange/MAPIApplication.m @@ -21,6 +21,7 @@ */ #import +#import #import #import @@ -28,6 +29,7 @@ #import #import "MAPIStoreUserContext.h" +#import "MAPIStoreTypes.h" #import "MAPIApplication.h" @@ -49,6 +51,9 @@ MAPIApplication *MAPIApp = nil; MAPIApp = [super init]; [MAPIApp retain]; + + utcTZ = [NSTimeZone timeZoneWithName: @"UTC"]; + [utcTZ retain]; } return MAPIApp; diff --git a/OpenChange/MAPIStoreAppointmentWrapper.h b/OpenChange/MAPIStoreAppointmentWrapper.h index efb5ac2a1..74b275275 100644 --- a/OpenChange/MAPIStoreAppointmentWrapper.h +++ b/OpenChange/MAPIStoreAppointmentWrapper.h @@ -35,8 +35,6 @@ @class SOGoUser; -extern NSTimeZone *utcTZ; - @interface MAPIStoreAppointmentWrapper : NSObject { struct mapistore_connection_info *connInfo; diff --git a/OpenChange/MAPIStoreAppointmentWrapper.m b/OpenChange/MAPIStoreAppointmentWrapper.m index b3eb8df02..c3eddf6fe 100644 --- a/OpenChange/MAPIStoreAppointmentWrapper.m +++ b/OpenChange/MAPIStoreAppointmentWrapper.m @@ -59,16 +59,12 @@ #include #include -NSTimeZone *utcTZ; - static NSCharacterSet *hexCharacterSet = nil; @implementation MAPIStoreAppointmentWrapper + (void) initialize { - utcTZ = [NSTimeZone timeZoneWithName: @"UTC"]; - [utcTZ retain]; if (!hexCharacterSet) { hexCharacterSet = [NSCharacterSet characterSetWithCharactersInString: @"1234567890abcdefABCDEF"]; diff --git a/OpenChange/MAPIStoreContactsAttachment.m b/OpenChange/MAPIStoreContactsAttachment.m index 6a9afe86a..00fc652d6 100644 --- a/OpenChange/MAPIStoreContactsAttachment.m +++ b/OpenChange/MAPIStoreContactsAttachment.m @@ -35,8 +35,6 @@ #include -extern NSTimeZone *utcTZ; - /* TODO: handle URL pictures via PidTagAttachMethod = ref ? */ @implementation MAPIStoreContactsAttachment diff --git a/OpenChange/MAPIStoreTypes.h b/OpenChange/MAPIStoreTypes.h index 286c0b298..8e2fb7d46 100644 --- a/OpenChange/MAPIStoreTypes.h +++ b/OpenChange/MAPIStoreTypes.h @@ -32,6 +32,9 @@ @class NSData; @class NSDictionary; +@class NSTimeZone; + +extern NSTimeZone *utcTZ; uint8_t *MAPIBoolValue (void *memCtx, BOOL value); uint32_t *MAPILongValue (void *memCtx, uint32_t value); diff --git a/OpenChange/MAPIStoreTypes.m b/OpenChange/MAPIStoreTypes.m index bcef90ae1..fc4ca727a 100644 --- a/OpenChange/MAPIStoreTypes.m +++ b/OpenChange/MAPIStoreTypes.m @@ -36,6 +36,8 @@ #include #include +NSTimeZone *utcTZ; + uint8_t * MAPIBoolValue (void *memCtx, BOOL value) {