From 1e5155e1a20382fb38533258505eadec4de84934 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 22 Jan 2010 16:33:35 +0000 Subject: [PATCH] build warnings Monotone-Parent: 45249fe68411e1b5ecd968fb87f91801d6882115 Monotone-Revision: 9ea936d2bbff9184d4e2df3779bdc267702b6996 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-01-22T16:33:35 Monotone-Branch: ca.inverse.sogo --- .../Appointments/SOGoAppointmentFolder.h | 6 +++ .../Appointments/SOGoAppointmentFolders.m | 37 ++++++++----------- .../Appointments/SOGoAppointmentObject.m | 4 +- .../Appointments/SOGoComponentOccurence.h | 9 ++--- SoObjects/Contacts/SOGoContactLDIFEntry.h | 2 + SoObjects/Contacts/SOGoContactObject.h | 4 -- SoObjects/Mailer/SOGoDraftObject.m | 8 ++++ SoObjects/SOGo/SOGoContentObject.h | 5 ++- UI/Contacts/UIxContactFoldersView.m | 2 +- UI/MailerUI/UIxMailEditor.m | 7 +++- UI/SOGoElements/SOGoIEConditional.m | 5 ++- UI/SOGoUI/SOGoACLAdvisory.m | 9 +++++ UI/SOGoUI/UIxComponent.m | 10 ----- UI/Scheduler/UIxAppointmentEditor.m | 2 +- 14 files changed, 62 insertions(+), 48 deletions(-) diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.h b/SoObjects/Appointments/SOGoAppointmentFolder.h index 5887ab975..92de59fde 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.h +++ b/SoObjects/Appointments/SOGoAppointmentFolder.h @@ -82,6 +82,12 @@ typedef enum { - (NSString *) resourceNameForEventUID: (NSString *) _uid; /* fetching */ +- (NSArray *) bareFetchFields: (NSArray *) fields + from: (NSCalendarDate *) startDate + to: (NSCalendarDate *) endDate + title: (NSString *) title + component: (NSString *) component + additionalFilters: (NSString *) filters; - (NSArray *) fetchFields: (NSArray *) _fields from: (NSCalendarDate *) _startDate diff --git a/SoObjects/Appointments/SOGoAppointmentFolders.m b/SoObjects/Appointments/SOGoAppointmentFolders.m index e67bd2a20..c391aeec5 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolders.m +++ b/SoObjects/Appointments/SOGoAppointmentFolders.m @@ -55,6 +55,8 @@ @interface SOGoParentFolder (Private) - (NSException *) initSubscribedSubFolders; +- (NSException *) _fetchPersonalFolders: (NSString *) sql + withChannel: (EOAdaptorChannel *) fc; @end @@ -265,8 +267,7 @@ attributes: nil]]; componentSet = [davElementWithContent (@"supported-calendar-component-set", - XMLNS_CALDAV, - components) + XMLNS_CALDAV, components) asWebDAVValue]; [componentSet retain]; } @@ -284,7 +285,6 @@ us = [[SOGoUser userWithLogin: [self ownerInContext: nil]] userSettings]; - tmp = [us objectForKey: @"Calendar"]; if (tmp) { @@ -312,7 +312,6 @@ isWebRequest = [[context request] handledByDefaultHandler]; error = [super _fetchPersonalFolders: sql withChannel: fc]; - if (!error) { webCalendarIds = [self webCalendarIds]; @@ -449,26 +448,20 @@ static NSArray *readAccessRoles = nil; if (!writeAccessRoles) - { - writeAccessRoles = [NSArray arrayWithObjects: - SOGoCalendarRole_ConfidentialModifier, - SOGoRole_ObjectCreator, - SOGoRole_ObjectEraser, - SOGoCalendarRole_PrivateModifier, - SOGoCalendarRole_PublicModifier, - nil]; - [writeAccessRoles retain]; - } + writeAccessRoles = [[NSArray alloc] initWithObjects: + SOGoCalendarRole_ConfidentialModifier, + SOGoRole_ObjectCreator, + SOGoRole_ObjectEraser, + SOGoCalendarRole_PrivateModifier, + SOGoCalendarRole_PublicModifier, + nil]; if (!readAccessRoles) - { - readAccessRoles = [NSArray arrayWithObjects: - SOGoCalendarRole_ConfidentialViewer, - SOGoCalendarRole_PrivateViewer, - SOGoCalendarRole_PublicViewer, - nil]; - [readAccessRoles retain]; - } + readAccessRoles = [[NSArray alloc] initWithObjects: + SOGoCalendarRole_ConfidentialViewer, + SOGoCalendarRole_PrivateViewer, + SOGoCalendarRole_PublicViewer, + nil]; return (hasWriteAccess) ? writeAccessRoles : readAccessRoles; } diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 248f80697..d412e6a6b 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -1462,9 +1462,11 @@ } } -- (void) prepareDelete +- (NSException *) prepareDelete { [self prepareDeleteOccurence: nil]; + + return nil; } /* message type */ diff --git a/SoObjects/Appointments/SOGoComponentOccurence.h b/SoObjects/Appointments/SOGoComponentOccurence.h index 2990fcf7c..b0c9583c9 100644 --- a/SoObjects/Appointments/SOGoComponentOccurence.h +++ b/SoObjects/Appointments/SOGoComponentOccurence.h @@ -35,8 +35,11 @@ @protocol SOGoComponentOccurence - (iCalRepeatableEntityObject *) occurence; +- (void) setIsNew: (BOOL) newIsNew; - (BOOL) isNew; -- (NSException *) prepareDelete; + +- (NSException *) changeParticipationStatus: (NSString *) newPartStat + withDelegate: (iCalPerson *) delegate; @end @@ -54,10 +57,6 @@ - (void) setComponent: (iCalRepeatableEntityObject *) newComponent; - (void) setMasterComponent: (iCalRepeatableEntityObject *) newMaster; -- (void) setIsNew: (BOOL) newIsNew; - -- (NSException *) changeParticipationStatus: (NSString *) newPartStat - withDelegate: (iCalPerson *) delegate; @end diff --git a/SoObjects/Contacts/SOGoContactLDIFEntry.h b/SoObjects/Contacts/SOGoContactLDIFEntry.h index 475786723..9e70614ac 100644 --- a/SoObjects/Contacts/SOGoContactLDIFEntry.h +++ b/SoObjects/Contacts/SOGoContactLDIFEntry.h @@ -43,6 +43,8 @@ withLDIFEntry: (NSDictionary *) newEntry inContainer: (id) newContainer; +- (NSString *) davEntityTag; + @end #endif /* SOGOCONTACTLDIFENTRY_H */ diff --git a/SoObjects/Contacts/SOGoContactObject.h b/SoObjects/Contacts/SOGoContactObject.h index 6903642e0..74b911540 100644 --- a/SoObjects/Contacts/SOGoContactObject.h +++ b/SoObjects/Contacts/SOGoContactObject.h @@ -39,13 +39,9 @@ @protocol SOGoContactObject -- (NSString *) contentAsString; - (NGVCard *) vCard; - (void) save; -- (NSString *) davEntityTag; -- (NSString *) nameInContainer; - @end #endif /* __Contacts_SOGoContactObject_H__ */ diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index e577d49eb..3b922df9c 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -77,6 +77,14 @@ static NSString *headerKeys[] = {@"subject", @"to", @"cc", @"bcc", @"from", @"replyTo", @"message-id", nil}; +#warning -[NGImap4Connection postData:flags:toFolderURL:] should be enhanced \ + to return at least the new uid +@interface NGImap4Connection (SOGoHiddenMethods) + +- (NSString *) imap4FolderNameForURL: (NSURL *) url; + +@end + @implementation SOGoDraftObject static NGMimeType *MultiMixedType = nil; diff --git a/SoObjects/SOGo/SOGoContentObject.h b/SoObjects/SOGo/SOGoContentObject.h index 9d4860118..100261f32 100644 --- a/SoObjects/SOGo/SOGoContentObject.h +++ b/SoObjects/SOGo/SOGoContentObject.h @@ -29,6 +29,7 @@ @class NSException; @class NSString; @class SOGoGCSFolder; +@class WOContext; @interface SOGoContentObject : SOGoObject { @@ -60,6 +61,8 @@ baseVersion: (unsigned int) _baseVersion; - (NSException *) saveContentString: (NSString *)_str; +- (id) PUTAction: (WOContext *) _ctx; + /* actions */ - (NSException *) copyToFolder: (SOGoGCSFolder *) newFolder; - (NSException *) moveToFolder: (SOGoGCSFolder *) newFolder; @@ -80,7 +83,7 @@ @interface SOGoContentObject (OptionalMethods) -- (void) prepareDelete; +- (NSException *) prepareDelete; @end diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index 29d7e1ccd..2939b431a 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -177,7 +177,7 @@ - (id ) allContactSearchAction { id result; - id folder; + SOGoFolder *folder; NSString *searchText, *mail; NSDictionary *data; NSArray *folders, *contacts, *descriptors, *sortedContacts; diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index cdd3555d6..c5dc3a050 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -26,7 +26,10 @@ #import #import +#define COMPILING_NGOBJWEB 1 /* we want httpRequest for parsing multi-part + form data */ #import +#undef COMPILING_NGOBJWEB #import #import #import @@ -498,12 +501,12 @@ static NSArray *infoKeys = nil; // TODO: need to validate whether we have a To etc /* first, save form data */ - result = [self validateForSend]; + result = (id ) [self validateForSend]; if (!result) { if ([self _saveFormInfo]) { - result = [[self clientObject] sendMail]; + result = (id ) [[self clientObject] sendMail]; if (!result) result = [self jsCloseWithRefreshMethod: @"refreshCurrentFolder()"]; } diff --git a/UI/SOGoElements/SOGoIEConditional.m b/UI/SOGoElements/SOGoIEConditional.m index ec18b500b..e3ac46bab 100644 --- a/UI/SOGoElements/SOGoIEConditional.m +++ b/UI/SOGoElements/SOGoIEConditional.m @@ -31,7 +31,10 @@ associations: (NSDictionary *) associations template: (WOElement *) newTemplate { - ASSIGN (template, newTemplate); + if ((self = [super initWithName: name + associations: associations + template: newTemplate])) + ASSIGN (template, newTemplate); return self; } diff --git a/UI/SOGoUI/SOGoACLAdvisory.m b/UI/SOGoUI/SOGoACLAdvisory.m index 1c66b9177..b4cd505df 100644 --- a/UI/SOGoUI/SOGoACLAdvisory.m +++ b/UI/SOGoUI/SOGoACLAdvisory.m @@ -37,6 +37,15 @@ #import "SOGoACLAdvisory.h" +/* those methods appear here because SOGoMailFolder is not a descendant of + SOGoFolder... */ +@interface SOGoObject (SOGoFolderACLMethods) + +- (NSString *) displayName; +- (NSString *) folderType; + +@end + @implementation SOGoACLAdvisory - (id) init diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index a6b14a238..230b653b6 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -365,16 +365,6 @@ static NSMutableArray *abbrMonthLabelKeys = nil; return [[currentClient baseURLInContext: context] hostlessURL]; } -- (NSString *) resourcesPath -{ - WOResourceManager *rm; - - if ((rm = [self resourceManager]) == nil) - rm = [[WOApplication application] resourceManager]; - - return [rm webServerResourcesPath]; -} - - (NSString *) ownPath { NSString *uri; diff --git a/UI/Scheduler/UIxAppointmentEditor.m b/UI/Scheduler/UIxAppointmentEditor.m index 93dbbbd64..a768fd448 100644 --- a/UI/Scheduler/UIxAppointmentEditor.m +++ b/UI/Scheduler/UIxAppointmentEditor.m @@ -324,7 +324,7 @@ onObject: co inContext: context]) method = [NSString stringWithFormat:@"%@/%@.ics/editAsAppointment", - [co soURL], objectId]; + [co soURL], objectId] ; else method = [NSString stringWithFormat: @"%@/Calendar/personal/%@.ics/editAsAppointment", [self userFolderPath], objectId];