diff options
author | Pushkar Singh <pushkar@hothouselabs.com> | 2013-07-20 22:49:28 -0700 |
---|---|---|
committer | Pushkar Singh <pushkar@hothouselabs.com> | 2013-07-20 22:49:28 -0700 |
commit | 52473496926f12877dca66ad44ac1af65e9406d6 (patch) | |
tree | c839a7674083a7795d278faefeea161a9d267fdc | |
parent | 0bc680acc776bd83dd9f0300015fc85b5e9aad7f (diff) | |
parent | 798a4b1117527acc1de523b13577d86fe7df990b (diff) |
Merge remote-tracking branch 'upstream/master'
73 files changed, 10667 insertions, 1578 deletions
@@ -23,13 +23,13 @@ MailCore 2 provides a simple and asynchronous Objective-C API to work with the e - Click the `+` icon and select `MailCore.framework`. * Mac static library - Go to Build Phases from your build target, and under 'Link Binary With Libraries', add `libMailCore.a`. - - Set 'Other Linker Flags' under Build Settings: `-lctemplate -letpan -licudata -licui18n -licuuc -lxml2 -lsasl2 -liconv -ltidy` `-lc++ -stdlib=libc++ -all_load` + - Set 'Other Linker Flags' under Build Settings: `-lctemplate -letpan -licudata -licui18n -licuuc -lxml2 -lsasl2 -liconv -ltidy -lz` `-lc++ -stdlib=libc++ -ObjC` - Make sure to use LLVM C++ standard library. In Build Settings, locate 'C++ Standard Library', and select `libc++`. - In Build Phases, add a Target Dependency of `static mailcore2 osx`. 5. **For iOS** - If you're targeting iOS, you have to link against MailCore 2 as a static library: * Add `libMailCore-ios.a` * Add `CFNetwork.framework` - * Set 'Other Linker Flags': `-lctemplate-ios -letpan-ios -licudata -licui18n -licuuc -lxml2 -lsasl2 -liconv -ltidy` `-lstdc++ -stdlib=libstdc++ -all_load` + * Set 'Other Linker Flags': `-lctemplate-ios -letpan-ios -licudata -licui18n -licuuc -lxml2 -lsasl2 -liconv -ltidy -lz` `-lstdc++ -stdlib=libstdc++ -ObjC` * Make sure to use GNU C++ standard library. In Build Settings, locate 'C++ Standard Library', and select `libstdc++`. * In Build Phases, add a Target Dependency of `static mailcore2 ios`. 6. Profit. diff --git a/build-mac/mailcore2.xcodeproj/project.pbxproj b/build-mac/mailcore2.xcodeproj/project.pbxproj index 7ae5ee05..df155675 100644 --- a/build-mac/mailcore2.xcodeproj/project.pbxproj +++ b/build-mac/mailcore2.xcodeproj/project.pbxproj @@ -14,20 +14,18 @@ 9E774D8C1767CD490065EB9B /* MCIMAPFolderStatus.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9E774D871767C54E0065EB9B /* MCIMAPFolderStatus.h */; }; 9EF9AB09175F2EC60027FA3B /* MCOIMAPFolderStatus.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9EF9AB07175F2EC60027FA3B /* MCOIMAPFolderStatus.mm */; }; 9EF9AB0A175F2EC60027FA3B /* MCOIMAPFolderStatus.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9EF9AB07175F2EC60027FA3B /* MCOIMAPFolderStatus.mm */; }; - 9EF9AB0B175F2EC60027FA3B /* MCOIMAPFolderStatus.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9EF9AB07175F2EC60027FA3B /* MCOIMAPFolderStatus.mm */; }; 9EF9AB11175F319A0027FA3B /* MCIMAPFolderStatusOperation.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9EF9AB10175F319A0027FA3B /* MCIMAPFolderStatusOperation.cc */; }; 9EF9AB12175F319A0027FA3B /* MCIMAPFolderStatusOperation.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9EF9AB10175F319A0027FA3B /* MCIMAPFolderStatusOperation.cc */; }; 9EF9AB19175F36600027FA3B /* MCOIMAPFolderStatusOperation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9EF9AB18175F36600027FA3B /* MCOIMAPFolderStatusOperation.mm */; }; 9EF9AB1A175F36600027FA3B /* MCOIMAPFolderStatusOperation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9EF9AB18175F36600027FA3B /* MCOIMAPFolderStatusOperation.mm */; }; - 9EF9AB1B175F36600027FA3B /* MCOIMAPFolderStatusOperation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9EF9AB18175F36600027FA3B /* MCOIMAPFolderStatusOperation.mm */; }; 9EF9AB20175F3FD10027FA3B /* MCOIMAPFolderStatus.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9EF9AB06175F2EC60027FA3B /* MCOIMAPFolderStatus.h */; }; 9EF9AB21175F3FD10027FA3B /* MCOIMAPFolderStatusOperation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9EF9AB16175F35C60027FA3B /* MCOIMAPFolderStatusOperation.h */; }; 9EF9AB22175F406D0027FA3B /* MCOIMAPFolderStatus.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9EF9AB06175F2EC60027FA3B /* MCOIMAPFolderStatus.h */; }; 9EF9AB23175F406D0027FA3B /* MCOIMAPFolderStatusOperation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9EF9AB16175F35C60027FA3B /* MCOIMAPFolderStatusOperation.h */; }; 9EF9AB24175F409D0027FA3B /* MCIMAPFolderStatusOperation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9EF9AB0E175F30C20027FA3B /* MCIMAPFolderStatusOperation.h */; }; 9EF9AB25175F40C70027FA3B /* MCIMAPFolderStatusOperation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9EF9AB0E175F30C20027FA3B /* MCIMAPFolderStatusOperation.h */; }; - BD63713B177DFF080094121B /* MCLibetpan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD637139177DFF080094121B /* MCLibetpan.cpp */; }; - BD63713C177DFF080094121B /* MCLibetpan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD637139177DFF080094121B /* MCLibetpan.cpp */; }; + BD63713B177DFF080094121B /* MCLibetpan.cc in Sources */ = {isa = PBXBuildFile; fileRef = BD637139177DFF080094121B /* MCLibetpan.cc */; }; + BD63713C177DFF080094121B /* MCLibetpan.cc in Sources */ = {isa = PBXBuildFile; fileRef = BD637139177DFF080094121B /* MCLibetpan.cc */; }; C07AD5D7FD82F8ACAB576231 /* NSError+MCO.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C07AD44B013BB42A240B4F04 /* NSError+MCO.h */; }; C07AD99B2E2054C684DB8FF6 /* NSError+MCO.mm in Sources */ = {isa = PBXBuildFile; fileRef = C07ADFE43E22B38EFF23ADB5 /* NSError+MCO.mm */; }; C07ADC28B83E7959BF114D46 /* MCOIMAPSession.mm in Sources */ = {isa = PBXBuildFile; fileRef = C07AD057D3C8FBDC7AC95733 /* MCOIMAPSession.mm */; }; @@ -82,7 +80,6 @@ C63CD68816BE1BBF00DB18F1 /* MCAddressDisplay.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C63CD67816BDCDD400DB18F1 /* MCAddressDisplay.h */; }; C63CD68916BE1BC100DB18F1 /* MCDateFormatter.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C63CD67A16BDCDD400DB18F1 /* MCDateFormatter.h */; }; C63CD68A16BE1BC400DB18F1 /* MCSizeFormatter.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C63CD67E16BDCDD400DB18F1 /* MCSizeFormatter.h */; }; - C63CD68B16BE1BC600DB18F1 /* MCHTMLRenderer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C63CD67C16BDCDD400DB18F1 /* MCHTMLRenderer.h */; }; C63CD68C16BE1BC800DB18F1 /* MCHTMLRendererCallback.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C63CD68516BE148B00DB18F1 /* MCHTMLRendererCallback.h */; }; C63CD68D16BE1BCA00DB18F1 /* MCRenderer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C63CD68716BE1AB600DB18F1 /* MCRenderer.h */; }; C63CD68E16BE324100DB18F1 /* MCOIMAPFetchFoldersOperation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F87F190816BB62690012652F /* MCOIMAPFetchFoldersOperation.h */; }; @@ -113,8 +110,6 @@ C64BB26416FD43A1000DB34C /* MCOMessageParser.mm in Sources */ = {isa = PBXBuildFile; fileRef = C64BB26316FD43A1000DB34C /* MCOMessageParser.mm */; }; C64BB26716FD43E2000DB34C /* MCOMessagePart.mm in Sources */ = {isa = PBXBuildFile; fileRef = C64BB26616FD43E2000DB34C /* MCOMessagePart.mm */; }; C64BB26A16FD44C2000DB34C /* MCOMultipart.mm in Sources */ = {isa = PBXBuildFile; fileRef = C64BB26916FD44C2000DB34C /* MCOMultipart.mm */; }; - C64DBFFD1787CA050012CA0B /* HTMLBodyRendererTemplateCallback.cc in Sources */ = {isa = PBXBuildFile; fileRef = C64DBFFB1787CA050012CA0B /* HTMLBodyRendererTemplateCallback.cc */; }; - C64DBFFE1787CA050012CA0B /* HTMLBodyRendererTemplateCallback.cc in Sources */ = {isa = PBXBuildFile; fileRef = C64DBFFB1787CA050012CA0B /* HTMLBodyRendererTemplateCallback.cc */; }; C64EA6F4169E847800778456 /* MCAbstractMessage.cc in Sources */ = {isa = PBXBuildFile; fileRef = C64EA694169E847800778456 /* MCAbstractMessage.cc */; }; C64EA6F6169E847800778456 /* MCAbstractMessagePart.cc in Sources */ = {isa = PBXBuildFile; fileRef = C64EA696169E847800778456 /* MCAbstractMessagePart.cc */; }; C64EA6F8169E847800778456 /* MCAbstractMultipart.cc in Sources */ = {isa = PBXBuildFile; fileRef = C64EA698169E847800778456 /* MCAbstractMultipart.cc */; }; @@ -343,7 +338,6 @@ C6BA2B351705F4E6003F0E9E /* MCIndexSet.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C64BB22D16E5C1EE000DB34C /* MCIndexSet.h */; }; C6BA2B361705F4E6003F0E9E /* MCIMAPCapabilityOperation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C64BB22A16E5C0A3000DB34C /* MCIMAPCapabilityOperation.h */; }; C6BA2B371705F4E6003F0E9E /* MCAsyncIMAP.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C64EA7F916A15A9200778456 /* MCAsyncIMAP.h */; }; - C6BA2B381705F4E6003F0E9E /* MCHTMLRenderer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C63CD67C16BDCDD400DB18F1 /* MCHTMLRenderer.h */; }; C6BA2B391705F4E6003F0E9E /* MCSizeFormatter.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C63CD67E16BDCDD400DB18F1 /* MCSizeFormatter.h */; }; C6BA2B3A1705F4E6003F0E9E /* MCOAddress.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C64BB24016EDAAF3000DB34C /* MCOAddress.h */; }; C6BA2B3B1705F4E6003F0E9E /* MCOAbstractMessage.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C64BB23316EDAA17000DB34C /* MCOAbstractMessage.h */; }; @@ -620,6 +614,18 @@ C6D6F96B1720F92D006F5B28 /* MCICUTypes.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6D6F9691720F8F4006F5B28 /* MCICUTypes.h */; }; C6D6F97017211173006F5B28 /* MCIterator.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6D6F96D1721028D006F5B28 /* MCIterator.h */; }; C6D6F97117211177006F5B28 /* MCIterator.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6D6F96D1721028D006F5B28 /* MCIterator.h */; }; + C6E665001790963E0063F2CF /* MCIMAPMessageRenderingOperation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DA0F1C7A177C07B300F0D3B4 /* MCIMAPMessageRenderingOperation.h */; }; + C6E6652F1791B2530063F2CF /* MCIMAPMessageRenderingOperation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DA0F1C7A177C07B300F0D3B4 /* MCIMAPMessageRenderingOperation.h */; }; + C6E665B51796500B0063F2CF /* MCZip.cc in Sources */ = {isa = PBXBuildFile; fileRef = C6E665AA1796500B0063F2CF /* MCZip.cc */; }; + C6E665B61796500B0063F2CF /* MCZip.cc in Sources */ = {isa = PBXBuildFile; fileRef = C6E665AA1796500B0063F2CF /* MCZip.cc */; }; + C6E665B71796500B0063F2CF /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E665AD1796500B0063F2CF /* ioapi.c */; }; + C6E665B81796500B0063F2CF /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E665AD1796500B0063F2CF /* ioapi.c */; }; + C6E665B91796500C0063F2CF /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E665AF1796500B0063F2CF /* mztools.c */; }; + C6E665BA1796500C0063F2CF /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E665AF1796500B0063F2CF /* mztools.c */; }; + C6E665BB1796500C0063F2CF /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E665B11796500B0063F2CF /* unzip.c */; }; + C6E665BC1796500C0063F2CF /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E665B11796500B0063F2CF /* unzip.c */; }; + C6E665BD1796500C0063F2CF /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E665B31796500B0063F2CF /* zip.c */; }; + C6E665BE1796500C0063F2CF /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E665B31796500B0063F2CF /* zip.c */; }; C6EB30DE16B5B8050091F4F1 /* MCObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6EB30DC16B5B7770091F4F1 /* MCObjC.h */; }; C6EB30F716B8C9480091F4F1 /* NSDictionary+MCO.mm in Sources */ = {isa = PBXBuildFile; fileRef = C6EB30F616B8C9480091F4F1 /* NSDictionary+MCO.mm */; }; C6EB30F816B8DED30091F4F1 /* NSDictionary+MCO.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6EB30F516B8C9480091F4F1 /* NSDictionary+MCO.h */; }; @@ -675,6 +681,16 @@ C6F61FB21702886B0073032E /* MCORFC822.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C64BB26B16FD4C3B000DB34C /* MCORFC822.h */; }; C6F61FB51702AB340073032E /* MCOIMAPBaseOperation.mm in Sources */ = {isa = PBXBuildFile; fileRef = C6F61FB41702AB2F0073032E /* MCOIMAPBaseOperation.mm */; }; C6F61FB61702B5290073032E /* MCOIMAPBaseOperation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6F61FB31702AB2A0073032E /* MCOIMAPBaseOperation.h */; }; + DA0F1C7B177C07B300F0D3B4 /* MCIMAPMessageRenderingOperation.cc in Sources */ = {isa = PBXBuildFile; fileRef = DA0F1C79177C07B300F0D3B4 /* MCIMAPMessageRenderingOperation.cc */; }; + DA0F1C7C177C07B300F0D3B4 /* MCIMAPMessageRenderingOperation.cc in Sources */ = {isa = PBXBuildFile; fileRef = DA0F1C79177C07B300F0D3B4 /* MCIMAPMessageRenderingOperation.cc */; }; + DA89896D178A47D200F6D90A /* MCOIMAPMessageRenderingOperation.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA89896C178A47D200F6D90A /* MCOIMAPMessageRenderingOperation.mm */; }; + DA89896E178A47D200F6D90A /* MCOIMAPMessageRenderingOperation.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA89896C178A47D200F6D90A /* MCOIMAPMessageRenderingOperation.mm */; }; + DAACAD5117886807000B4517 /* MCHTMLRendererIMAPDataCallback.cc in Sources */ = {isa = PBXBuildFile; fileRef = DAACAD4F17886807000B4517 /* MCHTMLRendererIMAPDataCallback.cc */; }; + DAACAD5217886807000B4517 /* MCHTMLRendererIMAPDataCallback.cc in Sources */ = {isa = PBXBuildFile; fileRef = DAACAD4F17886807000B4517 /* MCHTMLRendererIMAPDataCallback.cc */; }; + DAD28C8B1783CFFC00F2BB8F /* MCHTMLBodyRendererTemplateCallback.cc in Sources */ = {isa = PBXBuildFile; fileRef = DAD28C891783CFFC00F2BB8F /* MCHTMLBodyRendererTemplateCallback.cc */; }; + DAD28C8C1783CFFC00F2BB8F /* MCHTMLBodyRendererTemplateCallback.cc in Sources */ = {isa = PBXBuildFile; fileRef = DAD28C891783CFFC00F2BB8F /* MCHTMLBodyRendererTemplateCallback.cc */; }; + DAE42E89178F7E1800E0DB8F /* MCOIMAPMessageRenderingOperation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DA89896B178A47D200F6D90A /* MCOIMAPMessageRenderingOperation.h */; }; + DAE42E8A178F7E2200E0DB8F /* MCOIMAPMessageRenderingOperation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DA89896B178A47D200F6D90A /* MCOIMAPMessageRenderingOperation.h */; }; F87F190C16BB62B00012652F /* MCOIMAPFetchFoldersOperation.mm in Sources */ = {isa = PBXBuildFile; fileRef = F87F190B16BB62B00012652F /* MCOIMAPFetchFoldersOperation.mm */; }; F8EA941716BB1C9D0011AC6F /* MCOIMAPSession.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F8EA941416BAED6E0011AC6F /* MCOIMAPSession.h */; }; /* End PBXBuildFile section */ @@ -710,6 +726,8 @@ dstPath = include/MailCore; dstSubfolderSpec = 16; files = ( + C6E665001790963E0063F2CF /* MCIMAPMessageRenderingOperation.h in CopyFiles */, + DAE42E89178F7E1800E0DB8F /* MCOIMAPMessageRenderingOperation.h in CopyFiles */, 9E774D8C1767CD490065EB9B /* MCIMAPFolderStatus.h in CopyFiles */, 9EF9AB24175F409D0027FA3B /* MCIMAPFolderStatusOperation.h in CopyFiles */, 9EF9AB22175F406D0027FA3B /* MCOIMAPFolderStatus.h in CopyFiles */, @@ -783,7 +801,6 @@ C64BB22F16E885C3000DB34C /* MCIndexSet.h in CopyFiles */, C64BB23016E8876F000DB34C /* MCIMAPCapabilityOperation.h in CopyFiles */, C62C6EE016A696AB00737497 /* MCAsyncIMAP.h in CopyFiles */, - C63CD68B16BE1BC600DB18F1 /* MCHTMLRenderer.h in CopyFiles */, C63CD68A16BE1BC400DB18F1 /* MCSizeFormatter.h in CopyFiles */, C64BB24C16EEFCC2000DB34C /* MCOAddress.h in CopyFiles */, C64BB25616FD333C000DB34C /* MCOAbstractMessage.h in CopyFiles */, @@ -898,6 +915,8 @@ dstPath = include/MailCore; dstSubfolderSpec = 16; files = ( + DAE42E8A178F7E2200E0DB8F /* MCOIMAPMessageRenderingOperation.h in CopyFiles */, + C6E6652F1791B2530063F2CF /* MCIMAPMessageRenderingOperation.h in CopyFiles */, 9E774D8B1767CD3C0065EB9B /* MCIMAPFolderStatus.h in CopyFiles */, 9EF9AB25175F40C70027FA3B /* MCIMAPFolderStatusOperation.h in CopyFiles */, 9EF9AB20175F3FD10027FA3B /* MCOIMAPFolderStatus.h in CopyFiles */, @@ -971,7 +990,6 @@ C6BA2B351705F4E6003F0E9E /* MCIndexSet.h in CopyFiles */, C6BA2B361705F4E6003F0E9E /* MCIMAPCapabilityOperation.h in CopyFiles */, C6BA2B371705F4E6003F0E9E /* MCAsyncIMAP.h in CopyFiles */, - C6BA2B381705F4E6003F0E9E /* MCHTMLRenderer.h in CopyFiles */, C6BA2B391705F4E6003F0E9E /* MCSizeFormatter.h in CopyFiles */, C6BA2B3A1705F4E6003F0E9E /* MCOAddress.h in CopyFiles */, C6BA2B3B1705F4E6003F0E9E /* MCOAbstractMessage.h in CopyFiles */, @@ -1083,7 +1101,7 @@ 9EF9AB10175F319A0027FA3B /* MCIMAPFolderStatusOperation.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MCIMAPFolderStatusOperation.cc; sourceTree = "<group>"; }; 9EF9AB16175F35C60027FA3B /* MCOIMAPFolderStatusOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCOIMAPFolderStatusOperation.h; sourceTree = "<group>"; }; 9EF9AB18175F36600027FA3B /* MCOIMAPFolderStatusOperation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MCOIMAPFolderStatusOperation.mm; sourceTree = "<group>"; }; - BD637139177DFF080094121B /* MCLibetpan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MCLibetpan.cpp; sourceTree = "<group>"; }; + BD637139177DFF080094121B /* MCLibetpan.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MCLibetpan.cc; sourceTree = "<group>"; }; BD63713A177DFF080094121B /* MCLibetpan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCLibetpan.h; sourceTree = "<group>"; }; C07AD057D3C8FBDC7AC95733 /* MCOIMAPSession.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MCOIMAPSession.mm; sourceTree = "<group>"; }; C07AD44B013BB42A240B4F04 /* NSError+MCO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSError+MCO.h"; sourceTree = "<group>"; }; @@ -1177,8 +1195,6 @@ C64BB26B16FD4C3B000DB34C /* MCORFC822.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCORFC822.h; sourceTree = "<group>"; }; C64BB26C16FD62FB000DB34C /* MCOUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCOUtils.h; sourceTree = "<group>"; }; C64BB26D16FD63F6000DB34C /* MCOConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCOConstants.h; sourceTree = "<group>"; }; - C64DBFFB1787CA050012CA0B /* HTMLBodyRendererTemplateCallback.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLBodyRendererTemplateCallback.cc; sourceTree = "<group>"; }; - C64DBFFC1787CA050012CA0B /* HTMLBodyRendererTemplateCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLBodyRendererTemplateCallback.h; sourceTree = "<group>"; }; C64EA537169E772200778456 /* libMailCore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMailCore.a; sourceTree = BUILT_PRODUCTS_DIR; }; C64EA68C169E847800778456 /* MCIMAPAsyncConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCIMAPAsyncConnection.h; sourceTree = "<group>"; }; C64EA68F169E847800778456 /* MCSMTPAsyncSession.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MCSMTPAsyncSession.cc; sourceTree = "<group>"; }; @@ -1403,6 +1419,16 @@ C6D6F966171FCF9F006F5B28 /* MCJSONParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCJSONParser.h; sourceTree = "<group>"; }; C6D6F9691720F8F4006F5B28 /* MCICUTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCICUTypes.h; sourceTree = "<group>"; }; C6D6F96D1721028D006F5B28 /* MCIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCIterator.h; sourceTree = "<group>"; }; + C6E665AA1796500B0063F2CF /* MCZip.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MCZip.cc; sourceTree = "<group>"; }; + C6E665AB1796500B0063F2CF /* MCZip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCZip.h; sourceTree = "<group>"; }; + C6E665AD1796500B0063F2CF /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ioapi.c; sourceTree = "<group>"; }; + C6E665AE1796500B0063F2CF /* ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ioapi.h; sourceTree = "<group>"; }; + C6E665AF1796500B0063F2CF /* mztools.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mztools.c; sourceTree = "<group>"; }; + C6E665B01796500B0063F2CF /* mztools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mztools.h; sourceTree = "<group>"; }; + C6E665B11796500B0063F2CF /* unzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unzip.c; sourceTree = "<group>"; }; + C6E665B21796500B0063F2CF /* unzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unzip.h; sourceTree = "<group>"; }; + C6E665B31796500B0063F2CF /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zip.c; sourceTree = "<group>"; }; + C6E665B41796500B0063F2CF /* zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zip.h; sourceTree = "<group>"; }; C6EB30DC16B5B7770091F4F1 /* MCObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCObjC.h; sourceTree = "<group>"; }; C6EB30F516B8C9480091F4F1 /* NSDictionary+MCO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+MCO.h"; sourceTree = "<group>"; }; C6EB30F616B8C9480091F4F1 /* NSDictionary+MCO.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSDictionary+MCO.mm"; sourceTree = "<group>"; }; @@ -1453,6 +1479,14 @@ C6F61F9E17016EA00073032E /* MCOIMAPFolderInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCOIMAPFolderInfo.m; sourceTree = "<group>"; }; C6F61FB31702AB2A0073032E /* MCOIMAPBaseOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCOIMAPBaseOperation.h; sourceTree = "<group>"; }; C6F61FB41702AB2F0073032E /* MCOIMAPBaseOperation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MCOIMAPBaseOperation.mm; sourceTree = "<group>"; }; + DA0F1C79177C07B300F0D3B4 /* MCIMAPMessageRenderingOperation.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MCIMAPMessageRenderingOperation.cc; sourceTree = "<group>"; }; + DA0F1C7A177C07B300F0D3B4 /* MCIMAPMessageRenderingOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCIMAPMessageRenderingOperation.h; sourceTree = "<group>"; }; + DA89896B178A47D200F6D90A /* MCOIMAPMessageRenderingOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCOIMAPMessageRenderingOperation.h; sourceTree = "<group>"; }; + DA89896C178A47D200F6D90A /* MCOIMAPMessageRenderingOperation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MCOIMAPMessageRenderingOperation.mm; sourceTree = "<group>"; }; + DAACAD4F17886807000B4517 /* MCHTMLRendererIMAPDataCallback.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MCHTMLRendererIMAPDataCallback.cc; sourceTree = "<group>"; }; + DAACAD5017886807000B4517 /* MCHTMLRendererIMAPDataCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCHTMLRendererIMAPDataCallback.h; sourceTree = "<group>"; }; + DAD28C891783CFFC00F2BB8F /* MCHTMLBodyRendererTemplateCallback.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MCHTMLBodyRendererTemplateCallback.cc; sourceTree = "<group>"; }; + DAD28C8A1783CFFC00F2BB8F /* MCHTMLBodyRendererTemplateCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCHTMLBodyRendererTemplateCallback.h; sourceTree = "<group>"; }; F87F190816BB62690012652F /* MCOIMAPFetchFoldersOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCOIMAPFetchFoldersOperation.h; sourceTree = "<group>"; }; F87F190B16BB62B00012652F /* MCOIMAPFetchFoldersOperation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MCOIMAPFetchFoldersOperation.mm; sourceTree = "<group>"; }; F8EA941416BAED6E0011AC6F /* MCOIMAPSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCOIMAPSession.h; sourceTree = "<group>"; }; @@ -1538,8 +1572,6 @@ C63CD67616BDCDD300DB18F1 /* renderer */ = { isa = PBXGroup; children = ( - C64DBFFB1787CA050012CA0B /* HTMLBodyRendererTemplateCallback.cc */, - C64DBFFC1787CA050012CA0B /* HTMLBodyRendererTemplateCallback.h */, C63CD67716BDCDD400DB18F1 /* MCAddressDisplay.cc */, C63CD67816BDCDD400DB18F1 /* MCAddressDisplay.h */, C63CD67916BDCDD400DB18F1 /* MCDateFormatter.cc */, @@ -1551,6 +1583,10 @@ C63CD68416BE148B00DB18F1 /* MCHTMLRendererCallback.cc */, C63CD68516BE148B00DB18F1 /* MCHTMLRendererCallback.h */, C63CD68716BE1AB600DB18F1 /* MCRenderer.h */, + DAD28C891783CFFC00F2BB8F /* MCHTMLBodyRendererTemplateCallback.cc */, + DAD28C8A1783CFFC00F2BB8F /* MCHTMLBodyRendererTemplateCallback.h */, + DAACAD4F17886807000B4517 /* MCHTMLRendererIMAPDataCallback.cc */, + DAACAD5017886807000B4517 /* MCHTMLRendererIMAPDataCallback.h */, ); path = renderer; sourceTree = "<group>"; @@ -1702,6 +1738,8 @@ 9EF9AB0E175F30C20027FA3B /* MCIMAPFolderStatusOperation.h */, C6081679177635D2001F1018 /* MCIMAPDisconnectOperation.cc */, C608167A177635D2001F1018 /* MCIMAPDisconnectOperation.h */, + DA0F1C79177C07B300F0D3B4 /* MCIMAPMessageRenderingOperation.cc */, + DA0F1C7A177C07B300F0D3B4 /* MCIMAPMessageRenderingOperation.h */, ); path = imap; sourceTree = "<group>"; @@ -1751,6 +1789,7 @@ C64EA691169E847800778456 /* core */ = { isa = PBXGroup; children = ( + C6E665A91796500B0063F2CF /* zip */, C64EA692169E847800778456 /* abstract */, C64EA6A1169E847800778456 /* basetypes */, C64EA6C3169E847800778456 /* imap */, @@ -1843,7 +1882,7 @@ C68B2AEB1778A589005E61EF /* MCConnectionLogger.h */, C68B2AF517797389005E61EF /* MCConnectionLoggerUtils.cc */, C68B2AF617797389005E61EF /* MCConnectionLoggerUtils.h */, - BD637139177DFF080094121B /* MCLibetpan.cpp */, + BD637139177DFF080094121B /* MCLibetpan.cc */, BD63713A177DFF080094121B /* MCLibetpan.h */, ); path = basetypes; @@ -2027,6 +2066,31 @@ path = utils; sourceTree = "<group>"; }; + C6E665A91796500B0063F2CF /* zip */ = { + isa = PBXGroup; + children = ( + C6E665AA1796500B0063F2CF /* MCZip.cc */, + C6E665AB1796500B0063F2CF /* MCZip.h */, + C6E665AC1796500B0063F2CF /* MiniZip */, + ); + path = zip; + sourceTree = "<group>"; + }; + C6E665AC1796500B0063F2CF /* MiniZip */ = { + isa = PBXGroup; + children = ( + C6E665AD1796500B0063F2CF /* ioapi.c */, + C6E665AE1796500B0063F2CF /* ioapi.h */, + C6E665AF1796500B0063F2CF /* mztools.c */, + C6E665B01796500B0063F2CF /* mztools.h */, + C6E665B11796500B0063F2CF /* unzip.c */, + C6E665B21796500B0063F2CF /* unzip.h */, + C6E665B31796500B0063F2CF /* zip.c */, + C6E665B41796500B0063F2CF /* zip.h */, + ); + path = MiniZip; + sourceTree = "<group>"; + }; C6F61F771701420A0073032E /* pop */ = { isa = PBXGroup; children = ( @@ -2118,22 +2182,14 @@ 9EF9AB07175F2EC60027FA3B /* MCOIMAPFolderStatus.mm */, 9EF9AB16175F35C60027FA3B /* MCOIMAPFolderStatusOperation.h */, 9EF9AB18175F36600027FA3B /* MCOIMAPFolderStatusOperation.mm */, + DA89896B178A47D200F6D90A /* MCOIMAPMessageRenderingOperation.h */, + DA89896C178A47D200F6D90A /* MCOIMAPMessageRenderingOperation.mm */, ); path = imap; sourceTree = "<group>"; }; /* End PBXGroup section */ -/* Begin PBXHeadersBuildPhase section */ - C6BD288A170BD71100A91AC1 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - /* Begin PBXNativeTarget section */ C64EA536169E772200778456 /* static mailcore2 osx */ = { isa = PBXNativeTarget; @@ -2216,7 +2272,6 @@ C6BD2888170BD71100A91AC1 /* Sources */, C6BD28A6170BD87600A91AC1 /* ShellScript */, C6BD2889170BD71100A91AC1 /* Frameworks */, - C6BD288A170BD71100A91AC1 /* Headers */, C6BD288B170BD71100A91AC1 /* Resources */, ); buildRules = ( @@ -2330,7 +2385,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cp -R \"$BUILT_PRODUCTS_DIR/include/mailcore/\" \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\n"; + shellScript = "rsync -a \"$BUILT_PRODUCTS_DIR/include/MailCore/\" \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\ncd \"$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME\"\nrm -f Headers\nln -sf \"Versions/Current/Headers\" Headers\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -2343,11 +2398,11 @@ C64EA6F6169E847800778456 /* MCAbstractMessagePart.cc in Sources */, C64EA6F8169E847800778456 /* MCAbstractMultipart.cc in Sources */, C64EA6FA169E847800778456 /* MCAbstractPart.cc in Sources */, - C64DBFFD1787CA050012CA0B /* HTMLBodyRendererTemplateCallback.cc in Sources */, C64EA6FC169E847800778456 /* MCAddress.cc in Sources */, C64EA6FF169E847800778456 /* MCMessageHeader.cc in Sources */, C64EA701169E847800778456 /* MCAutoreleasePool.cc in Sources */, C64EA704169E847800778456 /* MCArray.cc in Sources */, + C6E665B51796500B0063F2CF /* MCZip.cc in Sources */, C64EA706169E847800778456 /* MCAssert.c in Sources */, C64EA708169E847800778456 /* MCData.cc in Sources */, C64EA70A169E847800778456 /* MCHash.cc in Sources */, @@ -2398,7 +2453,9 @@ C64EA82016A29E4100778456 /* MCIMAPStoreFlagsOperation.cc in Sources */, C64EA82316A29E5300778456 /* MCIMAPStoreLabelsOperation.cc in Sources */, C64EA82616A29EE500778456 /* MCIMAPSearchOperation.cc in Sources */, + C6E665BD1796500C0063F2CF /* zip.c in Sources */, C64EA82916A29F2200778456 /* MCIMAPIdleOperation.cc in Sources */, + C6E665B91796500C0063F2CF /* mztools.c in Sources */, C64EA82C16A2A08B00778456 /* MCIMAPFetchNamespaceOperation.cc in Sources */, C62C6ED416A2A0E600737497 /* MCIMAPIdentityOperation.cc in Sources */, C62C6ED816A398FA00737497 /* MCIMAPFolderInfoOperation.cc in Sources */, @@ -2413,6 +2470,7 @@ C6D42C1D16AE03D6002BB4F9 /* NSData+MCO.mm in Sources */, C6D42C1E16AE03D6002BB4F9 /* NSString+MCO.mm in Sources */, C64FF39116B3C13000F8C162 /* MCOObjectWrapper.mm in Sources */, + C6E665B71796500B0063F2CF /* ioapi.c in Sources */, C07ADC28B83E7959BF114D46 /* MCOIMAPSession.mm in Sources */, C07AD99B2E2054C684DB8FF6 /* NSError+MCO.mm in Sources */, F87F190C16BB62B00012652F /* MCOIMAPFetchFoldersOperation.mm in Sources */, @@ -2455,6 +2513,7 @@ C6F61F7B170169EE0073032E /* MCOIMAPFolderInfoOperation.mm in Sources */, C6F61F7E170169FB0073032E /* MCOIMAPAppendMessageOperation.mm in Sources */, C6F61F8117016A0D0073032E /* MCOIMAPCopyMessagesOperation.mm in Sources */, + DA0F1C7B177C07B300F0D3B4 /* MCIMAPMessageRenderingOperation.cc in Sources */, C6F61F8417016A200073032E /* MCOIMAPFetchMessagesOperation.mm in Sources */, C6F61F8717016AD60073032E /* MCOIMAPFetchContentOperation.mm in Sources */, C6F61F8A17016AE60073032E /* MCOIMAPSearchOperation.mm in Sources */, @@ -2462,6 +2521,7 @@ C6F61F9017016B0A0073032E /* MCOIMAPFetchNamespaceOperation.mm in Sources */, C6F61F9317016B250073032E /* MCOIMAPIdentityOperation.mm in Sources */, C6F61F9617016B310073032E /* MCOIMAPCapabilityOperation.mm in Sources */, + C6E665BB1796500C0063F2CF /* unzip.c in Sources */, C6F61F9917016B460073032E /* MCOIMAPSearchExpression.mm in Sources */, C6F61F9F17016EA10073032E /* MCOIMAPFolderInfo.m in Sources */, C6F61FB51702AB340073032E /* MCOIMAPBaseOperation.mm in Sources */, @@ -2493,7 +2553,10 @@ 9EF9AB11175F319A0027FA3B /* MCIMAPFolderStatusOperation.cc in Sources */, 9EF9AB19175F36600027FA3B /* MCOIMAPFolderStatusOperation.mm in Sources */, 9E774D891767C7F60065EB9B /* MCIMAPFolderStatus.cc in Sources */, - BD63713B177DFF080094121B /* MCLibetpan.cpp in Sources */, + DAD28C8B1783CFFC00F2BB8F /* MCHTMLBodyRendererTemplateCallback.cc in Sources */, + BD63713B177DFF080094121B /* MCLibetpan.cc in Sources */, + DAACAD5117886807000B4517 /* MCHTMLRendererIMAPDataCallback.cc in Sources */, + DA89896D178A47D200F6D90A /* MCOIMAPMessageRenderingOperation.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2503,8 +2566,6 @@ files = ( C64EA7AB16A00AF600778456 /* main.mm in Sources */, C6A81BAF170684D300882C15 /* test-all.mm in Sources */, - 9EF9AB0B175F2EC60027FA3B /* MCOIMAPFolderStatus.mm in Sources */, - 9EF9AB1B175F36600027FA3B /* MCOIMAPFolderStatusOperation.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2526,11 +2587,11 @@ C6BA2B9A1705F4E6003F0E9E /* MCAbstractMessagePart.cc in Sources */, C6BA2B9B1705F4E6003F0E9E /* MCAbstractMultipart.cc in Sources */, C6BA2B9C1705F4E6003F0E9E /* MCAbstractPart.cc in Sources */, - C64DBFFE1787CA050012CA0B /* HTMLBodyRendererTemplateCallback.cc in Sources */, C6BA2B9D1705F4E6003F0E9E /* MCAddress.cc in Sources */, C6BA2B9E1705F4E6003F0E9E /* MCMessageHeader.cc in Sources */, C6BA2B9F1705F4E6003F0E9E /* MCAutoreleasePool.cc in Sources */, C6BA2BA01705F4E6003F0E9E /* MCArray.cc in Sources */, + C6E665B61796500B0063F2CF /* MCZip.cc in Sources */, C6BA2BA11705F4E6003F0E9E /* MCAssert.c in Sources */, C6BA2BA21705F4E6003F0E9E /* MCData.cc in Sources */, C6BA2BA31705F4E6003F0E9E /* MCHash.cc in Sources */, @@ -2581,7 +2642,9 @@ C6BA2BCF1705F4E6003F0E9E /* MCIMAPStoreFlagsOperation.cc in Sources */, C6BA2BD01705F4E6003F0E9E /* MCIMAPStoreLabelsOperation.cc in Sources */, C6BA2BD11705F4E6003F0E9E /* MCIMAPSearchOperation.cc in Sources */, + C6E665BE1796500C0063F2CF /* zip.c in Sources */, C6BA2BD21705F4E6003F0E9E /* MCIMAPIdleOperation.cc in Sources */, + C6E665BA1796500C0063F2CF /* mztools.c in Sources */, C6BA2BD31705F4E6003F0E9E /* MCIMAPFetchNamespaceOperation.cc in Sources */, C6BA2BD41705F4E6003F0E9E /* MCIMAPIdentityOperation.cc in Sources */, C6BA2BD51705F4E6003F0E9E /* MCIMAPFolderInfoOperation.cc in Sources */, @@ -2596,6 +2659,7 @@ C6BA2BDE1705F4E6003F0E9E /* NSData+MCO.mm in Sources */, C6BA2BDF1705F4E6003F0E9E /* NSString+MCO.mm in Sources */, C6BA2BE01705F4E6003F0E9E /* MCOObjectWrapper.mm in Sources */, + C6E665B81796500B0063F2CF /* ioapi.c in Sources */, C6BA2BE11705F4E6003F0E9E /* MCOIMAPSession.mm in Sources */, C6BA2BE21705F4E6003F0E9E /* NSError+MCO.mm in Sources */, C6BA2BE31705F4E6003F0E9E /* MCOIMAPFetchFoldersOperation.mm in Sources */, @@ -2638,6 +2702,7 @@ C6BA2C081705F4E6003F0E9E /* MCOIMAPFolderInfoOperation.mm in Sources */, C6BA2C091705F4E6003F0E9E /* MCOIMAPAppendMessageOperation.mm in Sources */, C6BA2C0A1705F4E6003F0E9E /* MCOIMAPCopyMessagesOperation.mm in Sources */, + DA0F1C7C177C07B300F0D3B4 /* MCIMAPMessageRenderingOperation.cc in Sources */, C6BA2C0B1705F4E6003F0E9E /* MCOIMAPFetchMessagesOperation.mm in Sources */, C6BA2C0C1705F4E6003F0E9E /* MCOIMAPFetchContentOperation.mm in Sources */, C6BA2C0D1705F4E6003F0E9E /* MCOIMAPSearchOperation.mm in Sources */, @@ -2645,6 +2710,7 @@ C6BA2C0F1705F4E6003F0E9E /* MCOIMAPFetchNamespaceOperation.mm in Sources */, C6BA2C101705F4E6003F0E9E /* MCOIMAPIdentityOperation.mm in Sources */, C6BA2C111705F4E6003F0E9E /* MCOIMAPCapabilityOperation.mm in Sources */, + C6E665BC1796500C0063F2CF /* unzip.c in Sources */, C6BA2C121705F4E6003F0E9E /* MCOIMAPSearchExpression.mm in Sources */, C6BA2C131705F4E6003F0E9E /* MCOIMAPFolderInfo.m in Sources */, C6BA2C141705F4E6003F0E9E /* MCOIMAPBaseOperation.mm in Sources */, @@ -2676,7 +2742,10 @@ 9EF9AB12175F319A0027FA3B /* MCIMAPFolderStatusOperation.cc in Sources */, 9EF9AB1A175F36600027FA3B /* MCOIMAPFolderStatusOperation.mm in Sources */, 9E774D8A1767C7F60065EB9B /* MCIMAPFolderStatus.cc in Sources */, - BD63713C177DFF080094121B /* MCLibetpan.cpp in Sources */, + DAD28C8C1783CFFC00F2BB8F /* MCHTMLBodyRendererTemplateCallback.cc in Sources */, + BD63713C177DFF080094121B /* MCLibetpan.cc in Sources */, + DAACAD5217886807000B4517 /* MCHTMLRendererIMAPDataCallback.cc in Sources */, + DA89896E178A47D200F6D90A /* MCOIMAPMessageRenderingOperation.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2819,6 +2888,7 @@ CLANG_CXX_LIBRARY = "libc++"; COMBINE_HIDPI_IMAGES = YES; EXECUTABLE_PREFIX = lib; + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; PRODUCT_NAME = MailCore; }; name = Debug; @@ -2830,6 +2900,7 @@ CLANG_CXX_LIBRARY = "libc++"; COMBINE_HIDPI_IMAGES = YES; EXECUTABLE_PREFIX = lib; + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; PRODUCT_NAME = MailCore; }; name = Release; @@ -2874,6 +2945,7 @@ "-liconv", "-all_load", "-ltidy", + "-lz", ); PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -2909,6 +2981,7 @@ "-liconv", "-all_load", "-ltidy", + "-lz", ); PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -2975,6 +3048,7 @@ "-liconv", "-all_load", "-ltidy", + "-lz", ); PRODUCT_NAME = MailCore; WRAPPER_EXTENSION = framework; @@ -3005,6 +3079,7 @@ "-liconv", "-all_load", "-ltidy", + "-lz", ); PRODUCT_NAME = MailCore; WRAPPER_EXTENSION = framework; diff --git a/example/common/gtm-oauth2/Source/Mac/GTMOAuth2Window.xib b/example/common/gtm-oauth2/Source/Mac/GTMOAuth2Window.xib index befc2123..2d707a2c 100644 --- a/example/common/gtm-oauth2/Source/Mac/GTMOAuth2Window.xib +++ b/example/common/gtm-oauth2/Source/Mac/GTMOAuth2Window.xib @@ -1,109 +1,560 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4457.6" systemVersion="12E55" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> - <dependencies> - <deployment version="1050" defaultVersion="1080" identifier="macosx"/> - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4457.6"/> - <plugIn identifier="com.apple.WebKitIBPlugin" version="3330"/> - </dependencies> - <objects> - <customObject id="-2" userLabel="File's Owner" customClass="GTMOAuth2WindowController"> - <connections> - <action selector="closeWindow:" destination="17" id="42"/> - <outlet property="keychainCheckbox" destination="43" id="46"/> - <outlet property="webBackButton" destination="19" id="47"/> - <outlet property="webCloseButton" destination="17" id="48"/> - <outlet property="webView" destination="5" id="49"/> - <outlet property="window" destination="3" id="8"/> - </connections> - </customObject> - <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> - <customObject id="-3" userLabel="Application"/> - <window title="Sign In" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" wantsToBeColor="NO" visibleAtLaunch="NO" animationBehavior="default" id="3"> - <windowStyleMask key="styleMask" titled="YES" closable="YES" resizable="YES"/> - <windowPositionMask key="initialPositionMask" leftStrut="YES" bottomStrut="YES"/> - <rect key="contentRect" x="74" y="707" width="515" height="419"/> - <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1178"/> - <value key="minSize" type="size" width="475" height="290"/> - <view key="contentView" id="4"> - <rect key="frame" x="0.0" y="0.0" width="515" height="419"/> - <autoresizingMask key="autoresizingMask"/> - <subviews> - <webView id="5"> - <rect key="frame" x="0.0" y="20" width="515" height="399"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <webPreferences key="preferences" defaultFontSize="12" defaultFixedFontSize="12"/> - <connections> - <action selector="goBack:" destination="19" id="28"/> - <action selector="goForward:" destination="26" id="29"/> - </connections> - </webView> - <button id="17"> - <rect key="frame" x="479" y="0.0" width="16" height="19"/> - <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/> - <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="NSStopProgressTemplate" imagePosition="overlaps" alignment="center" imageScaling="proportionallyDown" inset="2" id="18"> - <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="system"/> - <string key="keyEquivalent" base64-UTF8="YES"> -Gw -</string> - </buttonCell> - </button> - <button id="19"> - <rect key="frame" x="437" y="0.0" width="16" height="19"/> - <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/> - <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="NSGoLeftTemplate" imagePosition="overlaps" alignment="center" imageScaling="proportionallyDown" inset="2" id="20"> - <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="system"/> - </buttonCell> - <connections> - <binding destination="-2" name="enabled" keyPath="webView.canGoBack" id="31"/> - </connections> - </button> - <button id="26"> - <rect key="frame" x="456" y="0.0" width="16" height="19"/> - <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/> - <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="NSGoRightTemplate" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="27"> - <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="system"/> - </buttonCell> - <connections> - <binding destination="-2" name="enabled" keyPath="webView.canGoForward" id="35"/> - </connections> - </button> - <button id="43"> - <rect key="frame" x="2" y="1" width="429" height="18"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> - <buttonCell key="cell" type="check" title="Stay signed in to this account" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="44"> - <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> - </buttonCell> - </button> - </subviews> - </view> - <connections> - <outlet property="delegate" destination="-2" id="7"/> - </connections> - </window> - <userDefaultsController id="32"/> - </objects> - <resources> - <image name="NSGoLeftTemplate" width="9" height="9"/> - <image name="NSGoRightTemplate" width="9" height="9"/> - <image name="NSStopProgressTemplate" width="11" height="11"/> - </resources> - <classes> - <class className="GTMOAuth2WindowController" superclassName="NSWindowController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/GTMOAuth2WindowController.h"/> - <relationships> - <relationship kind="action" name="closeWindow:"/> - <relationship kind="outlet" name="completionPlaceholder_"/> - <relationship kind="outlet" name="delegate_"/> - <relationship kind="outlet" name="keychainCheckbox" candidateClass="NSButton"/> - <relationship kind="outlet" name="userData_"/> - <relationship kind="outlet" name="webBackButton" candidateClass="NSButton"/> - <relationship kind="outlet" name="webCloseButton" candidateClass="NSButton"/> - <relationship kind="outlet" name="webView" candidateClass="WebView"/> - </relationships> - </class> - </classes> -</document>
\ No newline at end of file +<?xml version="1.0" encoding="UTF-8"?> +<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00"> + <data> + <int key="IBDocument.SystemTarget">1050</int> + <string key="IBDocument.SystemVersion">12E55</string> + <string key="IBDocument.InterfaceBuilderVersion">4457.6</string> + <string key="IBDocument.AppKitVersion">1187.39</string> + <string key="IBDocument.HIToolboxVersion">626.00</string> + <dictionary class="NSMutableDictionary" key="IBDocument.PluginVersions"> + <string key="com.apple.InterfaceBuilder.CocoaPlugin">4457.6</string> + <string key="com.apple.WebKitIBPlugin">3330</string> + </dictionary> + <array key="IBDocument.IntegratedClassDependencies"> + <string>NSButton</string> + <string>NSButtonCell</string> + <string>NSCustomObject</string> + <string>NSUserDefaultsController</string> + <string>NSView</string> + <string>NSWindowTemplate</string> + <string>WebView</string> + </array> + <array key="IBDocument.PluginDependencies"> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.WebKitIBPlugin</string> + </array> + <object class="NSMutableDictionary" key="IBDocument.Metadata"> + <string key="NS.key.0">PluginDependencyRecalculationVersion</string> + <integer value="1" key="NS.object.0"/> + </object> + <array class="NSMutableArray" key="IBDocument.RootObjects" id="12644022"> + <object class="NSCustomObject" id="1049854938"> + <string key="NSClassName">GTMOAuth2WindowController</string> + </object> + <object class="NSCustomObject" id="1005334733"> + <string key="NSClassName">FirstResponder</string> + </object> + <object class="NSCustomObject" id="792864887"> + <string key="NSClassName">NSApplication</string> + </object> + <object class="NSWindowTemplate" id="942013494"> + <int key="NSWindowStyleMask">11</int> + <int key="NSWindowBacking">2</int> + <string key="NSWindowRect">{{74, 707}, {515, 419}}</string> + <int key="NSWTFlags">536870912</int> + <string key="NSWindowTitle">Sign In</string> + <string key="NSWindowClass">NSWindow</string> + <nil key="NSViewClass"/> + <nil key="NSUserInterfaceItemIdentifier"/> + <string key="NSWindowContentMinSize">{475, 290}</string> + <object class="NSView" key="NSWindowView" id="373651310"> + <nil key="NSNextResponder"/> + <int key="NSvFlags">1792</int> + <array class="NSMutableArray" key="NSSubviews"> + <object class="WebView" id="54705622"> + <reference key="NSNextResponder" ref="373651310"/> + <int key="NSvFlags">1810</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <set class="NSMutableSet" key="NSDragTypes"> + <string>Apple HTML pasteboard type</string> + <string>Apple PDF pasteboard type</string> + <string>Apple URL pasteboard type</string> + <string>Apple Web Archive pasteboard type</string> + <string>NSColor pasteboard type</string> + <string>NSFilenamesPboardType</string> + <string>NSStringPboardType</string> + <string>NeXT RTFD pasteboard type</string> + <string>NeXT Rich Text Format v1.0 pasteboard type</string> + <string>NeXT TIFF v4.0 pasteboard type</string> + <string>WebURLsWithTitlesPboardType</string> + <string>public.png</string> + <string>public.url</string> + <string>public.url-name</string> + </set> + <string key="NSFrame">{{0, 20}, {515, 399}}</string> + <reference key="NSSuperview" ref="373651310"/> + <reference key="NSNextKeyView"/> + <string key="FrameName"/> + <string key="GroupName"/> + <object class="WebPreferences" key="Preferences"> + <nil key="Identifier"/> + <dictionary class="NSMutableDictionary" key="Values"/> + </object> + <bool key="UseBackForwardList">YES</bool> + <bool key="AllowsUndo">YES</bool> + </object> + <object class="NSButton" id="136150853"> + <reference key="NSNextResponder" ref="373651310"/> + <int key="NSvFlags">1825</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{479, 0}, {16, 19}}</string> + <reference key="NSSuperview" ref="373651310"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="763408046"> + <int key="NSCellFlags">67108864</int> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents"/> + <object class="NSFont" key="NSSupport" id="1046087610"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">13</double> + <int key="NSfFlags">1044</int> + </object> + <reference key="NSControlView" ref="136150853"/> + <int key="NSButtonFlags">-2041823232</int> + <int key="NSButtonFlags2">134</int> + <object class="NSCustomResource" key="NSNormalImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSStopProgressTemplate</string> + </object> + <string key="NSAlternateContents"/> + <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + </object> + <object class="NSButton" id="8861366"> + <reference key="NSNextResponder" ref="373651310"/> + <int key="NSvFlags">1825</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{437, 0}, {16, 19}}</string> + <reference key="NSSuperview" ref="373651310"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="720540038"> + <int key="NSCellFlags">67108864</int> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="1046087610"/> + <reference key="NSControlView" ref="8861366"/> + <int key="NSButtonFlags">-2041823232</int> + <int key="NSButtonFlags2">134</int> + <object class="NSCustomResource" key="NSNormalImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSGoLeftTemplate</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + </object> + <object class="NSButton" id="534711010"> + <reference key="NSNextResponder" ref="373651310"/> + <int key="NSvFlags">1825</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{456, 0}, {16, 19}}</string> + <reference key="NSSuperview" ref="373651310"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="710015275"> + <int key="NSCellFlags">67108864</int> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="1046087610"/> + <reference key="NSControlView" ref="534711010"/> + <int key="NSButtonFlags">-2042347520</int> + <int key="NSButtonFlags2">134</int> + <object class="NSCustomResource" key="NSNormalImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSGoRightTemplate</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + </object> + <object class="NSButton" id="204063068"> + <reference key="NSNextResponder" ref="373651310"/> + <int key="NSvFlags">1828</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{2, 1}, {429, 18}}</string> + <reference key="NSSuperview" ref="373651310"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="60297796"> + <int key="NSCellFlags">-2080374784</int> + <int key="NSCellFlags2">131072</int> + <string key="NSContents">Stay signed in to this account</string> + <object class="NSFont" key="NSSupport"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">11</double> + <int key="NSfFlags">3100</int> + </object> + <reference key="NSControlView" ref="204063068"/> + <int key="NSButtonFlags">1211912448</int> + <int key="NSButtonFlags2">2</int> + <object class="NSCustomResource" key="NSNormalImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSSwitch</string> + </object> + <object class="NSButtonImageSource" key="NSAlternateImage"> + <string key="NSImageName">NSSwitch</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + </object> + </array> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrameSize">{515, 419}</string> + </object> + <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string> + <string key="NSMinSize">{475, 312}</string> + <string key="NSMaxSize">{10000000000000, 10000000000000}</string> + <bool key="NSWindowIsRestorable">YES</bool> + </object> + <object class="NSUserDefaultsController" id="251407901"> + <bool key="NSAppliesImmediately">YES</bool> + </object> + </array> + <object class="IBObjectContainer" key="IBDocument.Objects"> + <bool key="usesAutoincrementingIDs">NO</bool> + <array class="NSMutableArray" key="connectionRecords"> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">closeWindow:</string> + <reference key="source" ref="1049854938"/> + <reference key="destination" ref="136150853"/> + </object> + <string key="id">42</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">keychainCheckbox</string> + <reference key="source" ref="1049854938"/> + <reference key="destination" ref="204063068"/> + </object> + <string key="id">46</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">webBackButton</string> + <reference key="source" ref="1049854938"/> + <reference key="destination" ref="8861366"/> + </object> + <string key="id">47</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">webCloseButton</string> + <reference key="source" ref="1049854938"/> + <reference key="destination" ref="136150853"/> + </object> + <string key="id">48</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">webView</string> + <reference key="source" ref="1049854938"/> + <reference key="destination" ref="54705622"/> + </object> + <string key="id">49</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">window</string> + <reference key="source" ref="1049854938"/> + <reference key="destination" ref="942013494"/> + </object> + <string key="id">8</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="942013494"/> + <reference key="destination" ref="1049854938"/> + </object> + <string key="id">7</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">goBack:</string> + <reference key="source" ref="54705622"/> + <reference key="destination" ref="8861366"/> + </object> + <string key="id">28</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">goForward:</string> + <reference key="source" ref="54705622"/> + <reference key="destination" ref="534711010"/> + </object> + <string key="id">29</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">webView.canGoBack</string> + <reference key="source" ref="8861366"/> + <reference key="destination" ref="1049854938"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="8861366"/> + <reference key="NSDestination" ref="1049854938"/> + <string key="NSLabel">enabled: webView.canGoBack</string> + <string key="NSBinding">enabled</string> + <string key="NSKeyPath">webView.canGoBack</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">31</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">webView.canGoForward</string> + <reference key="source" ref="534711010"/> + <reference key="destination" ref="1049854938"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="534711010"/> + <reference key="NSDestination" ref="1049854938"/> + <string key="NSLabel">enabled: webView.canGoForward</string> + <string key="NSBinding">enabled</string> + <string key="NSKeyPath">webView.canGoForward</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">35</string> + </object> + </array> + <object class="IBMutableOrderedSet" key="objectRecords"> + <array key="orderedObjects"> + <object class="IBObjectRecord"> + <string key="id">0</string> + <array key="object" id="0"/> + <reference key="children" ref="12644022"/> + <nil key="parent"/> + </object> + <object class="IBObjectRecord"> + <string key="id">-2</string> + <reference key="object" ref="1049854938"/> + <reference key="parent" ref="0"/> + <string key="objectName">File's Owner</string> + </object> + <object class="IBObjectRecord"> + <string key="id">-1</string> + <reference key="object" ref="1005334733"/> + <reference key="parent" ref="0"/> + <string key="objectName">First Responder</string> + </object> + <object class="IBObjectRecord"> + <string key="id">-3</string> + <reference key="object" ref="792864887"/> + <reference key="parent" ref="0"/> + <string key="objectName">Application</string> + </object> + <object class="IBObjectRecord"> + <string key="id">3</string> + <reference key="object" ref="942013494"/> + <array class="NSMutableArray" key="children"> + <reference ref="373651310"/> + </array> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <string key="id">4</string> + <reference key="object" ref="373651310"/> + <array class="NSMutableArray" key="children"> + <reference ref="54705622"/> + <reference ref="136150853"/> + <reference ref="8861366"/> + <reference ref="534711010"/> + <reference ref="204063068"/> + </array> + <reference key="parent" ref="942013494"/> + </object> + <object class="IBObjectRecord"> + <string key="id">5</string> + <reference key="object" ref="54705622"/> + <reference key="parent" ref="373651310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">17</string> + <reference key="object" ref="136150853"/> + <array class="NSMutableArray" key="children"> + <reference ref="763408046"/> + </array> + <reference key="parent" ref="373651310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">18</string> + <reference key="object" ref="763408046"/> + <reference key="parent" ref="136150853"/> + </object> + <object class="IBObjectRecord"> + <string key="id">19</string> + <reference key="object" ref="8861366"/> + <array class="NSMutableArray" key="children"> + <reference ref="720540038"/> + </array> + <reference key="parent" ref="373651310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">20</string> + <reference key="object" ref="720540038"/> + <reference key="parent" ref="8861366"/> + </object> + <object class="IBObjectRecord"> + <string key="id">26</string> + <reference key="object" ref="534711010"/> + <array class="NSMutableArray" key="children"> + <reference ref="710015275"/> + </array> + <reference key="parent" ref="373651310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">27</string> + <reference key="object" ref="710015275"/> + <reference key="parent" ref="534711010"/> + </object> + <object class="IBObjectRecord"> + <string key="id">43</string> + <reference key="object" ref="204063068"/> + <array class="NSMutableArray" key="children"> + <reference ref="60297796"/> + </array> + <reference key="parent" ref="373651310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">44</string> + <reference key="object" ref="60297796"/> + <reference key="parent" ref="204063068"/> + </object> + <object class="IBObjectRecord"> + <string key="id">32</string> + <reference key="object" ref="251407901"/> + <reference key="parent" ref="0"/> + </object> + </array> + </object> + <dictionary class="NSMutableDictionary" key="flattenedProperties"> + <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="-1.showNotes"/> + <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="-2.showNotes"/> + <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="-3.showNotes"/> + <string key="17.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="17.IBUserGuides" ref="0"/> + <boolean value="NO" key="17.showNotes"/> + <string key="18.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="18.showNotes"/> + <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="19.IBUserGuides" ref="0"/> + <boolean value="NO" key="19.showNotes"/> + <string key="20.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="20.showNotes"/> + <string key="26.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="26.IBUserGuides" ref="0"/> + <boolean value="NO" key="26.showNotes"/> + <string key="27.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="27.showNotes"/> + <string key="3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="3.showNotes"/> + <string key="32.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="32.showNotes"/> + <string key="4.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="4.IBUserGuides" ref="0"/> + <boolean value="NO" key="4.showNotes"/> + <string key="43.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="43.IBUserGuides" ref="0"/> + <boolean value="NO" key="43.showNotes"/> + <string key="44.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="44.showNotes"/> + <string key="5.IBPluginDependency">com.apple.WebKitIBPlugin</string> + <reference key="5.IBUserGuides" ref="0"/> + <boolean value="NO" key="5.showNotes"/> + </dictionary> + <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/> + <nil key="activeLocalization"/> + <dictionary class="NSMutableDictionary" key="localizations"/> + <nil key="sourceID"/> + </object> + <object class="IBClassDescriber" key="IBDocument.Classes"> + <array class="NSMutableArray" key="referencedPartialClassDescriptions"> + <object class="IBPartialClassDescription"> + <string key="className">GTMOAuth2WindowController</string> + <string key="superclassName">NSWindowController</string> + <object class="NSMutableDictionary" key="actions"> + <string key="NS.key.0">closeWindow:</string> + <string key="NS.object.0">id</string> + </object> + <object class="NSMutableDictionary" key="actionInfosByName"> + <string key="NS.key.0">closeWindow:</string> + <object class="IBActionInfo" key="NS.object.0"> + <string key="name">closeWindow:</string> + <string key="candidateClassName">id</string> + </object> + </object> + <dictionary class="NSMutableDictionary" key="outlets"> + <string key="completionPlaceholder_">id</string> + <string key="delegate_">id</string> + <string key="keychainCheckbox">NSButton</string> + <string key="userData_">id</string> + <string key="webBackButton">NSButton</string> + <string key="webCloseButton">NSButton</string> + <string key="webView">WebView</string> + </dictionary> + <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> + <object class="IBToOneOutletInfo" key="completionPlaceholder_"> + <string key="name">completionPlaceholder_</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBToOneOutletInfo" key="delegate_"> + <string key="name">delegate_</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBToOneOutletInfo" key="keychainCheckbox"> + <string key="name">keychainCheckbox</string> + <string key="candidateClassName">NSButton</string> + </object> + <object class="IBToOneOutletInfo" key="userData_"> + <string key="name">userData_</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBToOneOutletInfo" key="webBackButton"> + <string key="name">webBackButton</string> + <string key="candidateClassName">NSButton</string> + </object> + <object class="IBToOneOutletInfo" key="webCloseButton"> + <string key="name">webCloseButton</string> + <string key="candidateClassName">NSButton</string> + </object> + <object class="IBToOneOutletInfo" key="webView"> + <string key="name">webView</string> + <string key="candidateClassName">WebView</string> + </object> + </dictionary> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">./Classes/GTMOAuth2WindowController.h</string> + </object> + </object> + </array> + </object> + <int key="IBDocument.localizationMode">0</int> + <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> + <real value="1050" key="NS.object.0"/> + </object> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> + <real value="1080" key="NS.object.0"/> + </object> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string> + <integer value="4600" key="NS.object.0"/> + </object> + <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> + <int key="IBDocument.defaultPropertyAccessControl">3</int> + <dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> + <string key="NSGoLeftTemplate">{9, 9}</string> + <string key="NSGoRightTemplate">{9, 9}</string> + <string key="NSStopProgressTemplate">{11, 11}</string> + <string key="NSSwitch">{15, 15}</string> + </dictionary> + </data> +</archive> diff --git a/example/common/gtm-oauth2/Source/Touch/GTMOAuth2ViewTouch.xib b/example/common/gtm-oauth2/Source/Touch/GTMOAuth2ViewTouch.xib index 4f91fa4a..d8cb21c8 100644 --- a/example/common/gtm-oauth2/Source/Touch/GTMOAuth2ViewTouch.xib +++ b/example/common/gtm-oauth2/Source/Touch/GTMOAuth2ViewTouch.xib @@ -1,17 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> -<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10"> +<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00"> <data> <int key="IBDocument.SystemTarget">1024</int> - <string key="IBDocument.SystemVersion">12C60</string> - <string key="IBDocument.InterfaceBuilderVersion">2840</string> - <string key="IBDocument.AppKitVersion">1187.34</string> - <string key="IBDocument.HIToolboxVersion">625.00</string> + <string key="IBDocument.SystemVersion">12E55</string> + <string key="IBDocument.InterfaceBuilderVersion">4457.6</string> + <string key="IBDocument.AppKitVersion">1187.39</string> + <string key="IBDocument.HIToolboxVersion">626.00</string> <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string key="NS.object.0">1926</string> + <string key="NS.object.0">3682.6</string> </object> - <object class="NSArray" key="IBDocument.IntegratedClassDependencies"> - <bool key="EncodedWithXMLCoder">YES</bool> + <array key="IBDocument.IntegratedClassDependencies"> <string>IBProxyObject</string> <string>IBUIActivityIndicatorView</string> <string>IBUIBarButtonItem</string> @@ -19,17 +18,15 @@ <string>IBUINavigationItem</string> <string>IBUIView</string> <string>IBUIWebView</string> - </object> - <object class="NSArray" key="IBDocument.PluginDependencies"> - <bool key="EncodedWithXMLCoder">YES</bool> + </array> + <array key="IBDocument.PluginDependencies"> <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - </object> + </array> <object class="NSMutableDictionary" key="IBDocument.Metadata"> <string key="NS.key.0">PluginDependencyRecalculationVersion</string> <integer value="1" key="NS.object.0"/> </object> - <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> - <bool key="EncodedWithXMLCoder">YES</bool> + <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> <object class="IBProxyObject" id="372490531"> <string key="IBProxiedObjectIdentifier">IBFilesOwner</string> <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> @@ -47,16 +44,14 @@ <int key="IBUIStyle">1</int> </object> <object class="IBUIView" id="808907889"> - <reference key="NSNextResponder"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">292</int> - <object class="NSMutableArray" key="NSSubviews"> - <bool key="EncodedWithXMLCoder">YES</bool> + <array class="NSMutableArray" key="NSSubviews"> <object class="IBUIButton" id="453250804"> <reference key="NSNextResponder" ref="808907889"/> <int key="NSvFlags">292</int> <string key="NSFrameSize">{30, 30}</string> <reference key="NSSuperview" ref="808907889"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="981703116"/> <bool key="IBUIOpaque">NO</bool> <bool key="IBUIClearsContextBeforeDrawing">NO</bool> @@ -95,8 +90,6 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{30, 0}, {30, 30}}</string> <reference key="NSSuperview" ref="808907889"/> - <reference key="NSWindow"/> - <reference key="NSNextKeyView"/> <bool key="IBUIOpaque">NO</bool> <bool key="IBUIClearsContextBeforeDrawing">NO</bool> <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> @@ -114,10 +107,8 @@ <reference key="IBUIFontDescription" ref="621440819"/> <reference key="IBUIFont" ref="530402572"/> </object> - </object> + </array> <string key="NSFrameSize">{60, 30}</string> - <reference key="NSSuperview"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="453250804"/> <object class="NSColor" key="IBUIBackgroundColor"> <int key="NSColorSpace">3</int> @@ -132,16 +123,14 @@ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> </object> <object class="IBUIView" id="426018584"> - <reference key="NSNextResponder"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">274</int> - <object class="NSMutableArray" key="NSSubviews"> - <bool key="EncodedWithXMLCoder">YES</bool> + <array class="NSMutableArray" key="NSSubviews"> <object class="IBUIWebView" id="663477729"> <reference key="NSNextResponder" ref="426018584"/> <int key="NSvFlags">274</int> <string key="NSFrameSize">{320, 460}</string> <reference key="NSSuperview" ref="426018584"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="268967673"/> <object class="NSColor" key="IBUIBackgroundColor"> <int key="NSColorSpace">1</int> @@ -158,8 +147,6 @@ <int key="NSvFlags">301</int> <string key="NSFrame">{{150, 115}, {20, 20}}</string> <reference key="NSSuperview" ref="426018584"/> - <reference key="NSWindow"/> - <reference key="NSNextKeyView"/> <string key="NSReuseIdentifierKey">_NS:9</string> <bool key="IBUIOpaque">NO</bool> <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> @@ -167,10 +154,8 @@ <bool key="IBUIAnimating">YES</bool> <int key="IBUIStyle">2</int> </object> - </object> + </array> <string key="NSFrameSize">{320, 460}</string> - <reference key="NSSuperview"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="663477729"/> <object class="NSColor" key="IBUIBackgroundColor"> <int key="NSColorSpace">3</int> @@ -181,17 +166,17 @@ </object> <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> </object> - </object> + </array> <object class="IBObjectContainer" key="IBDocument.Objects"> - <object class="NSMutableArray" key="connectionRecords"> - <bool key="EncodedWithXMLCoder">YES</bool> + <bool key="usesAutoincrementingIDs">NO</bool> + <array class="NSMutableArray" key="connectionRecords"> <object class="IBConnectionRecord"> <object class="IBCocoaTouchOutletConnection" key="connection"> <string key="label">rightBarButtonItem</string> <reference key="source" ref="372490531"/> <reference key="destination" ref="961671599"/> </object> - <int key="connectionID">20</int> + <string key="id">20</string> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchOutletConnection" key="connection"> @@ -199,7 +184,7 @@ <reference key="source" ref="372490531"/> <reference key="destination" ref="808907889"/> </object> - <int key="connectionID">22</int> + <string key="id">22</string> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchOutletConnection" key="connection"> @@ -207,7 +192,7 @@ <reference key="source" ref="372490531"/> <reference key="destination" ref="453250804"/> </object> - <int key="connectionID">25</int> + <string key="id">25</string> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchOutletConnection" key="connection"> @@ -215,7 +200,7 @@ <reference key="source" ref="372490531"/> <reference key="destination" ref="981703116"/> </object> - <int key="connectionID">26</int> + <string key="id">26</string> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchOutletConnection" key="connection"> @@ -223,7 +208,7 @@ <reference key="source" ref="372490531"/> <reference key="destination" ref="426018584"/> </object> - <int key="connectionID">28</int> + <string key="id">28</string> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchOutletConnection" key="connection"> @@ -231,7 +216,7 @@ <reference key="source" ref="372490531"/> <reference key="destination" ref="663477729"/> </object> - <int key="connectionID">29</int> + <string key="id">29</string> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchOutletConnection" key="connection"> @@ -239,7 +224,7 @@ <reference key="source" ref="372490531"/> <reference key="destination" ref="268967673"/> </object> - <int key="connectionID">33</int> + <string key="id">33</string> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchOutletConnection" key="connection"> @@ -247,7 +232,7 @@ <reference key="source" ref="663477729"/> <reference key="destination" ref="372490531"/> </object> - <int key="connectionID">9</int> + <string key="id">9</string> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchOutletConnection" key="connection"> @@ -255,7 +240,7 @@ <reference key="source" ref="1047805472"/> <reference key="destination" ref="961671599"/> </object> - <int key="connectionID">14</int> + <string key="id">14</string> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchEventConnection" key="connection"> @@ -264,7 +249,7 @@ <reference key="destination" ref="663477729"/> <int key="IBEventType">7</int> </object> - <int key="connectionID">18</int> + <string key="id">18</string> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchEventConnection" key="connection"> @@ -273,206 +258,99 @@ <reference key="destination" ref="663477729"/> <int key="IBEventType">7</int> </object> - <int key="connectionID">19</int> + <string key="id">19</string> </object> - </object> + </array> <object class="IBMutableOrderedSet" key="objectRecords"> - <object class="NSArray" key="orderedObjects"> - <bool key="EncodedWithXMLCoder">YES</bool> + <array key="orderedObjects"> <object class="IBObjectRecord"> - <int key="objectID">0</int> - <object class="NSArray" key="object" id="0"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> + <string key="id">0</string> + <array key="object" id="0"/> <reference key="children" ref="1000"/> <nil key="parent"/> </object> <object class="IBObjectRecord"> - <int key="objectID">-1</int> + <string key="id">-1</string> <reference key="object" ref="372490531"/> <reference key="parent" ref="0"/> <string key="objectName">File's Owner</string> </object> <object class="IBObjectRecord"> - <int key="objectID">-2</int> + <string key="id">-2</string> <reference key="object" ref="975951072"/> <reference key="parent" ref="0"/> </object> <object class="IBObjectRecord"> - <int key="objectID">6</int> + <string key="id">6</string> <reference key="object" ref="1047805472"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> + <array class="NSMutableArray" key="children"/> <reference key="parent" ref="0"/> </object> <object class="IBObjectRecord"> - <int key="objectID">10</int> + <string key="id">10</string> <reference key="object" ref="961671599"/> <reference key="parent" ref="0"/> </object> <object class="IBObjectRecord"> - <int key="objectID">15</int> + <string key="id">15</string> <reference key="object" ref="808907889"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> + <array class="NSMutableArray" key="children"> <reference ref="453250804"/> <reference ref="981703116"/> - </object> + </array> <reference key="parent" ref="0"/> </object> <object class="IBObjectRecord"> - <int key="objectID">16</int> + <string key="id">16</string> <reference key="object" ref="453250804"/> <reference key="parent" ref="808907889"/> </object> <object class="IBObjectRecord"> - <int key="objectID">17</int> + <string key="id">17</string> <reference key="object" ref="981703116"/> <reference key="parent" ref="808907889"/> </object> <object class="IBObjectRecord"> - <int key="objectID">27</int> + <string key="id">27</string> <reference key="object" ref="426018584"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> + <array class="NSMutableArray" key="children"> <reference ref="663477729"/> <reference ref="268967673"/> - </object> + </array> <reference key="parent" ref="0"/> </object> <object class="IBObjectRecord"> - <int key="objectID">4</int> + <string key="id">4</string> <reference key="object" ref="663477729"/> <reference key="parent" ref="426018584"/> </object> <object class="IBObjectRecord"> - <int key="objectID">31</int> + <string key="id">31</string> <reference key="object" ref="268967673"/> <reference key="parent" ref="426018584"/> </object> - </object> - </object> - <object class="NSMutableDictionary" key="flattenedProperties"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>-1.CustomClassName</string> - <string>-1.IBPluginDependency</string> - <string>-2.CustomClassName</string> - <string>-2.IBPluginDependency</string> - <string>10.IBPluginDependency</string> - <string>15.IBPluginDependency</string> - <string>16.IBPluginDependency</string> - <string>17.IBPluginDependency</string> - <string>27.IBPluginDependency</string> - <string>31.IBPluginDependency</string> - <string>4.IBPluginDependency</string> - <string>6.IBPluginDependency</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>GTMOAuth2ViewControllerTouch</string> - <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string>UIResponder</string> - <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> - </object> - </object> - <object class="NSMutableDictionary" key="unlocalizedProperties"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference key="dict.sortedKeys" ref="0"/> - <reference key="dict.values" ref="0"/> + </array> </object> + <dictionary class="NSMutableDictionary" key="flattenedProperties"> + <string key="-1.CustomClassName">GTMOAuth2ViewControllerTouch</string> + <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="-2.CustomClassName">UIResponder</string> + <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="15.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="16.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="17.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="27.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="31.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> + </dictionary> + <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/> <nil key="activeLocalization"/> - <object class="NSMutableDictionary" key="localizations"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference key="dict.sortedKeys" ref="0"/> - <reference key="dict.values" ref="0"/> - </object> + <dictionary class="NSMutableDictionary" key="localizations"/> <nil key="sourceID"/> - <int key="maxID">33</int> - </object> - <object class="IBClassDescriber" key="IBDocument.Classes"> - <object class="NSMutableArray" key="referencedPartialClassDescriptions"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBPartialClassDescription"> - <string key="className">GTMOAuth2ViewControllerTouch</string> - <string key="superclassName">UIViewController</string> - <object class="NSMutableDictionary" key="outlets"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>backButton</string> - <string>forwardButton</string> - <string>initialActivityIndicator</string> - <string>navButtonsView</string> - <string>rightBarButtonItem</string> - <string>webView</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>UIButton</string> - <string>UIButton</string> - <string>UIActivityIndicatorView</string> - <string>UIView</string> - <string>UIBarButtonItem</string> - <string>UIWebView</string> - </object> - </object> - <object class="NSMutableDictionary" key="toOneOutletInfosByName"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>backButton</string> - <string>forwardButton</string> - <string>initialActivityIndicator</string> - <string>navButtonsView</string> - <string>rightBarButtonItem</string> - <string>webView</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBToOneOutletInfo"> - <string key="name">backButton</string> - <string key="candidateClassName">UIButton</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">forwardButton</string> - <string key="candidateClassName">UIButton</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">initialActivityIndicator</string> - <string key="candidateClassName">UIActivityIndicatorView</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">navButtonsView</string> - <string key="candidateClassName">UIView</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">rightBarButtonItem</string> - <string key="candidateClassName">UIBarButtonItem</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">webView</string> - <string key="candidateClassName">UIWebView</string> - </object> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/GTMOAuth2ViewControllerTouch.h</string> - </object> - </object> - </object> </object> + <object class="IBClassDescriber" key="IBDocument.Classes"/> <int key="IBDocument.localizationMode">0</int> <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string> <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies"> @@ -481,14 +359,14 @@ </object> <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string> - <real value="1536" key="NS.object.0"/> + <real value="1552" key="NS.object.0"/> </object> <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string> - <integer value="3000" key="NS.object.0"/> + <integer value="4600" key="NS.object.0"/> </object> <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> <int key="IBDocument.defaultPropertyAccessControl">3</int> - <string key="IBCocoaTouchPluginVersion">1926</string> + <string key="IBCocoaTouchPluginVersion">3682.6</string> </data> </archive> diff --git a/example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj b/example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj index e9cd3797..eec98dc0 100644 --- a/example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj +++ b/example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj @@ -35,6 +35,7 @@ C6D71951178BB8B4008ED15F /* GTMOAuth2ViewControllerTouch.m in Sources */ = {isa = PBXBuildFile; fileRef = C6D71947178BA812008ED15F /* GTMOAuth2ViewControllerTouch.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; C6D71952178BB8B4008ED15F /* GTMOAuth2ViewTouch.xib in Resources */ = {isa = PBXBuildFile; fileRef = C6D71948178BA812008ED15F /* GTMOAuth2ViewTouch.xib */; }; C6D71954178BB91E008ED15F /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C6D71953178BB91E008ED15F /* SystemConfiguration.framework */; }; + DA9AD477179331A600743873 /* MCTTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9AD476179331A600743873 /* MCTTableViewCell.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -126,6 +127,8 @@ C6D71947178BA812008ED15F /* GTMOAuth2ViewControllerTouch.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GTMOAuth2ViewControllerTouch.m; sourceTree = "<group>"; }; C6D71948178BA812008ED15F /* GTMOAuth2ViewTouch.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GTMOAuth2ViewTouch.xib; sourceTree = "<group>"; }; C6D71953178BB91E008ED15F /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + DA9AD475179331A600743873 /* MCTTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCTTableViewCell.h; sourceTree = "<group>"; }; + DA9AD476179331A600743873 /* MCTTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCTTableViewCell.m; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -222,6 +225,8 @@ AB9EAE3517036FD700D750C7 /* SettingsViewController.xib */, AB9EAE0C170368F000D750C7 /* Supporting Files */, AB665BC917134336007F2151 /* common */, + DA9AD475179331A600743873 /* MCTTableViewCell.h */, + DA9AD476179331A600743873 /* MCTTableViewCell.m */, ); path = "iOS UI Test"; sourceTree = "<group>"; @@ -408,6 +413,7 @@ C6D7194F178BB8B4008ED15F /* GTMOAuth2Authentication.m in Sources */, B12AAA3417322654003551C7 /* MCOMessageView.mm in Sources */, B12AAA3517322654003551C7 /* MCTMsgViewController.mm in Sources */, + DA9AD477179331A600743873 /* MCTTableViewCell.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -516,6 +522,7 @@ "-all_load", "-ltidy", "-lstdc++", + "-lz", ); PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; @@ -540,6 +547,7 @@ "-all_load", "-ltidy", "-lstdc++", + "-lz", ); PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; diff --git a/example/ios/iOS UI Test/iOS UI Test/MCTTableViewCell.h b/example/ios/iOS UI Test/iOS UI Test/MCTTableViewCell.h new file mode 100644 index 00000000..0d680415 --- /dev/null +++ b/example/ios/iOS UI Test/iOS UI Test/MCTTableViewCell.h @@ -0,0 +1,16 @@ +// +// MCTTableViewCell.h +// iOS UI Test +// +// Created by Paul Young on 14/07/2013. +// Copyright (c) 2013 AppJon. All rights reserved. +// + +#import <UIKit/UIKit.h> +#import <MailCore/MailCore.h> + +@interface MCTTableViewCell : UITableViewCell + +@property (nonatomic, strong) MCOIMAPMessageRenderingOperation * messageRenderingOperation; + +@end diff --git a/example/ios/iOS UI Test/iOS UI Test/MCTTableViewCell.m b/example/ios/iOS UI Test/iOS UI Test/MCTTableViewCell.m new file mode 100644 index 00000000..1c45b0ec --- /dev/null +++ b/example/ios/iOS UI Test/iOS UI Test/MCTTableViewCell.m @@ -0,0 +1,25 @@ +// +// MCTTableViewCell.m +// iOS UI Test +// +// Created by Paul Young on 14/07/2013. +// Copyright (c) 2013 AppJon. All rights reserved. +// + +#import "MCTTableViewCell.h" + +@implementation MCTTableViewCell + +- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier +{ + self = [super initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseIdentifier]; + return self; +} + +- (void)prepareForReuse +{ + [self.messageRenderingOperation cancel]; + self.detailTextLabel.text = @" "; +} + +@end diff --git a/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m b/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m index 5bbc0d53..7540eee8 100644 --- a/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m +++ b/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m @@ -11,6 +11,7 @@ #import "FXKeychain.h" #import "MCTMsgViewController.h" #import "GTMOAuth2ViewControllerTouch.h" +#import "MCTTableViewCell.h" #define CLIENT_ID @"the-client-id" #define CLIENT_SECRET @"the-client-secret" @@ -167,10 +168,20 @@ finishedRefreshWithFetcher:(GTMHTTPFetcher *)fetcher } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath]; - + NSString * cellIdentifier = @"Cell"; + [tableView registerClass:[MCTTableViewCell class] forCellReuseIdentifier:cellIdentifier]; + + MCTTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath]; MCOIMAPMessage *message = self.messages[indexPath.row]; + cell.textLabel.text = message.header.subject; + cell.messageRenderingOperation = [self.imapSession plainTextBodyRenderingOperationWithMessage:message + folder:@"INBOX"]; + + [cell.messageRenderingOperation start:^(NSString * plainTextBodyString, NSError * error) { + cell.detailTextLabel.text = plainTextBodyString; + cell.messageRenderingOperation = nil; + }]; return cell; } diff --git a/example/ios/iOS UI Test/iOS UI Test/en.lproj/MainStoryboard.storyboard b/example/ios/iOS UI Test/iOS UI Test/en.lproj/MainStoryboard.storyboard index 63190886..2e9d223f 100644 --- a/example/ios/iOS UI Test/iOS UI Test/en.lproj/MainStoryboard.storyboard +++ b/example/ios/iOS UI Test/iOS UI Test/en.lproj/MainStoryboard.storyboard @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12C3012" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="3"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="3"> <dependencies> + <deployment defaultVersion="1552" identifier="iOS"/> + <development version="4600" identifier="xcode"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/> </dependencies> <scenes> @@ -22,26 +24,31 @@ <!--Master View Controller - Master--> <scene sceneID="18"> <objects> - <tableViewController storyboardIdentifier="" title="Master" id="12" customClass="MasterViewController" sceneMemberID="viewController"> + <tableViewController title="Master" id="12" customClass="MasterViewController" sceneMemberID="viewController"> <tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="13"> <rect key="frame" x="0.0" y="64" width="320" height="504"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <prototypes> - <tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="phq-AM-6qj" style="IBUITableViewCellStyleDefault" id="lJ0-d7-vTF"> + <tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="phq-AM-6qj" detailTextLabel="uHd-0U-sVX" style="IBUITableViewCellStyleSubtitle" id="lJ0-d7-vTF" customClass="MCTTableViewCell"> <rect key="frame" x="0.0" y="22" width="320" height="44"/> <autoresizingMask key="autoresizingMask"/> <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> <rect key="frame" x="0.0" y="0.0" width="300" height="43"/> <autoresizingMask key="autoresizingMask"/> <subviews> - <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="phq-AM-6qj"> - <rect key="frame" x="10" y="0.0" width="280" height="43"/> + <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="phq-AM-6qj"> + <rect key="frame" x="10" y="2" width="38" height="22"/> <autoresizingMask key="autoresizingMask"/> - <fontDescription key="fontDescription" type="boldSystem" pointSize="20"/> + <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/> <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> </label> + <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Subtitle" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uHd-0U-sVX"> + <fontDescription key="fontDescription" type="system" pointSize="14"/> + <color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/> + <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> + </label> </subviews> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> </view> @@ -68,6 +75,9 @@ </scene> </scenes> <classes> + <class className="MCTTableViewCell" superclassName="UITableViewCell"> + <source key="sourceIdentifier" type="project" relativePath="./Classes/MCTTableViewCell.h"/> + </class> <class className="MasterViewController" superclassName="UITableViewController"> <source key="sourceIdentifier" type="project" relativePath="./Classes/MasterViewController.h"/> <relationships> diff --git a/example/mac/macExample/macExample/en.lproj/MainMenu.xib b/example/mac/macExample/macExample/en.lproj/MainMenu.xib index 8470cb69..91825911 100644 --- a/example/mac/macExample/macExample/en.lproj/MainMenu.xib +++ b/example/mac/macExample/macExample/en.lproj/MainMenu.xib @@ -1,696 +1,4291 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4457.6" systemVersion="12E55" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> - <dependencies> - <deployment defaultVersion="1080" identifier="macosx"/> - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4457.6"/> - </dependencies> - <objects> - <customObject id="-2" userLabel="File's Owner" customClass="NSApplication"> - <connections> - <action selector="orderFrontStandardAboutPanel:" destination="58" id="142"/> - <outlet property="delegate" destination="494" id="495"/> - </connections> - </customObject> - <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"> - <connections> - <action selector="alignCenter:" destination="499" id="518"/> - <action selector="alignJustified:" destination="500" id="523"/> - <action selector="alignLeft:" destination="498" id="524"/> - <action selector="alignRight:" destination="501" id="521"/> - <action selector="arrangeInFront:" destination="5" id="39"/> - <action selector="capitalizeWord:" destination="466" id="467"/> - <action selector="centerSelectionInVisibleArea:" destination="210" id="245"/> - <action selector="checkSpelling:" destination="201" id="225"/> - <action selector="copy:" destination="197" id="224"/> - <action selector="copyFont:" destination="403" id="428"/> - <action selector="copyRuler:" destination="506" id="522"/> - <action selector="cut:" destination="199" id="228"/> - <action selector="delete:" destination="202" id="235"/> - <action selector="hide:" destination="134" id="367"/> - <action selector="hideOtherApplications:" destination="145" id="368"/> - <action selector="loosenKerning:" destination="419" id="435"/> - <action selector="lowerBaseline:" destination="410" id="427"/> - <action selector="lowercaseWord:" destination="465" id="468"/> - <action selector="makeBaseWritingDirectionLeftToRight:" destination="511" id="526"/> - <action selector="makeBaseWritingDirectionNatural:" destination="510" id="525"/> - <action selector="makeBaseWritingDirectionRightToLeft:" destination="512" id="527"/> - <action selector="makeTextWritingDirectionLeftToRight:" destination="516" id="529"/> - <action selector="makeTextWritingDirectionNatural:" destination="515" id="528"/> - <action selector="makeTextWritingDirectionRightToLeft:" destination="517" id="530"/> - <action selector="orderFrontColorPanel:" destination="401" id="433"/> - <action selector="orderFrontSubstitutionsPanel:" destination="457" id="458"/> - <action selector="paste:" destination="203" id="226"/> - <action selector="pasteAsPlainText:" destination="485" id="486"/> - <action selector="pasteFont:" destination="404" id="436"/> - <action selector="pasteRuler:" destination="507" id="519"/> - <action selector="performClose:" destination="73" id="193"/> - <action selector="performFindPanelAction:" destination="209" id="241"/> - <action selector="performFindPanelAction:" destination="208" id="487"/> - <action selector="performFindPanelAction:" destination="213" id="488"/> - <action selector="performFindPanelAction:" destination="221" id="489"/> - <action selector="performFindPanelAction:" destination="534" id="535"/> - <action selector="performMiniaturize:" destination="23" id="37"/> - <action selector="performZoom:" destination="239" id="240"/> - <action selector="raiseBaseline:" destination="409" id="426"/> - <action selector="redo:" destination="215" id="231"/> - <action selector="selectAll:" destination="198" id="232"/> - <action selector="showGuessPanel:" destination="204" id="230"/> - <action selector="showHelp:" destination="492" id="493"/> - <action selector="startSpeaking:" destination="196" id="233"/> - <action selector="stopSpeaking:" destination="195" id="227"/> - <action selector="subscript:" destination="408" id="429"/> - <action selector="superscript:" destination="407" id="430"/> - <action selector="tightenKerning:" destination="418" id="431"/> - <action selector="toggleAutomaticDashSubstitution:" destination="460" id="461"/> - <action selector="toggleAutomaticLinkDetection:" destination="354" id="357"/> - <action selector="toggleAutomaticQuoteSubstitution:" destination="351" id="356"/> - <action selector="toggleAutomaticSpellingCorrection:" destination="454" id="456"/> - <action selector="toggleAutomaticTextReplacement:" destination="462" id="463"/> - <action selector="toggleContinuousSpellChecking:" destination="219" id="222"/> - <action selector="toggleGrammarChecking:" destination="346" id="347"/> - <action selector="toggleRuler:" destination="505" id="520"/> - <action selector="toggleSmartInsertDelete:" destination="350" id="355"/> - <action selector="turnOffKerning:" destination="417" id="441"/> - <action selector="turnOffLigatures:" destination="413" id="440"/> - <action selector="underline:" destination="392" id="432"/> - <action selector="undo:" destination="207" id="223"/> - <action selector="unhideAllApplications:" destination="150" id="370"/> - <action selector="unscript:" destination="406" id="437"/> - <action selector="uppercaseWord:" destination="452" id="464"/> - <action selector="useAllLigatures:" destination="414" id="434"/> - <action selector="useStandardKerning:" destination="416" id="438"/> - <action selector="useStandardLigatures:" destination="412" id="439"/> - </connections> - </customObject> - <customObject id="-3" userLabel="Application"> - <connections> - <action selector="terminate:" destination="136" id="449"/> - </connections> - </customObject> - <menu title="AMainMenu" systemMenu="main" id="29"> - <items> - <menuItem title="macExample" id="56"> - <menu key="submenu" title="macExample" systemMenu="apple" id="57"> - <items> - <menuItem title="About macExample" id="58"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem isSeparatorItem="YES" id="236"> - <modifierMask key="keyEquivalentModifierMask" command="YES"/> - </menuItem> - <menuItem title="Preferences…" keyEquivalent="," id="129"/> - <menuItem isSeparatorItem="YES" id="143"> - <modifierMask key="keyEquivalentModifierMask" command="YES"/> - </menuItem> - <menuItem title="Services" id="131"> - <menu key="submenu" title="Services" systemMenu="services" id="130"/> - </menuItem> - <menuItem isSeparatorItem="YES" id="144"> - <modifierMask key="keyEquivalentModifierMask" command="YES"/> - </menuItem> - <menuItem title="Hide macExample" keyEquivalent="h" id="134"/> - <menuItem title="Hide Others" keyEquivalent="h" id="145"> - <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> - </menuItem> - <menuItem title="Show All" id="150"/> - <menuItem isSeparatorItem="YES" id="149"> - <modifierMask key="keyEquivalentModifierMask" command="YES"/> - </menuItem> - <menuItem title="Quit testUI" keyEquivalent="q" id="136"/> - </items> - </menu> - </menuItem> - <menuItem title="File" id="83"> - <menu key="submenu" title="File" id="81"> - <items> - <menuItem title="Account..." id="609"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Fetch Full Message" id="646"> - <modifierMask key="keyEquivalentModifierMask"/> - <connections> - <binding destination="623" name="value" keyPath="values.FetchFullMessageEnabled" id="648"/> - </connections> - </menuItem> - <menuItem title="Use OAuth 2.0" id="rf2-ay-8rn"> - <modifierMask key="keyEquivalentModifierMask"/> - <connections> - <binding destination="623" name="value" keyPath="values.OAuth2Enabled" id="aLG-X1-MaV"/> - </connections> - </menuItem> - <menuItem isSeparatorItem="YES" id="79"> - <modifierMask key="keyEquivalentModifierMask" command="YES"/> - </menuItem> - <menuItem title="Close" keyEquivalent="w" id="73"/> - </items> - </menu> - </menuItem> - <menuItem title="Edit" id="217"> - <menu key="submenu" title="Edit" id="205"> - <items> - <menuItem title="Undo" keyEquivalent="z" id="207"/> - <menuItem title="Redo" keyEquivalent="Z" id="215"> - <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/> - </menuItem> - <menuItem isSeparatorItem="YES" id="206"> - <modifierMask key="keyEquivalentModifierMask" command="YES"/> - </menuItem> - <menuItem title="Cut" keyEquivalent="x" id="199"/> - <menuItem title="Copy" keyEquivalent="c" id="197"/> - <menuItem title="Paste" keyEquivalent="v" id="203"/> - <menuItem title="Paste and Match Style" keyEquivalent="V" id="485"> - <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> - </menuItem> - <menuItem title="Delete" id="202"/> - <menuItem title="Select All" keyEquivalent="a" id="198"/> - <menuItem isSeparatorItem="YES" id="214"> - <modifierMask key="keyEquivalentModifierMask" command="YES"/> - </menuItem> - <menuItem title="Find" id="218"> - <menu key="submenu" title="Find" id="220"> - <items> - <menuItem title="Find…" tag="1" keyEquivalent="f" id="209"/> - <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="534"> - <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> - </menuItem> - <menuItem title="Find Next" tag="2" keyEquivalent="g" id="208"/> - <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="213"> - <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/> - </menuItem> - <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="221"/> - <menuItem title="Jump to Selection" keyEquivalent="j" id="210"/> - </items> - </menu> - </menuItem> - <menuItem title="Spelling and Grammar" id="216"> - <menu key="submenu" title="Spelling and Grammar" id="200"> - <items> - <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="204"/> - <menuItem title="Check Document Now" keyEquivalent=";" id="201"/> - <menuItem isSeparatorItem="YES" id="453"/> - <menuItem title="Check Spelling While Typing" id="219"/> - <menuItem title="Check Grammar With Spelling" id="346"/> - <menuItem title="Correct Spelling Automatically" id="454"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - </items> - </menu> - </menuItem> - <menuItem title="Substitutions" id="348"> - <menu key="submenu" title="Substitutions" id="349"> - <items> - <menuItem title="Show Substitutions" id="457"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem isSeparatorItem="YES" id="459"/> - <menuItem title="Smart Copy/Paste" tag="1" keyEquivalent="f" id="350"/> - <menuItem title="Smart Quotes" tag="2" keyEquivalent="g" id="351"/> - <menuItem title="Smart Dashes" id="460"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Smart Links" tag="3" keyEquivalent="G" id="354"> - <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/> - </menuItem> - <menuItem title="Text Replacement" id="462"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - </items> - </menu> - </menuItem> - <menuItem title="Transformations" id="450"> - <modifierMask key="keyEquivalentModifierMask"/> - <menu key="submenu" title="Transformations" id="451"> - <items> - <menuItem title="Make Upper Case" id="452"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Make Lower Case" id="465"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Capitalize" id="466"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - </items> - </menu> - </menuItem> - <menuItem title="Speech" id="211"> - <menu key="submenu" title="Speech" id="212"> - <items> - <menuItem title="Start Speaking" id="196"/> - <menuItem title="Stop Speaking" id="195"/> - </items> - </menu> - </menuItem> - </items> - </menu> - </menuItem> - <menuItem title="Format" id="375"> - <modifierMask key="keyEquivalentModifierMask"/> - <menu key="submenu" title="Format" id="376"> - <items> - <menuItem title="Font" id="377"> - <modifierMask key="keyEquivalentModifierMask"/> - <menu key="submenu" title="Font" systemMenu="font" id="388"> - <items> - <menuItem title="Show Fonts" keyEquivalent="t" id="389"/> - <menuItem title="Bold" tag="2" keyEquivalent="b" id="390"/> - <menuItem title="Italic" tag="1" keyEquivalent="i" id="391"/> - <menuItem title="Underline" keyEquivalent="u" id="392"/> - <menuItem isSeparatorItem="YES" id="393"/> - <menuItem title="Bigger" tag="3" keyEquivalent="+" id="394"/> - <menuItem title="Smaller" tag="4" keyEquivalent="-" id="395"/> - <menuItem isSeparatorItem="YES" id="396"/> - <menuItem title="Kern" id="397"> - <modifierMask key="keyEquivalentModifierMask"/> - <menu key="submenu" title="Kern" id="415"> - <items> - <menuItem title="Use Default" id="416"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Use None" id="417"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Tighten" id="418"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Loosen" id="419"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - </items> - </menu> - </menuItem> - <menuItem title="Ligatures" id="398"> - <modifierMask key="keyEquivalentModifierMask"/> - <menu key="submenu" title="Ligatures" id="411"> - <items> - <menuItem title="Use Default" id="412"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Use None" id="413"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Use All" id="414"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - </items> - </menu> - </menuItem> - <menuItem title="Baseline" id="399"> - <modifierMask key="keyEquivalentModifierMask"/> - <menu key="submenu" title="Baseline" id="405"> - <items> - <menuItem title="Use Default" id="406"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Superscript" id="407"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Subscript" id="408"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Raise" id="409"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Lower" id="410"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - </items> - </menu> - </menuItem> - <menuItem isSeparatorItem="YES" id="400"/> - <menuItem title="Show Colors" keyEquivalent="C" id="401"/> - <menuItem isSeparatorItem="YES" id="402"/> - <menuItem title="Copy Style" keyEquivalent="c" id="403"> - <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> - </menuItem> - <menuItem title="Paste Style" keyEquivalent="v" id="404"> - <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> - </menuItem> - </items> - </menu> - </menuItem> - <menuItem title="Text" id="496"> - <modifierMask key="keyEquivalentModifierMask"/> - <menu key="submenu" title="Text" id="497"> - <items> - <menuItem title="Align Left" keyEquivalent="{" id="498"/> - <menuItem title="Center" keyEquivalent="|" id="499"/> - <menuItem title="Justify" id="500"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Align Right" keyEquivalent="}" id="501"/> - <menuItem isSeparatorItem="YES" id="502"/> - <menuItem title="Writing Direction" id="503"> - <modifierMask key="keyEquivalentModifierMask"/> - <menu key="submenu" title="Writing Direction" id="508"> - <items> - <menuItem title="Paragraph" enabled="NO" id="509"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem id="510"> - <string key="title"> Default</string> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem id="511"> - <string key="title"> Left to Right</string> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem id="512"> - <string key="title"> Right to Left</string> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem isSeparatorItem="YES" id="513"/> - <menuItem title="Selection" enabled="NO" id="514"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem id="515"> - <string key="title"> Default</string> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem id="516"> - <string key="title"> Left to Right</string> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem id="517"> - <string key="title"> Right to Left</string> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - </items> - </menu> - </menuItem> - <menuItem isSeparatorItem="YES" id="504"/> - <menuItem title="Show Ruler" id="505"> - <modifierMask key="keyEquivalentModifierMask"/> - </menuItem> - <menuItem title="Copy Ruler" keyEquivalent="c" id="506"> - <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/> - </menuItem> - <menuItem title="Paste Ruler" keyEquivalent="v" id="507"> - <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/> - </menuItem> - </items> - </menu> - </menuItem> - </items> - </menu> - </menuItem> - <menuItem title="Window" id="19"> - <menu key="submenu" title="Window" systemMenu="window" id="24"> - <items> - <menuItem title="Minimize" keyEquivalent="m" id="23"/> - <menuItem title="Zoom" id="239"/> - <menuItem isSeparatorItem="YES" id="92"> - <modifierMask key="keyEquivalentModifierMask" command="YES"/> - </menuItem> - <menuItem title="Bring All to Front" id="5"/> - </items> - </menu> - </menuItem> - <menuItem title="Help" id="490"> - <modifierMask key="keyEquivalentModifierMask"/> - <menu key="submenu" title="Help" systemMenu="help" id="491"> - <items> - <menuItem title="macExample Help" keyEquivalent="?" id="492"/> - </items> - </menu> - </menuItem> - </items> - </menu> - <window title="testUI" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="371"> - <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/> - <windowPositionMask key="initialPositionMask" leftStrut="YES" topStrut="YES"/> - <rect key="contentRect" x="344" y="127" width="768" height="493"/> - <rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/> - <view key="contentView" wantsLayer="YES" id="372"> - <rect key="frame" x="0.0" y="0.0" width="768" height="493"/> - <autoresizingMask key="autoresizingMask"/> - <subviews> - <scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="536"> - <rect key="frame" x="-1" y="0.0" width="194" height="495"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES"/> - <clipView key="contentView" id="NhN-6Q-DSk"> - <rect key="frame" x="1" y="17" width="192" height="477"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <subviews> - <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" headerView="539" id="537"> - <rect key="frame" x="0.0" y="0.0" width="192" height="477"/> - <autoresizingMask key="autoresizingMask"/> - <size key="intercellSpacing" width="3" height="2"/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> - <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/> - <tableColumns> - <tableColumn width="188.68359375" minWidth="40" maxWidth="1000" id="541"> - <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left"> - <font key="font" metaFont="smallSystem"/> - <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/> - </tableHeaderCell> - <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="544"> - <font key="font" metaFont="system"/> - <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> - </textFieldCell> - <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> - </tableColumn> - </tableColumns> - <connections> - <outlet property="dataSource" destination="594" id="597"/> - <outlet property="delegate" destination="594" id="598"/> - </connections> - </tableView> - </subviews> - <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> - </clipView> - <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" id="538"> - <rect key="frame" x="1" y="478" width="335" height="16"/> - <autoresizingMask key="autoresizingMask"/> - </scroller> - <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" id="540"> - <rect key="frame" x="224" y="17" width="15" height="102"/> - <autoresizingMask key="autoresizingMask"/> - </scroller> - <tableHeaderView key="headerView" id="539"> - <rect key="frame" x="0.0" y="0.0" width="192" height="17"/> - <autoresizingMask key="autoresizingMask"/> - </tableHeaderView> - </scrollView> - <customView id="573" customClass="MCOMessageView"> - <rect key="frame" x="201" y="0.0" width="567" height="493"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <connections> - <binding destination="594" name="hidden" keyPath="self.loading" id="694"/> - </connections> - </customView> - <progressIndicator horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" bezeled="NO" indeterminate="YES" style="spinning" id="687"> - <rect key="frame" x="468" y="230" width="32" height="32"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <connections> - <binding destination="594" name="hidden" keyPath="self.loading" id="689"> - <dictionary key="options"> - <string key="NSValueTransformerName">NSNegateBoolean</string> - </dictionary> - </binding> - <binding destination="594" name="animate" keyPath="self.loading" id="691"/> - </connections> - </progressIndicator> - </subviews> - </view> - </window> - <window title="Account" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="610"> - <windowStyleMask key="styleMask" titled="YES" closable="YES"/> - <rect key="contentRect" x="505" y="474" width="409" height="153"/> - <rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/> - <view key="contentView" id="611"> - <rect key="frame" x="0.0" y="0.0" width="409" height="153"/> - <autoresizingMask key="autoresizingMask"/> - <subviews> - <textField verticalHuggingPriority="750" id="612"> - <rect key="frame" x="116" y="111" width="249" height="22"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="613"> - <font key="font" metaFont="system"/> - <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> - </textFieldCell> - <connections> - <binding destination="494" name="value" keyPath="self.login" id="680"> - <dictionary key="options"> - <bool key="NSContinuouslyUpdatesValue" value="YES"/> - </dictionary> - </binding> - </connections> - </textField> - <textField verticalHuggingPriority="750" id="616"> - <rect key="frame" x="72" y="114" width="39" height="17"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Login" id="617"> - <font key="font" metaFont="system"/> - <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> - </textFieldCell> - </textField> - <textField verticalHuggingPriority="750" id="618"> - <rect key="frame" x="47" y="82" width="64" height="17"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Password" id="619"> - <font key="font" metaFont="system"/> - <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> - </textFieldCell> - </textField> - <secureTextField verticalHuggingPriority="750" id="620"> - <rect key="frame" x="116" y="79" width="249" height="22"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="621"> - <font key="font" metaFont="system"/> - <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> - <allowedInputSourceLocales> - <string>NSAllRomanInputSourcesLocaleIdentifier</string> - </allowedInputSourceLocales> - </secureTextFieldCell> - <connections> - <binding destination="494" name="value" keyPath="self.password" id="679"> - <dictionary key="options"> - <bool key="NSContinuouslyUpdatesValue" value="YES"/> - </dictionary> - </binding> - </connections> - </secureTextField> - <button verticalHuggingPriority="750" id="627"> - <rect key="frame" x="296" y="11" width="75" height="32"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <buttonCell key="cell" type="push" title="Login" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="628"> - <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="system"/> - <string key="keyEquivalent" base64-UTF8="YES"> -DQ -</string> - </buttonCell> - <connections> - <binding destination="494" name="enabled" keyPath="self.loginEnabled" id="678"/> - </connections> - </button> - <button verticalHuggingPriority="750" id="629"> - <rect key="frame" x="214" y="11" width="82" height="32"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="630"> - <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="system"/> - <string key="keyEquivalent" base64-UTF8="YES"> -Gw -</string> - </buttonCell> - <connections> - <binding destination="494" name="enabled" keyPath="self.loggingIn" id="670"/> - </connections> - </button> - <progressIndicator horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" id="631"> - <rect key="frame" x="373" y="20" width="16" height="16"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <connections> - <binding destination="494" name="hidden" keyPath="self.loggingIn" id="672"> - <dictionary key="options"> - <string key="NSValueTransformerName">NSNegateBoolean</string> - </dictionary> - </binding> - <binding destination="494" name="animate" keyPath="self.loggingIn" id="674"/> - </connections> - </progressIndicator> - <textField verticalHuggingPriority="750" id="681"> - <rect key="frame" x="116" y="47" width="249" height="22"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="682"> - <font key="font" metaFont="system"/> - <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> - </textFieldCell> - <connections> - <binding destination="494" name="value" keyPath="self.hostname" id="686"> - <dictionary key="options"> - <bool key="NSContinuouslyUpdatesValue" value="YES"/> - </dictionary> - </binding> - </connections> - </textField> - <textField verticalHuggingPriority="750" id="684"> - <rect key="frame" x="43" y="50" width="68" height="17"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Hostname" id="685"> - <font key="font" metaFont="system"/> - <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> - </textFieldCell> - </textField> - </subviews> - </view> - <connections> - <action selector="makeKeyAndOrderFront:" destination="609" id="622"/> - <outlet property="initialFirstResponder" destination="612" id="654"/> - </connections> - </window> - <customObject id="494" customClass="AppDelegate"> - <connections> - <action selector="accountCancel:" destination="629" id="652"/> - <action selector="accountLogin:" destination="627" id="653"/> - <outlet property="_accountWindow" destination="610" id="645"/> - <outlet property="_cancelButton" destination="629" id="642"/> - <outlet property="_loginButton" destination="627" id="641"/> - <outlet property="_msgListViewController" destination="594" id="644"/> - <outlet property="_progressView" destination="631" id="643"/> - <outlet property="cancelButton" destination="629" id="636"/> - <outlet property="loginButton" destination="627" id="637"/> - <outlet property="progressView" destination="631" id="638"/> - <outlet property="window" destination="371" id="532"/> - </connections> - </customObject> - <customObject id="420" customClass="NSFontManager"> - <connections> - <action selector="addFontTrait:" destination="390" id="421"/> - <action selector="addFontTrait:" destination="391" id="422"/> - <action selector="modifyFont:" destination="395" id="423"/> - <action selector="modifyFont:" destination="394" id="425"/> - <action selector="orderFrontFontPanel:" destination="389" id="424"/> - </connections> - </customObject> - <viewController id="594" customClass="MCTMsgListViewController"> - <connections> - <outlet property="_msgViewController" destination="595" id="608"/> - <outlet property="_tableView" destination="537" id="596"/> - </connections> - </viewController> - <viewController id="595" customClass="MCTMsgViewController"> - <connections> - <outlet property="_messageView" destination="573" id="607"/> - </connections> - </viewController> - <userDefaultsController id="623"/> - </objects> - <classes> - <class className="AppDelegate" superclassName="NSObject"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/AppDelegate.h"/> - <relationships> - <relationship kind="action" name="accountCancel:"/> - <relationship kind="action" name="accountLogin:"/> - <relationship kind="outlet" name="_accountWindow" candidateClass="NSWindow"/> - <relationship kind="outlet" name="_msgListViewController" candidateClass="MCTMsgListViewController"/> - </relationships> - </class> - <class className="MCOMessageView" superclassName="NSView"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/MCOMessageView.h"/> - </class> - <class className="MCTMsgListViewController" superclassName="NSViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/MCTMsgListViewController.h"/> - <relationships> - <relationship kind="outlet" name="_msgViewController" candidateClass="MCTMsgViewController"/> - <relationship kind="outlet" name="_tableView" candidateClass="NSTableView"/> - </relationships> - </class> - <class className="MCTMsgViewController" superclassName="NSViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/MCTMsgViewController.h"/> - <relationships> - <relationship kind="outlet" name="_messageView" candidateClass="MCOMessageView"/> - </relationships> - </class> - </classes> -</document>
\ No newline at end of file +<?xml version="1.0" encoding="UTF-8"?> +<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00"> + <data> + <int key="IBDocument.SystemTarget">1080</int> + <string key="IBDocument.SystemVersion">12E55</string> + <string key="IBDocument.InterfaceBuilderVersion">4457.6</string> + <string key="IBDocument.AppKitVersion">1187.39</string> + <string key="IBDocument.HIToolboxVersion">626.00</string> + <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="NS.object.0">4457.6</string> + </object> + <array key="IBDocument.IntegratedClassDependencies"> + <string>NSButton</string> + <string>NSButtonCell</string> + <string>NSCustomObject</string> + <string>NSCustomView</string> + <string>NSMenu</string> + <string>NSMenuItem</string> + <string>NSProgressIndicator</string> + <string>NSScrollView</string> + <string>NSScroller</string> + <string>NSSecureTextField</string> + <string>NSSecureTextFieldCell</string> + <string>NSTableColumn</string> + <string>NSTableHeaderView</string> + <string>NSTableView</string> + <string>NSTextField</string> + <string>NSTextFieldCell</string> + <string>NSUserDefaultsController</string> + <string>NSView</string> + <string>NSViewController</string> + <string>NSWindowTemplate</string> + </array> + <array key="IBDocument.PluginDependencies"> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + </array> + <object class="NSMutableDictionary" key="IBDocument.Metadata"> + <string key="NS.key.0">PluginDependencyRecalculationVersion</string> + <integer value="1" key="NS.object.0"/> + </object> + <array class="NSMutableArray" key="IBDocument.RootObjects" id="247664261"> + <object class="NSCustomObject" id="917830824"> + <string key="NSClassName">NSApplication</string> + </object> + <object class="NSCustomObject" id="226175459"> + <string key="NSClassName">FirstResponder</string> + </object> + <object class="NSCustomObject" id="501673075"> + <string key="NSClassName">NSApplication</string> + </object> + <object class="NSMenu" id="156542226"> + <string key="NSTitle">AMainMenu</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="1007623982"> + <reference key="NSMenu" ref="156542226"/> + <string key="NSTitle">macExample</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <object class="NSCustomResource" key="NSOnImage" id="103802968"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSMenuCheckmark</string> + </object> + <object class="NSCustomResource" key="NSMixedImage" id="656638042"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSMenuMixedState</string> + </object> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="639919077"> + <string key="NSTitle">macExample</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="318883175"> + <reference key="NSMenu" ref="639919077"/> + <string key="NSTitle">About macExample</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="370312882"> + <reference key="NSMenu" ref="639919077"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="53514519"> + <reference key="NSMenu" ref="639919077"/> + <string key="NSTitle">Preferences…</string> + <string key="NSKeyEquiv">,</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="818601752"> + <reference key="NSMenu" ref="639919077"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="312882240"> + <reference key="NSMenu" ref="639919077"/> + <string key="NSTitle">Services</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="754807049"> + <string key="NSTitle">Services</string> + <array class="NSMutableArray" key="NSMenuItems"/> + <string key="NSName">_NSServicesMenu</string> + </object> + </object> + <object class="NSMenuItem" id="393057417"> + <reference key="NSMenu" ref="639919077"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="1070900683"> + <reference key="NSMenu" ref="639919077"/> + <string key="NSTitle">Hide macExample</string> + <string key="NSKeyEquiv">h</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="490354195"> + <reference key="NSMenu" ref="639919077"/> + <string key="NSTitle">Hide Others</string> + <string key="NSKeyEquiv">h</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="339545896"> + <reference key="NSMenu" ref="639919077"/> + <string key="NSTitle">Show All</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="1020789955"> + <reference key="NSMenu" ref="639919077"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="513713155"> + <reference key="NSMenu" ref="639919077"/> + <string key="NSTitle">Quit testUI</string> + <string key="NSKeyEquiv">q</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + <string key="NSName">_NSAppleMenu</string> + </object> + </object> + <object class="NSMenuItem" id="316218839"> + <reference key="NSMenu" ref="156542226"/> + <string key="NSTitle">File</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="731402223"> + <string key="NSTitle">File</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="811411383"> + <reference key="NSMenu" ref="731402223"/> + <string key="NSTitle">Account...</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="19735575"> + <reference key="NSMenu" ref="731402223"/> + <string key="NSTitle">Fetch Full Message</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="848204597"> + <reference key="NSMenu" ref="731402223"/> + <string key="NSTitle">Use OAuth 2.0</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="97156943"> + <reference key="NSMenu" ref="731402223"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="747238131"> + <reference key="NSMenu" ref="731402223"/> + <string key="NSTitle">Close</string> + <string key="NSKeyEquiv">w</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="152802119"> + <reference key="NSMenu" ref="156542226"/> + <string key="NSTitle">Edit</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="615426192"> + <string key="NSTitle">Edit</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="1016313181"> + <reference key="NSMenu" ref="615426192"/> + <string key="NSTitle">Undo</string> + <string key="NSKeyEquiv">z</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="227532631"> + <reference key="NSMenu" ref="615426192"/> + <string key="NSTitle">Redo</string> + <string key="NSKeyEquiv">Z</string> + <int key="NSKeyEquivModMask">1179648</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="483451059"> + <reference key="NSMenu" ref="615426192"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="209655843"> + <reference key="NSMenu" ref="615426192"/> + <string key="NSTitle">Cut</string> + <string key="NSKeyEquiv">x</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="1050394775"> + <reference key="NSMenu" ref="615426192"/> + <string key="NSTitle">Copy</string> + <string key="NSKeyEquiv">c</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="313074668"> + <reference key="NSMenu" ref="615426192"/> + <string key="NSTitle">Paste</string> + <string key="NSKeyEquiv">v</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="521063672"> + <reference key="NSMenu" ref="615426192"/> + <string key="NSTitle">Paste and Match Style</string> + <string key="NSKeyEquiv">V</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="971495868"> + <reference key="NSMenu" ref="615426192"/> + <string key="NSTitle">Delete</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="775369925"> + <reference key="NSMenu" ref="615426192"/> + <string key="NSTitle">Select All</string> + <string key="NSKeyEquiv">a</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="650120985"> + <reference key="NSMenu" ref="615426192"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="52135150"> + <reference key="NSMenu" ref="615426192"/> + <string key="NSTitle">Find</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="42545822"> + <string key="NSTitle">Find</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="694149498"> + <reference key="NSMenu" ref="42545822"/> + <string key="NSTitle">Find…</string> + <string key="NSKeyEquiv">f</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <int key="NSTag">1</int> + </object> + <object class="NSMenuItem" id="527134947"> + <reference key="NSMenu" ref="42545822"/> + <string key="NSTitle">Find and Replace…</string> + <string key="NSKeyEquiv">f</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <int key="NSTag">12</int> + </object> + <object class="NSMenuItem" id="499356451"> + <reference key="NSMenu" ref="42545822"/> + <string key="NSTitle">Find Next</string> + <string key="NSKeyEquiv">g</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <int key="NSTag">2</int> + </object> + <object class="NSMenuItem" id="438298453"> + <reference key="NSMenu" ref="42545822"/> + <string key="NSTitle">Find Previous</string> + <string key="NSKeyEquiv">G</string> + <int key="NSKeyEquivModMask">1179648</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <int key="NSTag">3</int> + </object> + <object class="NSMenuItem" id="334216725"> + <reference key="NSMenu" ref="42545822"/> + <string key="NSTitle">Use Selection for Find</string> + <string key="NSKeyEquiv">e</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <int key="NSTag">7</int> + </object> + <object class="NSMenuItem" id="888890427"> + <reference key="NSMenu" ref="42545822"/> + <string key="NSTitle">Jump to Selection</string> + <string key="NSKeyEquiv">j</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="95474493"> + <reference key="NSMenu" ref="615426192"/> + <string key="NSTitle">Spelling and Grammar</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="635781614"> + <string key="NSTitle">Spelling and Grammar</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="810097392"> + <reference key="NSMenu" ref="635781614"/> + <string key="NSTitle">Show Spelling and Grammar</string> + <string key="NSKeyEquiv">:</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="276316807"> + <reference key="NSMenu" ref="635781614"/> + <string key="NSTitle">Check Document Now</string> + <string key="NSKeyEquiv">;</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="710261109"> + <reference key="NSMenu" ref="635781614"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="978881680"> + <reference key="NSMenu" ref="635781614"/> + <string key="NSTitle">Check Spelling While Typing</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="598550440"> + <reference key="NSMenu" ref="635781614"/> + <string key="NSTitle">Check Grammar With Spelling</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="799188927"> + <reference key="NSMenu" ref="635781614"/> + <string key="NSTitle">Correct Spelling Automatically</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="275143850"> + <reference key="NSMenu" ref="615426192"/> + <string key="NSTitle">Substitutions</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="555537343"> + <string key="NSTitle">Substitutions</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="178882247"> + <reference key="NSMenu" ref="555537343"/> + <string key="NSTitle">Show Substitutions</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="854337306"> + <reference key="NSMenu" ref="555537343"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="84020104"> + <reference key="NSMenu" ref="555537343"/> + <string key="NSTitle">Smart Copy/Paste</string> + <string key="NSKeyEquiv">f</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <int key="NSTag">1</int> + </object> + <object class="NSMenuItem" id="227929686"> + <reference key="NSMenu" ref="555537343"/> + <string key="NSTitle">Smart Quotes</string> + <string key="NSKeyEquiv">g</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <int key="NSTag">2</int> + </object> + <object class="NSMenuItem" id="808689713"> + <reference key="NSMenu" ref="555537343"/> + <string key="NSTitle">Smart Dashes</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="36796212"> + <reference key="NSMenu" ref="555537343"/> + <string key="NSTitle">Smart Links</string> + <string key="NSKeyEquiv">G</string> + <int key="NSKeyEquivModMask">1179648</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <int key="NSTag">3</int> + </object> + <object class="NSMenuItem" id="541756067"> + <reference key="NSMenu" ref="555537343"/> + <string key="NSTitle">Text Replacement</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="234642991"> + <reference key="NSMenu" ref="615426192"/> + <string key="NSTitle">Transformations</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="68937164"> + <string key="NSTitle">Transformations</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="441925809"> + <reference key="NSMenu" ref="68937164"/> + <string key="NSTitle">Make Upper Case</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="954892865"> + <reference key="NSMenu" ref="68937164"/> + <string key="NSTitle">Make Lower Case</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="886327049"> + <reference key="NSMenu" ref="68937164"/> + <string key="NSTitle">Capitalize</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="482864853"> + <reference key="NSMenu" ref="615426192"/> + <string key="NSTitle">Speech</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="608370105"> + <string key="NSTitle">Speech</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="673123968"> + <reference key="NSMenu" ref="608370105"/> + <string key="NSTitle">Start Speaking</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="807254252"> + <reference key="NSMenu" ref="608370105"/> + <string key="NSTitle">Stop Speaking</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + </object> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="532432597"> + <reference key="NSMenu" ref="156542226"/> + <string key="NSTitle">Format</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="260180391"> + <string key="NSTitle">Format</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="469637357"> + <reference key="NSMenu" ref="260180391"/> + <string key="NSTitle">Font</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="47695461"> + <string key="NSTitle">Font</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="435118259"> + <reference key="NSMenu" ref="47695461"/> + <string key="NSTitle">Show Fonts</string> + <string key="NSKeyEquiv">t</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="685765258"> + <reference key="NSMenu" ref="47695461"/> + <string key="NSTitle">Bold</string> + <string key="NSKeyEquiv">b</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <int key="NSTag">2</int> + </object> + <object class="NSMenuItem" id="698764690"> + <reference key="NSMenu" ref="47695461"/> + <string key="NSTitle">Italic</string> + <string key="NSKeyEquiv">i</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <int key="NSTag">1</int> + </object> + <object class="NSMenuItem" id="581783527"> + <reference key="NSMenu" ref="47695461"/> + <string key="NSTitle">Underline</string> + <string key="NSKeyEquiv">u</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="254085646"> + <reference key="NSMenu" ref="47695461"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="387393358"> + <reference key="NSMenu" ref="47695461"/> + <string key="NSTitle">Bigger</string> + <string key="NSKeyEquiv">+</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <int key="NSTag">3</int> + </object> + <object class="NSMenuItem" id="182510838"> + <reference key="NSMenu" ref="47695461"/> + <string key="NSTitle">Smaller</string> + <string key="NSKeyEquiv">-</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <int key="NSTag">4</int> + </object> + <object class="NSMenuItem" id="207304917"> + <reference key="NSMenu" ref="47695461"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="898621376"> + <reference key="NSMenu" ref="47695461"/> + <string key="NSTitle">Kern</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="982018417"> + <string key="NSTitle">Kern</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="536404927"> + <reference key="NSMenu" ref="982018417"/> + <string key="NSTitle">Use Default</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="911624108"> + <reference key="NSMenu" ref="982018417"/> + <string key="NSTitle">Use None</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="924848711"> + <reference key="NSMenu" ref="982018417"/> + <string key="NSTitle">Tighten</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="151517909"> + <reference key="NSMenu" ref="982018417"/> + <string key="NSTitle">Loosen</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="462522699"> + <reference key="NSMenu" ref="47695461"/> + <string key="NSTitle">Ligatures</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="129930375"> + <string key="NSTitle">Ligatures</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="969057758"> + <reference key="NSMenu" ref="129930375"/> + <string key="NSTitle">Use Default</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="666051587"> + <reference key="NSMenu" ref="129930375"/> + <string key="NSTitle">Use None</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="777841351"> + <reference key="NSMenu" ref="129930375"/> + <string key="NSTitle">Use All</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="1055508514"> + <reference key="NSMenu" ref="47695461"/> + <string key="NSTitle">Baseline</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="183843316"> + <string key="NSTitle">Baseline</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="202189202"> + <reference key="NSMenu" ref="183843316"/> + <string key="NSTitle">Use Default</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="824638879"> + <reference key="NSMenu" ref="183843316"/> + <string key="NSTitle">Superscript</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="927538672"> + <reference key="NSMenu" ref="183843316"/> + <string key="NSTitle">Subscript</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="803450754"> + <reference key="NSMenu" ref="183843316"/> + <string key="NSTitle">Raise</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="117597457"> + <reference key="NSMenu" ref="183843316"/> + <string key="NSTitle">Lower</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="72541814"> + <reference key="NSMenu" ref="47695461"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="676976671"> + <reference key="NSMenu" ref="47695461"/> + <string key="NSTitle">Show Colors</string> + <string key="NSKeyEquiv">C</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="396402858"> + <reference key="NSMenu" ref="47695461"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="626009594"> + <reference key="NSMenu" ref="47695461"/> + <string key="NSTitle">Copy Style</string> + <string key="NSKeyEquiv">c</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="497764422"> + <reference key="NSMenu" ref="47695461"/> + <string key="NSTitle">Paste Style</string> + <string key="NSKeyEquiv">v</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + <string key="NSName">_NSFontMenu</string> + </object> + </object> + <object class="NSMenuItem" id="878888798"> + <reference key="NSMenu" ref="260180391"/> + <string key="NSTitle">Text</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="954362204"> + <string key="NSTitle">Text</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="764804144"> + <reference key="NSMenu" ref="954362204"/> + <string key="NSTitle">Align Left</string> + <string key="NSKeyEquiv">{</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="196388074"> + <reference key="NSMenu" ref="954362204"/> + <string key="NSTitle">Center</string> + <string key="NSKeyEquiv">|</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="394667378"> + <reference key="NSMenu" ref="954362204"/> + <string key="NSTitle">Justify</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="713809051"> + <reference key="NSMenu" ref="954362204"/> + <string key="NSTitle">Align Right</string> + <string key="NSKeyEquiv">}</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="297983530"> + <reference key="NSMenu" ref="954362204"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="225342933"> + <reference key="NSMenu" ref="954362204"/> + <string key="NSTitle">Writing Direction</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="138790741"> + <string key="NSTitle">Writing Direction</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="759187287"> + <reference key="NSMenu" ref="138790741"/> + <bool key="NSIsDisabled">YES</bool> + <string key="NSTitle">Paragraph</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="376824797"> + <reference key="NSMenu" ref="138790741"/> + <string type="base64-UTF8" key="NSTitle">CURlZmF1bHQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="285899157"> + <reference key="NSMenu" ref="138790741"/> + <string type="base64-UTF8" key="NSTitle">CUxlZnQgdG8gUmlnaHQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="1064243037"> + <reference key="NSMenu" ref="138790741"/> + <string type="base64-UTF8" key="NSTitle">CVJpZ2h0IHRvIExlZnQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="462161159"> + <reference key="NSMenu" ref="138790741"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="225403515"> + <reference key="NSMenu" ref="138790741"/> + <bool key="NSIsDisabled">YES</bool> + <string key="NSTitle">Selection</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="750952994"> + <reference key="NSMenu" ref="138790741"/> + <string type="base64-UTF8" key="NSTitle">CURlZmF1bHQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="504962853"> + <reference key="NSMenu" ref="138790741"/> + <string type="base64-UTF8" key="NSTitle">CUxlZnQgdG8gUmlnaHQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="873105336"> + <reference key="NSMenu" ref="138790741"/> + <string type="base64-UTF8" key="NSTitle">CVJpZ2h0IHRvIExlZnQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="928834455"> + <reference key="NSMenu" ref="954362204"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="144988915"> + <reference key="NSMenu" ref="954362204"/> + <string key="NSTitle">Show Ruler</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="6647638"> + <reference key="NSMenu" ref="954362204"/> + <string key="NSTitle">Copy Ruler</string> + <string key="NSKeyEquiv">c</string> + <int key="NSKeyEquivModMask">1310720</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="104690072"> + <reference key="NSMenu" ref="954362204"/> + <string key="NSTitle">Paste Ruler</string> + <string key="NSKeyEquiv">v</string> + <int key="NSKeyEquivModMask">1310720</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + </object> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="461206755"> + <reference key="NSMenu" ref="156542226"/> + <string key="NSTitle">Window</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="718553326"> + <string key="NSTitle">Window</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="250881679"> + <reference key="NSMenu" ref="718553326"/> + <string key="NSTitle">Minimize</string> + <string key="NSKeyEquiv">m</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="149363329"> + <reference key="NSMenu" ref="718553326"/> + <string key="NSTitle">Zoom</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="812700807"> + <reference key="NSMenu" ref="718553326"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + <object class="NSMenuItem" id="27779496"> + <reference key="NSMenu" ref="718553326"/> + <string key="NSTitle">Bring All to Front</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + <string key="NSName">_NSWindowsMenu</string> + </object> + </object> + <object class="NSMenuItem" id="236821223"> + <reference key="NSMenu" ref="156542226"/> + <string key="NSTitle">Help</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="84681450"> + <string key="NSTitle">Help</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="437187475"> + <reference key="NSMenu" ref="84681450"/> + <string key="NSTitle">macExample Help</string> + <string key="NSKeyEquiv">?</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="103802968"/> + <reference key="NSMixedImage" ref="656638042"/> + </object> + </array> + <string key="NSName">_NSHelpMenu</string> + </object> + </object> + </array> + <string key="NSName">_NSMainMenu</string> + </object> + <object class="NSWindowTemplate" id="168628689"> + <int key="NSWindowStyleMask">15</int> + <int key="NSWindowBacking">2</int> + <string key="NSWindowRect">{{344, 127}, {768, 493}}</string> + <int key="NSWTFlags">1948778496</int> + <string key="NSWindowTitle">testUI</string> + <string key="NSWindowClass">NSWindow</string> + <nil key="NSViewClass"/> + <nil key="NSUserInterfaceItemIdentifier"/> + <object class="NSView" key="NSWindowView" id="773257948"> + <reference key="NSNextResponder"/> + <int key="NSvFlags">1792</int> + <array class="NSMutableArray" key="NSSubviews"> + <object class="NSScrollView" id="1026693944"> + <reference key="NSNextResponder" ref="773257948"/> + <int key="NSvFlags">1820</int> + <array class="NSMutableArray" key="NSSubviews"> + <object class="NSClipView" id="127544878"> + <reference key="NSNextResponder" ref="1026693944"/> + <int key="NSvFlags">3858</int> + <array class="NSMutableArray" key="NSSubviews"> + <object class="NSTableView" id="351647071"> + <reference key="NSNextResponder" ref="127544878"/> + <int key="NSvFlags">1792</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrameSize">{192, 477}</string> + <reference key="NSSuperview" ref="127544878"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="745817006"/> + <bool key="NSEnabled">YES</bool> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + <bool key="NSControlAllowsExpansionToolTips">YES</bool> + <object class="NSTableHeaderView" key="NSHeaderView" id="538629685"> + <reference key="NSNextResponder" ref="890951925"/> + <int key="NSvFlags">1792</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrameSize">{192, 17}</string> + <reference key="NSSuperview" ref="890951925"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="127544878"/> + <reference key="NSTableView" ref="351647071"/> + </object> + <object class="_NSCornerView" key="NSCornerView"> + <nil key="NSNextResponder"/> + <int key="NSvFlags">256</int> + <string key="NSFrameSize">{15, 20}</string> + </object> + <array class="NSMutableArray" key="NSTableColumns"> + <object class="NSTableColumn" id="281302497"> + <double key="NSWidth">188.68359375</double> + <double key="NSMinWidth">40</double> + <double key="NSMaxWidth">1000</double> + <object class="NSTableHeaderCell" key="NSHeaderCell"> + <int key="NSCellFlags">75497536</int> + <int key="NSCellFlags2">2048</int> + <string key="NSContents"/> + <object class="NSFont" key="NSSupport"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">11</double> + <int key="NSfFlags">3100</int> + </object> + <object class="NSColor" key="NSBackgroundColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes> + </object> + <object class="NSColor" key="NSTextColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">headerTextColor</string> + <object class="NSColor" key="NSColor" id="382088458"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MAA</bytes> + </object> + </object> + </object> + <object class="NSTextFieldCell" key="NSDataCell" id="732990771"> + <int key="NSCellFlags">337641537</int> + <int key="NSCellFlags2">2048</int> + <string key="NSContents">Text Cell</string> + <object class="NSFont" key="NSSupport" id="810862990"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">13</double> + <int key="NSfFlags">1044</int> + </object> + <reference key="NSControlView" ref="351647071"/> + <object class="NSColor" key="NSBackgroundColor" id="603053972"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlBackgroundColor</string> + <object class="NSColor" key="NSColor" id="1064254045"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes> + </object> + </object> + <object class="NSColor" key="NSTextColor" id="280699352"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlTextColor</string> + <reference key="NSColor" ref="382088458"/> + </object> + </object> + <int key="NSResizingMask">3</int> + <bool key="NSIsResizeable">YES</bool> + <bool key="NSIsEditable">YES</bool> + <reference key="NSTableView" ref="351647071"/> + </object> + </array> + <double key="NSIntercellSpacingWidth">3</double> + <double key="NSIntercellSpacingHeight">2</double> + <object class="NSColor" key="NSBackgroundColor" id="233004891"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MQA</bytes> + </object> + <object class="NSColor" key="NSGridColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">gridColor</string> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC41AA</bytes> + </object> + </object> + <double key="NSRowHeight">17</double> + <int key="NSTvFlags">-700448768</int> + <reference key="NSDelegate"/> + <reference key="NSDataSource"/> + <int key="NSColumnAutoresizingStyle">4</int> + <int key="NSDraggingSourceMaskForLocal">-1</int> + <int key="NSDraggingSourceMaskForNonLocal">0</int> + <bool key="NSAllowsTypeSelect">YES</bool> + <int key="NSTableViewDraggingDestinationStyle">0</int> + <int key="NSTableViewGroupRowStyle">1</int> + </object> + </array> + <string key="NSFrame">{{1, 17}, {192, 477}}</string> + <reference key="NSSuperview" ref="1026693944"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="351647071"/> + <reference key="NSDocView" ref="351647071"/> + <reference key="NSBGColor" ref="603053972"/> + <int key="NScvFlags">4</int> + </object> + <object class="NSClipView" id="890951925"> + <reference key="NSNextResponder" ref="1026693944"/> + <int key="NSvFlags">3840</int> + <array class="NSMutableArray" key="NSSubviews"> + <reference ref="538629685"/> + </array> + <string key="NSFrame">{{1, 0}, {192, 17}}</string> + <reference key="NSSuperview" ref="1026693944"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="538629685"/> + <reference key="NSDocView" ref="538629685"/> + <reference key="NSBGColor" ref="603053972"/> + <int key="NScvFlags">4</int> + </object> + <object class="NSScroller" id="706855941"> + <reference key="NSNextResponder" ref="1026693944"/> + <int key="NSvFlags">-2147481856</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{1, 478}, {335, 16}}</string> + <reference key="NSSuperview" ref="1026693944"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="517423975"/> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + <int key="NSsFlags">1</int> + <reference key="NSTarget" ref="1026693944"/> + <string key="NSAction">_doScroller:</string> + <double key="NSCurValue">1</double> + </object> + <object class="NSScroller" id="745817006"> + <reference key="NSNextResponder" ref="1026693944"/> + <int key="NSvFlags">-2147481856</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{224, 17}, {15, 102}}</string> + <reference key="NSSuperview" ref="1026693944"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="706855941"/> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + <reference key="NSTarget" ref="1026693944"/> + <string key="NSAction">_doScroller:</string> + <double key="NSCurValue">1</double> + </object> + </array> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{-1, 0}, {194, 495}}</string> + <reference key="NSSuperview" ref="773257948"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="890951925"/> + <int key="NSsFlags">133682</int> + <reference key="NSVScroller" ref="745817006"/> + <reference key="NSHScroller" ref="706855941"/> + <reference key="NSContentView" ref="127544878"/> + <reference key="NSHeaderClipView" ref="890951925"/> + <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes> + <double key="NSMinMagnification">0.25</double> + <double key="NSMaxMagnification">4</double> + <double key="NSMagnification">1</double> + </object> + <object class="NSCustomView" id="517423975"> + <reference key="NSNextResponder" ref="773257948"/> + <int key="NSvFlags">1810</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{201, 0}, {567, 493}}</string> + <reference key="NSSuperview" ref="773257948"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="121523904"/> + <string key="NSClassName">MCOMessageView</string> + </object> + <object class="NSProgressIndicator" id="121523904"> + <reference key="NSNextResponder" ref="773257948"/> + <int key="NSvFlags">1804</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{468, 230}, {32, 32}}</string> + <reference key="NSSuperview" ref="773257948"/> + <reference key="NSWindow"/> + <string key="NSHuggingPriority">{750, 750}</string> + <int key="NSpiFlags">20494</int> + <double key="NSMaxValue">100</double> + </object> + </array> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrameSize">{768, 493}</string> + <reference key="NSSuperview"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="1026693944"/> + <bool key="NSViewIsLayerTreeHost">YES</bool> + </object> + <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> + <string key="NSMaxSize">{10000000000000, 10000000000000}</string> + <bool key="NSWindowIsRestorable">YES</bool> + </object> + <object class="NSWindowTemplate" id="619695315"> + <int key="NSWindowStyleMask">3</int> + <int key="NSWindowBacking">2</int> + <string key="NSWindowRect">{{505, 474}, {409, 153}}</string> + <int key="NSWTFlags">611845120</int> + <string key="NSWindowTitle">Account</string> + <string key="NSWindowClass">NSWindow</string> + <nil key="NSViewClass"/> + <nil key="NSUserInterfaceItemIdentifier"/> + <object class="NSView" key="NSWindowView" id="248538310"> + <reference key="NSNextResponder"/> + <int key="NSvFlags">1792</int> + <array class="NSMutableArray" key="NSSubviews"> + <object class="NSTextField" id="804074654"> + <reference key="NSNextResponder" ref="248538310"/> + <int key="NSvFlags">1804</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{116, 111}, {249, 22}}</string> + <reference key="NSSuperview" ref="248538310"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="164068726"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="207021086"> + <int key="NSCellFlags">-1804599231</int> + <int key="NSCellFlags2">272630784</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="810862990"/> + <reference key="NSControlView" ref="804074654"/> + <bool key="NSDrawsBackground">YES</bool> + <object class="NSColor" key="NSBackgroundColor" id="134384246"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">textBackgroundColor</string> + <reference key="NSColor" ref="233004891"/> + </object> + <object class="NSColor" key="NSTextColor" id="259228340"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">textColor</string> + <reference key="NSColor" ref="382088458"/> + </object> + </object> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + </object> + <object class="NSTextField" id="345489272"> + <reference key="NSNextResponder" ref="248538310"/> + <int key="NSvFlags">1804</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{72, 114}, {39, 17}}</string> + <reference key="NSSuperview" ref="248538310"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="804074654"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="538284755"> + <int key="NSCellFlags">68157504</int> + <int key="NSCellFlags2">272630784</int> + <string key="NSContents">Login</string> + <reference key="NSSupport" ref="810862990"/> + <reference key="NSControlView" ref="345489272"/> + <object class="NSColor" key="NSBackgroundColor" id="120440597"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlColor</string> + <reference key="NSColor" ref="1064254045"/> + </object> + <reference key="NSTextColor" ref="280699352"/> + </object> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + </object> + <object class="NSTextField" id="164068726"> + <reference key="NSNextResponder" ref="248538310"/> + <int key="NSvFlags">1804</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{47, 82}, {64, 17}}</string> + <reference key="NSSuperview" ref="248538310"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="253763866"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="132014401"> + <int key="NSCellFlags">68157504</int> + <int key="NSCellFlags2">272630784</int> + <string key="NSContents">Password</string> + <reference key="NSSupport" ref="810862990"/> + <reference key="NSControlView" ref="164068726"/> + <reference key="NSBackgroundColor" ref="120440597"/> + <reference key="NSTextColor" ref="280699352"/> + </object> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + </object> + <object class="NSSecureTextField" id="253763866"> + <reference key="NSNextResponder" ref="248538310"/> + <int key="NSvFlags">1804</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{116, 79}, {249, 22}}</string> + <reference key="NSSuperview" ref="248538310"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="464541668"/> + <bool key="NSEnabled">YES</bool> + <object class="NSSecureTextFieldCell" key="NSCell" id="154067218"> + <int key="NSCellFlags">342884417</int> + <int key="NSCellFlags2">272630848</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="810862990"/> + <reference key="NSControlView" ref="253763866"/> + <bool key="NSDrawsBackground">YES</bool> + <reference key="NSBackgroundColor" ref="134384246"/> + <reference key="NSTextColor" ref="259228340"/> + <array key="NSAllowedInputLocales"> + <string>NSAllRomanInputSourcesLocaleIdentifier</string> + </array> + </object> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + </object> + <object class="NSButton" id="219064696"> + <reference key="NSNextResponder" ref="248538310"/> + <int key="NSvFlags">1804</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{296, 11}, {75, 32}}</string> + <reference key="NSSuperview" ref="248538310"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="109351171"/> + <string key="NSHuggingPriority">{250, 750}</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="219347982"> + <int key="NSCellFlags">67108864</int> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents">Login</string> + <reference key="NSSupport" ref="810862990"/> + <reference key="NSControlView" ref="219064696"/> + <int key="NSButtonFlags">-2038284288</int> + <int key="NSButtonFlags2">129</int> + <object class="NSFont" key="NSAlternateImage" id="882606122"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">13</double> + <int key="NSfFlags">16</int> + </object> + <string key="NSAlternateContents"/> + <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + </object> + <object class="NSButton" id="374129197"> + <reference key="NSNextResponder" ref="248538310"/> + <int key="NSvFlags">1804</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{214, 11}, {82, 32}}</string> + <reference key="NSSuperview" ref="248538310"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="219064696"/> + <string key="NSHuggingPriority">{250, 750}</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="229170345"> + <int key="NSCellFlags">67108864</int> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents">Cancel</string> + <reference key="NSSupport" ref="810862990"/> + <reference key="NSControlView" ref="374129197"/> + <int key="NSButtonFlags">-2038284288</int> + <int key="NSButtonFlags2">129</int> + <reference key="NSAlternateImage" ref="882606122"/> + <string key="NSAlternateContents"/> + <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + </object> + <object class="NSProgressIndicator" id="109351171"> + <reference key="NSNextResponder" ref="248538310"/> + <int key="NSvFlags">1804</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{373, 20}, {16, 16}}</string> + <reference key="NSSuperview" ref="248538310"/> + <reference key="NSWindow"/> + <string key="NSHuggingPriority">{750, 750}</string> + <int key="NSpiFlags">28942</int> + <double key="NSMaxValue">100</double> + </object> + <object class="NSTextField" id="172014817"> + <reference key="NSNextResponder" ref="248538310"/> + <int key="NSvFlags">1804</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{116, 47}, {249, 22}}</string> + <reference key="NSSuperview" ref="248538310"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="374129197"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="637517278"> + <int key="NSCellFlags">-1804599231</int> + <int key="NSCellFlags2">272630784</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="810862990"/> + <reference key="NSControlView" ref="172014817"/> + <bool key="NSDrawsBackground">YES</bool> + <reference key="NSBackgroundColor" ref="134384246"/> + <reference key="NSTextColor" ref="259228340"/> + </object> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + </object> + <object class="NSTextField" id="464541668"> + <reference key="NSNextResponder" ref="248538310"/> + <int key="NSvFlags">1804</int> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrame">{{43, 50}, {68, 17}}</string> + <reference key="NSSuperview" ref="248538310"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="172014817"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="869467967"> + <int key="NSCellFlags">68157504</int> + <int key="NSCellFlags2">272630784</int> + <string key="NSContents">Hostname</string> + <reference key="NSSupport" ref="810862990"/> + <reference key="NSControlView" ref="464541668"/> + <reference key="NSBackgroundColor" ref="120440597"/> + <reference key="NSTextColor" ref="280699352"/> + </object> + <bool key="NSAllowsLogicalLayoutDirection">NO</bool> + </object> + </array> + <object class="NSPSMatrix" key="NSFrameMatrix"/> + <string key="NSFrameSize">{409, 153}</string> + <reference key="NSSuperview"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="345489272"/> + </object> + <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> + <string key="NSMaxSize">{10000000000000, 10000000000000}</string> + <bool key="NSWindowIsRestorable">YES</bool> + </object> + <object class="NSCustomObject" id="865357229"> + <string key="NSClassName">AppDelegate</string> + </object> + <object class="NSCustomObject" id="1028722030"> + <string key="NSClassName">NSFontManager</string> + </object> + <object class="NSViewController" id="1060514328"/> + <object class="NSViewController" id="473492163"/> + <object class="NSUserDefaultsController" id="208438053"> + <bool key="NSAppliesImmediately">YES</bool> + </object> + </array> + <object class="IBObjectContainer" key="IBDocument.Objects"> + <bool key="usesAutoincrementingIDs">NO</bool> + <array class="NSMutableArray" key="connectionRecords"> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">terminate:</string> + <reference key="source" ref="501673075"/> + <reference key="destination" ref="513713155"/> + </object> + <string key="id">449</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">orderFrontStandardAboutPanel:</string> + <reference key="source" ref="917830824"/> + <reference key="destination" ref="318883175"/> + </object> + <string key="id">142</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="917830824"/> + <reference key="destination" ref="865357229"/> + </object> + <string key="id">495</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">alignCenter:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="196388074"/> + </object> + <string key="id">518</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">alignJustified:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="394667378"/> + </object> + <string key="id">523</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">alignLeft:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="764804144"/> + </object> + <string key="id">524</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">alignRight:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="713809051"/> + </object> + <string key="id">521</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">arrangeInFront:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="27779496"/> + </object> + <string key="id">39</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">capitalizeWord:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="886327049"/> + </object> + <string key="id">467</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">centerSelectionInVisibleArea:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="888890427"/> + </object> + <string key="id">245</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">checkSpelling:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="276316807"/> + </object> + <string key="id">225</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">copy:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="1050394775"/> + </object> + <string key="id">224</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">copyFont:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="626009594"/> + </object> + <string key="id">428</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">copyRuler:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="6647638"/> + </object> + <string key="id">522</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">cut:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="209655843"/> + </object> + <string key="id">228</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">delete:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="971495868"/> + </object> + <string key="id">235</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">hide:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="1070900683"/> + </object> + <string key="id">367</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">hideOtherApplications:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="490354195"/> + </object> + <string key="id">368</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">loosenKerning:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="151517909"/> + </object> + <string key="id">435</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">lowerBaseline:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="117597457"/> + </object> + <string key="id">427</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">lowercaseWord:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="954892865"/> + </object> + <string key="id">468</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeBaseWritingDirectionLeftToRight:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="285899157"/> + </object> + <string key="id">526</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeBaseWritingDirectionNatural:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="376824797"/> + </object> + <string key="id">525</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeBaseWritingDirectionRightToLeft:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="1064243037"/> + </object> + <string key="id">527</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeTextWritingDirectionLeftToRight:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="504962853"/> + </object> + <string key="id">529</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeTextWritingDirectionNatural:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="750952994"/> + </object> + <string key="id">528</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeTextWritingDirectionRightToLeft:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="873105336"/> + </object> + <string key="id">530</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">orderFrontColorPanel:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="676976671"/> + </object> + <string key="id">433</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">orderFrontSubstitutionsPanel:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="178882247"/> + </object> + <string key="id">458</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">paste:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="313074668"/> + </object> + <string key="id">226</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">pasteAsPlainText:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="521063672"/> + </object> + <string key="id">486</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">pasteFont:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="497764422"/> + </object> + <string key="id">436</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">pasteRuler:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="104690072"/> + </object> + <string key="id">519</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performClose:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="747238131"/> + </object> + <string key="id">193</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="694149498"/> + </object> + <string key="id">241</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="499356451"/> + </object> + <string key="id">487</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="438298453"/> + </object> + <string key="id">488</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="334216725"/> + </object> + <string key="id">489</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="527134947"/> + </object> + <string key="id">535</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performMiniaturize:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="250881679"/> + </object> + <string key="id">37</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performZoom:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="149363329"/> + </object> + <string key="id">240</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">raiseBaseline:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="803450754"/> + </object> + <string key="id">426</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">redo:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="227532631"/> + </object> + <string key="id">231</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">selectAll:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="775369925"/> + </object> + <string key="id">232</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">showGuessPanel:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="810097392"/> + </object> + <string key="id">230</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">showHelp:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="437187475"/> + </object> + <string key="id">493</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">startSpeaking:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="673123968"/> + </object> + <string key="id">233</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">stopSpeaking:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="807254252"/> + </object> + <string key="id">227</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">subscript:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="927538672"/> + </object> + <string key="id">429</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">superscript:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="824638879"/> + </object> + <string key="id">430</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">tightenKerning:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="924848711"/> + </object> + <string key="id">431</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticDashSubstitution:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="808689713"/> + </object> + <string key="id">461</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticLinkDetection:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="36796212"/> + </object> + <string key="id">357</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticQuoteSubstitution:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="227929686"/> + </object> + <string key="id">356</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticSpellingCorrection:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="799188927"/> + </object> + <string key="id">456</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticTextReplacement:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="541756067"/> + </object> + <string key="id">463</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleContinuousSpellChecking:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="978881680"/> + </object> + <string key="id">222</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleGrammarChecking:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="598550440"/> + </object> + <string key="id">347</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleRuler:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="144988915"/> + </object> + <string key="id">520</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleSmartInsertDelete:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="84020104"/> + </object> + <string key="id">355</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">turnOffKerning:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="911624108"/> + </object> + <string key="id">441</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">turnOffLigatures:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="666051587"/> + </object> + <string key="id">440</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">underline:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="581783527"/> + </object> + <string key="id">432</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">undo:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="1016313181"/> + </object> + <string key="id">223</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">unhideAllApplications:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="339545896"/> + </object> + <string key="id">370</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">unscript:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="202189202"/> + </object> + <string key="id">437</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">uppercaseWord:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="441925809"/> + </object> + <string key="id">464</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">useAllLigatures:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="777841351"/> + </object> + <string key="id">434</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">useStandardKerning:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="536404927"/> + </object> + <string key="id">438</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">useStandardLigatures:</string> + <reference key="source" ref="226175459"/> + <reference key="destination" ref="969057758"/> + </object> + <string key="id">439</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">addFontTrait:</string> + <reference key="source" ref="1028722030"/> + <reference key="destination" ref="685765258"/> + </object> + <string key="id">421</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">addFontTrait:</string> + <reference key="source" ref="1028722030"/> + <reference key="destination" ref="698764690"/> + </object> + <string key="id">422</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">modifyFont:</string> + <reference key="source" ref="1028722030"/> + <reference key="destination" ref="182510838"/> + </object> + <string key="id">423</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">modifyFont:</string> + <reference key="source" ref="1028722030"/> + <reference key="destination" ref="387393358"/> + </object> + <string key="id">425</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">orderFrontFontPanel:</string> + <reference key="source" ref="1028722030"/> + <reference key="destination" ref="435118259"/> + </object> + <string key="id">424</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">accountCancel:</string> + <reference key="source" ref="865357229"/> + <reference key="destination" ref="374129197"/> + </object> + <string key="id">652</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">accountLogin:</string> + <reference key="source" ref="865357229"/> + <reference key="destination" ref="219064696"/> + </object> + <string key="id">653</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">_accountWindow</string> + <reference key="source" ref="865357229"/> + <reference key="destination" ref="619695315"/> + </object> + <string key="id">645</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">_cancelButton</string> + <reference key="source" ref="865357229"/> + <reference key="destination" ref="374129197"/> + </object> + <string key="id">642</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">_loginButton</string> + <reference key="source" ref="865357229"/> + <reference key="destination" ref="219064696"/> + </object> + <string key="id">641</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">_msgListViewController</string> + <reference key="source" ref="865357229"/> + <reference key="destination" ref="1060514328"/> + </object> + <string key="id">644</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">_progressView</string> + <reference key="source" ref="865357229"/> + <reference key="destination" ref="109351171"/> + </object> + <string key="id">643</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">cancelButton</string> + <reference key="source" ref="865357229"/> + <reference key="destination" ref="374129197"/> + </object> + <string key="id">636</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">loginButton</string> + <reference key="source" ref="865357229"/> + <reference key="destination" ref="219064696"/> + </object> + <string key="id">637</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">progressView</string> + <reference key="source" ref="865357229"/> + <reference key="destination" ref="109351171"/> + </object> + <string key="id">638</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">window</string> + <reference key="source" ref="865357229"/> + <reference key="destination" ref="168628689"/> + </object> + <string key="id">532</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">dataSource</string> + <reference key="source" ref="351647071"/> + <reference key="destination" ref="1060514328"/> + </object> + <string key="id">597</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="351647071"/> + <reference key="destination" ref="1060514328"/> + </object> + <string key="id">598</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">self.loading</string> + <reference key="source" ref="517423975"/> + <reference key="destination" ref="1060514328"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="517423975"/> + <reference key="NSDestination" ref="1060514328"/> + <string key="NSLabel">hidden: self.loading</string> + <string key="NSBinding">hidden</string> + <string key="NSKeyPath">self.loading</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">694</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">_msgViewController</string> + <reference key="source" ref="1060514328"/> + <reference key="destination" ref="473492163"/> + </object> + <string key="id">608</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">_tableView</string> + <reference key="source" ref="1060514328"/> + <reference key="destination" ref="351647071"/> + </object> + <string key="id">596</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">_messageView</string> + <reference key="source" ref="473492163"/> + <reference key="destination" ref="517423975"/> + </object> + <string key="id">607</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeKeyAndOrderFront:</string> + <reference key="source" ref="619695315"/> + <reference key="destination" ref="811411383"/> + </object> + <string key="id">622</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">initialFirstResponder</string> + <reference key="source" ref="619695315"/> + <reference key="destination" ref="804074654"/> + </object> + <string key="id">654</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">self.login</string> + <reference key="source" ref="804074654"/> + <reference key="destination" ref="865357229"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="804074654"/> + <reference key="NSDestination" ref="865357229"/> + <string key="NSLabel">value: self.login</string> + <string key="NSBinding">value</string> + <string key="NSKeyPath">self.login</string> + <object class="NSDictionary" key="NSOptions"> + <string key="NS.key.0">NSContinuouslyUpdatesValue</string> + <boolean value="YES" key="NS.object.0"/> + </object> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">680</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">self.password</string> + <reference key="source" ref="253763866"/> + <reference key="destination" ref="865357229"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="253763866"/> + <reference key="NSDestination" ref="865357229"/> + <string key="NSLabel">value: self.password</string> + <string key="NSBinding">value</string> + <string key="NSKeyPath">self.password</string> + <object class="NSDictionary" key="NSOptions"> + <string key="NS.key.0">NSContinuouslyUpdatesValue</string> + <boolean value="YES" key="NS.object.0"/> + </object> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">679</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">self.loginEnabled</string> + <reference key="source" ref="219064696"/> + <reference key="destination" ref="865357229"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="219064696"/> + <reference key="NSDestination" ref="865357229"/> + <string key="NSLabel">enabled: self.loginEnabled</string> + <string key="NSBinding">enabled</string> + <string key="NSKeyPath">self.loginEnabled</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">678</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">self.loggingIn</string> + <reference key="source" ref="374129197"/> + <reference key="destination" ref="865357229"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="374129197"/> + <reference key="NSDestination" ref="865357229"/> + <string key="NSLabel">enabled: self.loggingIn</string> + <string key="NSBinding">enabled</string> + <string key="NSKeyPath">self.loggingIn</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">670</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">self.loggingIn</string> + <reference key="source" ref="109351171"/> + <reference key="destination" ref="865357229"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="109351171"/> + <reference key="NSDestination" ref="865357229"/> + <string key="NSLabel">hidden: self.loggingIn</string> + <string key="NSBinding">hidden</string> + <string key="NSKeyPath">self.loggingIn</string> + <object class="NSDictionary" key="NSOptions"> + <string key="NS.key.0">NSValueTransformerName</string> + <string key="NS.object.0">NSNegateBoolean</string> + </object> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">672</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">self.loggingIn</string> + <reference key="source" ref="109351171"/> + <reference key="destination" ref="865357229"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="109351171"/> + <reference key="NSDestination" ref="865357229"/> + <string key="NSLabel">animate: self.loggingIn</string> + <string key="NSBinding">animate</string> + <string key="NSKeyPath">self.loggingIn</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">674</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">values.FetchFullMessageEnabled</string> + <reference key="source" ref="19735575"/> + <reference key="destination" ref="208438053"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="19735575"/> + <reference key="NSDestination" ref="208438053"/> + <string key="NSLabel">value: values.FetchFullMessageEnabled</string> + <string key="NSBinding">value</string> + <string key="NSKeyPath">values.FetchFullMessageEnabled</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">648</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">self.hostname</string> + <reference key="source" ref="172014817"/> + <reference key="destination" ref="865357229"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="172014817"/> + <reference key="NSDestination" ref="865357229"/> + <string key="NSLabel">value: self.hostname</string> + <string key="NSBinding">value</string> + <string key="NSKeyPath">self.hostname</string> + <object class="NSDictionary" key="NSOptions"> + <string key="NS.key.0">NSContinuouslyUpdatesValue</string> + <boolean value="YES" key="NS.object.0"/> + </object> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">686</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">self.loading</string> + <reference key="source" ref="121523904"/> + <reference key="destination" ref="1060514328"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="121523904"/> + <reference key="NSDestination" ref="1060514328"/> + <string key="NSLabel">hidden: self.loading</string> + <string key="NSBinding">hidden</string> + <string key="NSKeyPath">self.loading</string> + <object class="NSDictionary" key="NSOptions"> + <string key="NS.key.0">NSValueTransformerName</string> + <string key="NS.object.0">NSNegateBoolean</string> + </object> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">689</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">self.loading</string> + <reference key="source" ref="121523904"/> + <reference key="destination" ref="1060514328"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="121523904"/> + <reference key="NSDestination" ref="1060514328"/> + <string key="NSLabel">animate: self.loading</string> + <string key="NSBinding">animate</string> + <string key="NSKeyPath">self.loading</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">691</string> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">values.OAuth2Enabled</string> + <reference key="source" ref="848204597"/> + <reference key="destination" ref="208438053"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="848204597"/> + <reference key="NSDestination" ref="208438053"/> + <string key="NSLabel">value: values.OAuth2Enabled</string> + <string key="NSBinding">value</string> + <string key="NSKeyPath">values.OAuth2Enabled</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <string key="id">aLG-X1-MaV</string> + </object> + </array> + <object class="IBMutableOrderedSet" key="objectRecords"> + <array key="orderedObjects"> + <object class="IBObjectRecord"> + <string key="id">0</string> + <array key="object" id="0"/> + <reference key="children" ref="247664261"/> + <nil key="parent"/> + </object> + <object class="IBObjectRecord"> + <string key="id">-2</string> + <reference key="object" ref="917830824"/> + <reference key="parent" ref="0"/> + <string key="objectName">File's Owner</string> + </object> + <object class="IBObjectRecord"> + <string key="id">-1</string> + <reference key="object" ref="226175459"/> + <reference key="parent" ref="0"/> + <string key="objectName">First Responder</string> + </object> + <object class="IBObjectRecord"> + <string key="id">-3</string> + <reference key="object" ref="501673075"/> + <reference key="parent" ref="0"/> + <string key="objectName">Application</string> + </object> + <object class="IBObjectRecord"> + <string key="id">29</string> + <reference key="object" ref="156542226"/> + <array class="NSMutableArray" key="children"> + <reference ref="1007623982"/> + <reference ref="316218839"/> + <reference ref="152802119"/> + <reference ref="532432597"/> + <reference ref="461206755"/> + <reference ref="236821223"/> + </array> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <string key="id">56</string> + <reference key="object" ref="1007623982"/> + <array class="NSMutableArray" key="children"> + <reference ref="639919077"/> + </array> + <reference key="parent" ref="156542226"/> + </object> + <object class="IBObjectRecord"> + <string key="id">57</string> + <reference key="object" ref="639919077"/> + <array class="NSMutableArray" key="children"> + <reference ref="318883175"/> + <reference ref="370312882"/> + <reference ref="53514519"/> + <reference ref="818601752"/> + <reference ref="312882240"/> + <reference ref="393057417"/> + <reference ref="1070900683"/> + <reference ref="490354195"/> + <reference ref="339545896"/> + <reference ref="1020789955"/> + <reference ref="513713155"/> + </array> + <reference key="parent" ref="1007623982"/> + </object> + <object class="IBObjectRecord"> + <string key="id">58</string> + <reference key="object" ref="318883175"/> + <reference key="parent" ref="639919077"/> + </object> + <object class="IBObjectRecord"> + <string key="id">236</string> + <reference key="object" ref="370312882"/> + <reference key="parent" ref="639919077"/> + </object> + <object class="IBObjectRecord"> + <string key="id">129</string> + <reference key="object" ref="53514519"/> + <reference key="parent" ref="639919077"/> + </object> + <object class="IBObjectRecord"> + <string key="id">143</string> + <reference key="object" ref="818601752"/> + <reference key="parent" ref="639919077"/> + </object> + <object class="IBObjectRecord"> + <string key="id">131</string> + <reference key="object" ref="312882240"/> + <array class="NSMutableArray" key="children"> + <reference ref="754807049"/> + </array> + <reference key="parent" ref="639919077"/> + </object> + <object class="IBObjectRecord"> + <string key="id">130</string> + <reference key="object" ref="754807049"/> + <reference key="parent" ref="312882240"/> + </object> + <object class="IBObjectRecord"> + <string key="id">144</string> + <reference key="object" ref="393057417"/> + <reference key="parent" ref="639919077"/> + </object> + <object class="IBObjectRecord"> + <string key="id">134</string> + <reference key="object" ref="1070900683"/> + <reference key="parent" ref="639919077"/> + </object> + <object class="IBObjectRecord"> + <string key="id">145</string> + <reference key="object" ref="490354195"/> + <reference key="parent" ref="639919077"/> + </object> + <object class="IBObjectRecord"> + <string key="id">150</string> + <reference key="object" ref="339545896"/> + <reference key="parent" ref="639919077"/> + </object> + <object class="IBObjectRecord"> + <string key="id">149</string> + <reference key="object" ref="1020789955"/> + <reference key="parent" ref="639919077"/> + </object> + <object class="IBObjectRecord"> + <string key="id">136</string> + <reference key="object" ref="513713155"/> + <reference key="parent" ref="639919077"/> + </object> + <object class="IBObjectRecord"> + <string key="id">83</string> + <reference key="object" ref="316218839"/> + <array class="NSMutableArray" key="children"> + <reference ref="731402223"/> + </array> + <reference key="parent" ref="156542226"/> + </object> + <object class="IBObjectRecord"> + <string key="id">81</string> + <reference key="object" ref="731402223"/> + <array class="NSMutableArray" key="children"> + <reference ref="811411383"/> + <reference ref="19735575"/> + <reference ref="848204597"/> + <reference ref="97156943"/> + <reference ref="747238131"/> + </array> + <reference key="parent" ref="316218839"/> + </object> + <object class="IBObjectRecord"> + <string key="id">609</string> + <reference key="object" ref="811411383"/> + <reference key="parent" ref="731402223"/> + </object> + <object class="IBObjectRecord"> + <string key="id">646</string> + <reference key="object" ref="19735575"/> + <reference key="parent" ref="731402223"/> + </object> + <object class="IBObjectRecord"> + <string key="id">rf2-ay-8rn</string> + <reference key="object" ref="848204597"/> + <reference key="parent" ref="731402223"/> + </object> + <object class="IBObjectRecord"> + <string key="id">79</string> + <reference key="object" ref="97156943"/> + <reference key="parent" ref="731402223"/> + </object> + <object class="IBObjectRecord"> + <string key="id">73</string> + <reference key="object" ref="747238131"/> + <reference key="parent" ref="731402223"/> + </object> + <object class="IBObjectRecord"> + <string key="id">217</string> + <reference key="object" ref="152802119"/> + <array class="NSMutableArray" key="children"> + <reference ref="615426192"/> + </array> + <reference key="parent" ref="156542226"/> + </object> + <object class="IBObjectRecord"> + <string key="id">205</string> + <reference key="object" ref="615426192"/> + <array class="NSMutableArray" key="children"> + <reference ref="1016313181"/> + <reference ref="227532631"/> + <reference ref="483451059"/> + <reference ref="209655843"/> + <reference ref="1050394775"/> + <reference ref="313074668"/> + <reference ref="521063672"/> + <reference ref="971495868"/> + <reference ref="775369925"/> + <reference ref="650120985"/> + <reference ref="52135150"/> + <reference ref="95474493"/> + <reference ref="275143850"/> + <reference ref="234642991"/> + <reference ref="482864853"/> + </array> + <reference key="parent" ref="152802119"/> + </object> + <object class="IBObjectRecord"> + <string key="id">207</string> + <reference key="object" ref="1016313181"/> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">215</string> + <reference key="object" ref="227532631"/> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">206</string> + <reference key="object" ref="483451059"/> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">199</string> + <reference key="object" ref="209655843"/> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">197</string> + <reference key="object" ref="1050394775"/> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">203</string> + <reference key="object" ref="313074668"/> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">485</string> + <reference key="object" ref="521063672"/> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">202</string> + <reference key="object" ref="971495868"/> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">198</string> + <reference key="object" ref="775369925"/> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">214</string> + <reference key="object" ref="650120985"/> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">218</string> + <reference key="object" ref="52135150"/> + <array class="NSMutableArray" key="children"> + <reference ref="42545822"/> + </array> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">220</string> + <reference key="object" ref="42545822"/> + <array class="NSMutableArray" key="children"> + <reference ref="694149498"/> + <reference ref="527134947"/> + <reference ref="499356451"/> + <reference ref="438298453"/> + <reference ref="334216725"/> + <reference ref="888890427"/> + </array> + <reference key="parent" ref="52135150"/> + </object> + <object class="IBObjectRecord"> + <string key="id">209</string> + <reference key="object" ref="694149498"/> + <reference key="parent" ref="42545822"/> + </object> + <object class="IBObjectRecord"> + <string key="id">534</string> + <reference key="object" ref="527134947"/> + <reference key="parent" ref="42545822"/> + </object> + <object class="IBObjectRecord"> + <string key="id">208</string> + <reference key="object" ref="499356451"/> + <reference key="parent" ref="42545822"/> + </object> + <object class="IBObjectRecord"> + <string key="id">213</string> + <reference key="object" ref="438298453"/> + <reference key="parent" ref="42545822"/> + </object> + <object class="IBObjectRecord"> + <string key="id">221</string> + <reference key="object" ref="334216725"/> + <reference key="parent" ref="42545822"/> + </object> + <object class="IBObjectRecord"> + <string key="id">210</string> + <reference key="object" ref="888890427"/> + <reference key="parent" ref="42545822"/> + </object> + <object class="IBObjectRecord"> + <string key="id">216</string> + <reference key="object" ref="95474493"/> + <array class="NSMutableArray" key="children"> + <reference ref="635781614"/> + </array> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">200</string> + <reference key="object" ref="635781614"/> + <array class="NSMutableArray" key="children"> + <reference ref="810097392"/> + <reference ref="276316807"/> + <reference ref="710261109"/> + <reference ref="978881680"/> + <reference ref="598550440"/> + <reference ref="799188927"/> + </array> + <reference key="parent" ref="95474493"/> + </object> + <object class="IBObjectRecord"> + <string key="id">204</string> + <reference key="object" ref="810097392"/> + <reference key="parent" ref="635781614"/> + </object> + <object class="IBObjectRecord"> + <string key="id">201</string> + <reference key="object" ref="276316807"/> + <reference key="parent" ref="635781614"/> + </object> + <object class="IBObjectRecord"> + <string key="id">453</string> + <reference key="object" ref="710261109"/> + <reference key="parent" ref="635781614"/> + </object> + <object class="IBObjectRecord"> + <string key="id">219</string> + <reference key="object" ref="978881680"/> + <reference key="parent" ref="635781614"/> + </object> + <object class="IBObjectRecord"> + <string key="id">346</string> + <reference key="object" ref="598550440"/> + <reference key="parent" ref="635781614"/> + </object> + <object class="IBObjectRecord"> + <string key="id">454</string> + <reference key="object" ref="799188927"/> + <reference key="parent" ref="635781614"/> + </object> + <object class="IBObjectRecord"> + <string key="id">348</string> + <reference key="object" ref="275143850"/> + <array class="NSMutableArray" key="children"> + <reference ref="555537343"/> + </array> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">349</string> + <reference key="object" ref="555537343"/> + <array class="NSMutableArray" key="children"> + <reference ref="178882247"/> + <reference ref="854337306"/> + <reference ref="84020104"/> + <reference ref="227929686"/> + <reference ref="808689713"/> + <reference ref="36796212"/> + <reference ref="541756067"/> + </array> + <reference key="parent" ref="275143850"/> + </object> + <object class="IBObjectRecord"> + <string key="id">457</string> + <reference key="object" ref="178882247"/> + <reference key="parent" ref="555537343"/> + </object> + <object class="IBObjectRecord"> + <string key="id">459</string> + <reference key="object" ref="854337306"/> + <reference key="parent" ref="555537343"/> + </object> + <object class="IBObjectRecord"> + <string key="id">350</string> + <reference key="object" ref="84020104"/> + <reference key="parent" ref="555537343"/> + </object> + <object class="IBObjectRecord"> + <string key="id">351</string> + <reference key="object" ref="227929686"/> + <reference key="parent" ref="555537343"/> + </object> + <object class="IBObjectRecord"> + <string key="id">460</string> + <reference key="object" ref="808689713"/> + <reference key="parent" ref="555537343"/> + </object> + <object class="IBObjectRecord"> + <string key="id">354</string> + <reference key="object" ref="36796212"/> + <reference key="parent" ref="555537343"/> + </object> + <object class="IBObjectRecord"> + <string key="id">462</string> + <reference key="object" ref="541756067"/> + <reference key="parent" ref="555537343"/> + </object> + <object class="IBObjectRecord"> + <string key="id">450</string> + <reference key="object" ref="234642991"/> + <array class="NSMutableArray" key="children"> + <reference ref="68937164"/> + </array> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">451</string> + <reference key="object" ref="68937164"/> + <array class="NSMutableArray" key="children"> + <reference ref="441925809"/> + <reference ref="954892865"/> + <reference ref="886327049"/> + </array> + <reference key="parent" ref="234642991"/> + </object> + <object class="IBObjectRecord"> + <string key="id">452</string> + <reference key="object" ref="441925809"/> + <reference key="parent" ref="68937164"/> + </object> + <object class="IBObjectRecord"> + <string key="id">465</string> + <reference key="object" ref="954892865"/> + <reference key="parent" ref="68937164"/> + </object> + <object class="IBObjectRecord"> + <string key="id">466</string> + <reference key="object" ref="886327049"/> + <reference key="parent" ref="68937164"/> + </object> + <object class="IBObjectRecord"> + <string key="id">211</string> + <reference key="object" ref="482864853"/> + <array class="NSMutableArray" key="children"> + <reference ref="608370105"/> + </array> + <reference key="parent" ref="615426192"/> + </object> + <object class="IBObjectRecord"> + <string key="id">212</string> + <reference key="object" ref="608370105"/> + <array class="NSMutableArray" key="children"> + <reference ref="673123968"/> + <reference ref="807254252"/> + </array> + <reference key="parent" ref="482864853"/> + </object> + <object class="IBObjectRecord"> + <string key="id">196</string> + <reference key="object" ref="673123968"/> + <reference key="parent" ref="608370105"/> + </object> + <object class="IBObjectRecord"> + <string key="id">195</string> + <reference key="object" ref="807254252"/> + <reference key="parent" ref="608370105"/> + </object> + <object class="IBObjectRecord"> + <string key="id">375</string> + <reference key="object" ref="532432597"/> + <array class="NSMutableArray" key="children"> + <reference ref="260180391"/> + </array> + <reference key="parent" ref="156542226"/> + </object> + <object class="IBObjectRecord"> + <string key="id">376</string> + <reference key="object" ref="260180391"/> + <array class="NSMutableArray" key="children"> + <reference ref="469637357"/> + <reference ref="878888798"/> + </array> + <reference key="parent" ref="532432597"/> + </object> + <object class="IBObjectRecord"> + <string key="id">377</string> + <reference key="object" ref="469637357"/> + <array class="NSMutableArray" key="children"> + <reference ref="47695461"/> + </array> + <reference key="parent" ref="260180391"/> + </object> + <object class="IBObjectRecord"> + <string key="id">388</string> + <reference key="object" ref="47695461"/> + <array class="NSMutableArray" key="children"> + <reference ref="435118259"/> + <reference ref="685765258"/> + <reference ref="698764690"/> + <reference ref="581783527"/> + <reference ref="254085646"/> + <reference ref="387393358"/> + <reference ref="182510838"/> + <reference ref="207304917"/> + <reference ref="898621376"/> + <reference ref="462522699"/> + <reference ref="1055508514"/> + <reference ref="72541814"/> + <reference ref="676976671"/> + <reference ref="396402858"/> + <reference ref="626009594"/> + <reference ref="497764422"/> + </array> + <reference key="parent" ref="469637357"/> + </object> + <object class="IBObjectRecord"> + <string key="id">389</string> + <reference key="object" ref="435118259"/> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">390</string> + <reference key="object" ref="685765258"/> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">391</string> + <reference key="object" ref="698764690"/> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">392</string> + <reference key="object" ref="581783527"/> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">393</string> + <reference key="object" ref="254085646"/> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">394</string> + <reference key="object" ref="387393358"/> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">395</string> + <reference key="object" ref="182510838"/> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">396</string> + <reference key="object" ref="207304917"/> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">397</string> + <reference key="object" ref="898621376"/> + <array class="NSMutableArray" key="children"> + <reference ref="982018417"/> + </array> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">415</string> + <reference key="object" ref="982018417"/> + <array class="NSMutableArray" key="children"> + <reference ref="536404927"/> + <reference ref="911624108"/> + <reference ref="924848711"/> + <reference ref="151517909"/> + </array> + <reference key="parent" ref="898621376"/> + </object> + <object class="IBObjectRecord"> + <string key="id">416</string> + <reference key="object" ref="536404927"/> + <reference key="parent" ref="982018417"/> + </object> + <object class="IBObjectRecord"> + <string key="id">417</string> + <reference key="object" ref="911624108"/> + <reference key="parent" ref="982018417"/> + </object> + <object class="IBObjectRecord"> + <string key="id">418</string> + <reference key="object" ref="924848711"/> + <reference key="parent" ref="982018417"/> + </object> + <object class="IBObjectRecord"> + <string key="id">419</string> + <reference key="object" ref="151517909"/> + <reference key="parent" ref="982018417"/> + </object> + <object class="IBObjectRecord"> + <string key="id">398</string> + <reference key="object" ref="462522699"/> + <array class="NSMutableArray" key="children"> + <reference ref="129930375"/> + </array> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">411</string> + <reference key="object" ref="129930375"/> + <array class="NSMutableArray" key="children"> + <reference ref="969057758"/> + <reference ref="666051587"/> + <reference ref="777841351"/> + </array> + <reference key="parent" ref="462522699"/> + </object> + <object class="IBObjectRecord"> + <string key="id">412</string> + <reference key="object" ref="969057758"/> + <reference key="parent" ref="129930375"/> + </object> + <object class="IBObjectRecord"> + <string key="id">413</string> + <reference key="object" ref="666051587"/> + <reference key="parent" ref="129930375"/> + </object> + <object class="IBObjectRecord"> + <string key="id">414</string> + <reference key="object" ref="777841351"/> + <reference key="parent" ref="129930375"/> + </object> + <object class="IBObjectRecord"> + <string key="id">399</string> + <reference key="object" ref="1055508514"/> + <array class="NSMutableArray" key="children"> + <reference ref="183843316"/> + </array> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">405</string> + <reference key="object" ref="183843316"/> + <array class="NSMutableArray" key="children"> + <reference ref="202189202"/> + <reference ref="824638879"/> + <reference ref="927538672"/> + <reference ref="803450754"/> + <reference ref="117597457"/> + </array> + <reference key="parent" ref="1055508514"/> + </object> + <object class="IBObjectRecord"> + <string key="id">406</string> + <reference key="object" ref="202189202"/> + <reference key="parent" ref="183843316"/> + </object> + <object class="IBObjectRecord"> + <string key="id">407</string> + <reference key="object" ref="824638879"/> + <reference key="parent" ref="183843316"/> + </object> + <object class="IBObjectRecord"> + <string key="id">408</string> + <reference key="object" ref="927538672"/> + <reference key="parent" ref="183843316"/> + </object> + <object class="IBObjectRecord"> + <string key="id">409</string> + <reference key="object" ref="803450754"/> + <reference key="parent" ref="183843316"/> + </object> + <object class="IBObjectRecord"> + <string key="id">410</string> + <reference key="object" ref="117597457"/> + <reference key="parent" ref="183843316"/> + </object> + <object class="IBObjectRecord"> + <string key="id">400</string> + <reference key="object" ref="72541814"/> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">401</string> + <reference key="object" ref="676976671"/> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">402</string> + <reference key="object" ref="396402858"/> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">403</string> + <reference key="object" ref="626009594"/> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">404</string> + <reference key="object" ref="497764422"/> + <reference key="parent" ref="47695461"/> + </object> + <object class="IBObjectRecord"> + <string key="id">496</string> + <reference key="object" ref="878888798"/> + <array class="NSMutableArray" key="children"> + <reference ref="954362204"/> + </array> + <reference key="parent" ref="260180391"/> + </object> + <object class="IBObjectRecord"> + <string key="id">497</string> + <reference key="object" ref="954362204"/> + <array class="NSMutableArray" key="children"> + <reference ref="764804144"/> + <reference ref="196388074"/> + <reference ref="394667378"/> + <reference ref="713809051"/> + <reference ref="297983530"/> + <reference ref="225342933"/> + <reference ref="928834455"/> + <reference ref="144988915"/> + <reference ref="6647638"/> + <reference ref="104690072"/> + </array> + <reference key="parent" ref="878888798"/> + </object> + <object class="IBObjectRecord"> + <string key="id">498</string> + <reference key="object" ref="764804144"/> + <reference key="parent" ref="954362204"/> + </object> + <object class="IBObjectRecord"> + <string key="id">499</string> + <reference key="object" ref="196388074"/> + <reference key="parent" ref="954362204"/> + </object> + <object class="IBObjectRecord"> + <string key="id">500</string> + <reference key="object" ref="394667378"/> + <reference key="parent" ref="954362204"/> + </object> + <object class="IBObjectRecord"> + <string key="id">501</string> + <reference key="object" ref="713809051"/> + <reference key="parent" ref="954362204"/> + </object> + <object class="IBObjectRecord"> + <string key="id">502</string> + <reference key="object" ref="297983530"/> + <reference key="parent" ref="954362204"/> + </object> + <object class="IBObjectRecord"> + <string key="id">503</string> + <reference key="object" ref="225342933"/> + <array class="NSMutableArray" key="children"> + <reference ref="138790741"/> + </array> + <reference key="parent" ref="954362204"/> + </object> + <object class="IBObjectRecord"> + <string key="id">508</string> + <reference key="object" ref="138790741"/> + <array class="NSMutableArray" key="children"> + <reference ref="759187287"/> + <reference ref="376824797"/> + <reference ref="285899157"/> + <reference ref="1064243037"/> + <reference ref="462161159"/> + <reference ref="225403515"/> + <reference ref="750952994"/> + <reference ref="504962853"/> + <reference ref="873105336"/> + </array> + <reference key="parent" ref="225342933"/> + </object> + <object class="IBObjectRecord"> + <string key="id">509</string> + <reference key="object" ref="759187287"/> + <reference key="parent" ref="138790741"/> + </object> + <object class="IBObjectRecord"> + <string key="id">510</string> + <reference key="object" ref="376824797"/> + <reference key="parent" ref="138790741"/> + </object> + <object class="IBObjectRecord"> + <string key="id">511</string> + <reference key="object" ref="285899157"/> + <reference key="parent" ref="138790741"/> + </object> + <object class="IBObjectRecord"> + <string key="id">512</string> + <reference key="object" ref="1064243037"/> + <reference key="parent" ref="138790741"/> + </object> + <object class="IBObjectRecord"> + <string key="id">513</string> + <reference key="object" ref="462161159"/> + <reference key="parent" ref="138790741"/> + </object> + <object class="IBObjectRecord"> + <string key="id">514</string> + <reference key="object" ref="225403515"/> + <reference key="parent" ref="138790741"/> + </object> + <object class="IBObjectRecord"> + <string key="id">515</string> + <reference key="object" ref="750952994"/> + <reference key="parent" ref="138790741"/> + </object> + <object class="IBObjectRecord"> + <string key="id">516</string> + <reference key="object" ref="504962853"/> + <reference key="parent" ref="138790741"/> + </object> + <object class="IBObjectRecord"> + <string key="id">517</string> + <reference key="object" ref="873105336"/> + <reference key="parent" ref="138790741"/> + </object> + <object class="IBObjectRecord"> + <string key="id">504</string> + <reference key="object" ref="928834455"/> + <reference key="parent" ref="954362204"/> + </object> + <object class="IBObjectRecord"> + <string key="id">505</string> + <reference key="object" ref="144988915"/> + <reference key="parent" ref="954362204"/> + </object> + <object class="IBObjectRecord"> + <string key="id">506</string> + <reference key="object" ref="6647638"/> + <reference key="parent" ref="954362204"/> + </object> + <object class="IBObjectRecord"> + <string key="id">507</string> + <reference key="object" ref="104690072"/> + <reference key="parent" ref="954362204"/> + </object> + <object class="IBObjectRecord"> + <string key="id">19</string> + <reference key="object" ref="461206755"/> + <array class="NSMutableArray" key="children"> + <reference ref="718553326"/> + </array> + <reference key="parent" ref="156542226"/> + </object> + <object class="IBObjectRecord"> + <string key="id">24</string> + <reference key="object" ref="718553326"/> + <array class="NSMutableArray" key="children"> + <reference ref="250881679"/> + <reference ref="149363329"/> + <reference ref="812700807"/> + <reference ref="27779496"/> + </array> + <reference key="parent" ref="461206755"/> + </object> + <object class="IBObjectRecord"> + <string key="id">23</string> + <reference key="object" ref="250881679"/> + <reference key="parent" ref="718553326"/> + </object> + <object class="IBObjectRecord"> + <string key="id">239</string> + <reference key="object" ref="149363329"/> + <reference key="parent" ref="718553326"/> + </object> + <object class="IBObjectRecord"> + <string key="id">92</string> + <reference key="object" ref="812700807"/> + <reference key="parent" ref="718553326"/> + </object> + <object class="IBObjectRecord"> + <string key="id">5</string> + <reference key="object" ref="27779496"/> + <reference key="parent" ref="718553326"/> + </object> + <object class="IBObjectRecord"> + <string key="id">490</string> + <reference key="object" ref="236821223"/> + <array class="NSMutableArray" key="children"> + <reference ref="84681450"/> + </array> + <reference key="parent" ref="156542226"/> + </object> + <object class="IBObjectRecord"> + <string key="id">491</string> + <reference key="object" ref="84681450"/> + <array class="NSMutableArray" key="children"> + <reference ref="437187475"/> + </array> + <reference key="parent" ref="236821223"/> + </object> + <object class="IBObjectRecord"> + <string key="id">492</string> + <reference key="object" ref="437187475"/> + <reference key="parent" ref="84681450"/> + </object> + <object class="IBObjectRecord"> + <string key="id">371</string> + <reference key="object" ref="168628689"/> + <array class="NSMutableArray" key="children"> + <reference ref="773257948"/> + </array> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <string key="id">372</string> + <reference key="object" ref="773257948"/> + <array class="NSMutableArray" key="children"> + <reference ref="1026693944"/> + <reference ref="517423975"/> + <reference ref="121523904"/> + </array> + <reference key="parent" ref="168628689"/> + </object> + <object class="IBObjectRecord"> + <string key="id">536</string> + <reference key="object" ref="1026693944"/> + <array class="NSMutableArray" key="children"> + <reference ref="706855941"/> + <reference ref="745817006"/> + <reference ref="538629685"/> + <reference ref="351647071"/> + </array> + <reference key="parent" ref="773257948"/> + </object> + <object class="IBObjectRecord"> + <string key="id">538</string> + <reference key="object" ref="706855941"/> + <reference key="parent" ref="1026693944"/> + </object> + <object class="IBObjectRecord"> + <string key="id">540</string> + <reference key="object" ref="745817006"/> + <reference key="parent" ref="1026693944"/> + </object> + <object class="IBObjectRecord"> + <string key="id">539</string> + <reference key="object" ref="538629685"/> + <reference key="parent" ref="1026693944"/> + </object> + <object class="IBObjectRecord"> + <string key="id">573</string> + <reference key="object" ref="517423975"/> + <reference key="parent" ref="773257948"/> + </object> + <object class="IBObjectRecord"> + <string key="id">687</string> + <reference key="object" ref="121523904"/> + <reference key="parent" ref="773257948"/> + </object> + <object class="IBObjectRecord"> + <string key="id">610</string> + <reference key="object" ref="619695315"/> + <array class="NSMutableArray" key="children"> + <reference ref="248538310"/> + </array> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <string key="id">611</string> + <reference key="object" ref="248538310"/> + <array class="NSMutableArray" key="children"> + <reference ref="804074654"/> + <reference ref="345489272"/> + <reference ref="164068726"/> + <reference ref="253763866"/> + <reference ref="219064696"/> + <reference ref="374129197"/> + <reference ref="109351171"/> + <reference ref="172014817"/> + <reference ref="464541668"/> + </array> + <reference key="parent" ref="619695315"/> + </object> + <object class="IBObjectRecord"> + <string key="id">612</string> + <reference key="object" ref="804074654"/> + <array class="NSMutableArray" key="children"> + <reference ref="207021086"/> + </array> + <reference key="parent" ref="248538310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">613</string> + <reference key="object" ref="207021086"/> + <reference key="parent" ref="804074654"/> + </object> + <object class="IBObjectRecord"> + <string key="id">616</string> + <reference key="object" ref="345489272"/> + <array class="NSMutableArray" key="children"> + <reference ref="538284755"/> + </array> + <reference key="parent" ref="248538310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">617</string> + <reference key="object" ref="538284755"/> + <reference key="parent" ref="345489272"/> + </object> + <object class="IBObjectRecord"> + <string key="id">618</string> + <reference key="object" ref="164068726"/> + <array class="NSMutableArray" key="children"> + <reference ref="132014401"/> + </array> + <reference key="parent" ref="248538310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">619</string> + <reference key="object" ref="132014401"/> + <reference key="parent" ref="164068726"/> + </object> + <object class="IBObjectRecord"> + <string key="id">620</string> + <reference key="object" ref="253763866"/> + <array class="NSMutableArray" key="children"> + <reference ref="154067218"/> + </array> + <reference key="parent" ref="248538310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">621</string> + <reference key="object" ref="154067218"/> + <reference key="parent" ref="253763866"/> + </object> + <object class="IBObjectRecord"> + <string key="id">627</string> + <reference key="object" ref="219064696"/> + <array class="NSMutableArray" key="children"> + <reference ref="219347982"/> + </array> + <reference key="parent" ref="248538310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">628</string> + <reference key="object" ref="219347982"/> + <reference key="parent" ref="219064696"/> + </object> + <object class="IBObjectRecord"> + <string key="id">629</string> + <reference key="object" ref="374129197"/> + <array class="NSMutableArray" key="children"> + <reference ref="229170345"/> + </array> + <reference key="parent" ref="248538310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">630</string> + <reference key="object" ref="229170345"/> + <reference key="parent" ref="374129197"/> + </object> + <object class="IBObjectRecord"> + <string key="id">631</string> + <reference key="object" ref="109351171"/> + <reference key="parent" ref="248538310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">681</string> + <reference key="object" ref="172014817"/> + <array class="NSMutableArray" key="children"> + <reference ref="637517278"/> + </array> + <reference key="parent" ref="248538310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">682</string> + <reference key="object" ref="637517278"/> + <reference key="parent" ref="172014817"/> + </object> + <object class="IBObjectRecord"> + <string key="id">684</string> + <reference key="object" ref="464541668"/> + <array class="NSMutableArray" key="children"> + <reference ref="869467967"/> + </array> + <reference key="parent" ref="248538310"/> + </object> + <object class="IBObjectRecord"> + <string key="id">685</string> + <reference key="object" ref="869467967"/> + <reference key="parent" ref="464541668"/> + </object> + <object class="IBObjectRecord"> + <string key="id">494</string> + <reference key="object" ref="865357229"/> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <string key="id">420</string> + <reference key="object" ref="1028722030"/> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <string key="id">594</string> + <reference key="object" ref="1060514328"/> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <string key="id">595</string> + <reference key="object" ref="473492163"/> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <string key="id">623</string> + <reference key="object" ref="208438053"/> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <string key="id">537</string> + <reference key="object" ref="351647071"/> + <array class="NSMutableArray" key="children"> + <reference ref="281302497"/> + </array> + <reference key="parent" ref="1026693944"/> + </object> + <object class="IBObjectRecord"> + <string key="id">541</string> + <reference key="object" ref="281302497"/> + <array class="NSMutableArray" key="children"> + <reference ref="732990771"/> + </array> + <reference key="parent" ref="351647071"/> + </object> + <object class="IBObjectRecord"> + <string key="id">544</string> + <reference key="object" ref="732990771"/> + <reference key="parent" ref="281302497"/> + </object> + </array> + </object> + <dictionary class="NSMutableDictionary" key="flattenedProperties"> + <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="-1.showNotes"/> + <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="-2.showNotes"/> + <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="-3.showNotes"/> + <string key="129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="129.showNotes"/> + <string key="130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="130.showNotes"/> + <string key="131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="131.showNotes"/> + <string key="134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="134.showNotes"/> + <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="136.showNotes"/> + <string key="143.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="143.showNotes"/> + <string key="144.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="144.showNotes"/> + <string key="145.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="145.showNotes"/> + <string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="149.showNotes"/> + <string key="150.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="150.showNotes"/> + <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="19.showNotes"/> + <string key="195.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="195.showNotes"/> + <string key="196.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="196.showNotes"/> + <string key="197.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="197.showNotes"/> + <string key="198.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="198.showNotes"/> + <string key="199.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="199.showNotes"/> + <string key="200.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="200.showNotes"/> + <string key="201.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="201.showNotes"/> + <string key="202.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="202.showNotes"/> + <string key="203.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="203.showNotes"/> + <string key="204.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="204.showNotes"/> + <string key="205.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="205.showNotes"/> + <string key="206.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="206.showNotes"/> + <string key="207.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="207.showNotes"/> + <string key="208.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="208.showNotes"/> + <string key="209.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="209.showNotes"/> + <string key="210.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="210.showNotes"/> + <string key="211.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="211.showNotes"/> + <string key="212.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="212.showNotes"/> + <string key="213.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="213.showNotes"/> + <string key="214.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="214.showNotes"/> + <string key="215.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="215.showNotes"/> + <string key="216.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="216.showNotes"/> + <string key="217.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="217.showNotes"/> + <string key="218.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="218.showNotes"/> + <string key="219.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="219.showNotes"/> + <string key="220.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="220.showNotes"/> + <string key="221.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="221.showNotes"/> + <string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="23.showNotes"/> + <string key="236.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="236.showNotes"/> + <string key="239.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="239.showNotes"/> + <string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="24.showNotes"/> + <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="29.showNotes"/> + <string key="346.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="346.showNotes"/> + <string key="348.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="348.showNotes"/> + <string key="349.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="349.showNotes"/> + <string key="350.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="350.showNotes"/> + <string key="351.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="351.showNotes"/> + <string key="354.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="354.showNotes"/> + <boolean value="NO" key="371.IBNSWindowAutoPositionCentersHorizontal"/> + <boolean value="NO" key="371.IBNSWindowAutoPositionCentersVertical"/> + <string key="371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="YES" key="371.NSWindowTemplate.visibleAtLaunch"/> + <boolean value="NO" key="371.showNotes"/> + <string key="372.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="372.IBUserGuides" ref="0"/> + <boolean value="NO" key="372.showNotes"/> + <string key="375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="375.showNotes"/> + <string key="376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="376.showNotes"/> + <string key="377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="377.showNotes"/> + <string key="388.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="388.showNotes"/> + <string key="389.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="389.showNotes"/> + <string key="390.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="390.showNotes"/> + <string key="391.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="391.showNotes"/> + <string key="392.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="392.showNotes"/> + <string key="393.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="393.showNotes"/> + <string key="394.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="394.showNotes"/> + <string key="395.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="395.showNotes"/> + <string key="396.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="396.showNotes"/> + <string key="397.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="397.showNotes"/> + <string key="398.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="398.showNotes"/> + <string key="399.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="399.showNotes"/> + <string key="400.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="400.showNotes"/> + <string key="401.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="401.showNotes"/> + <string key="402.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="402.showNotes"/> + <string key="403.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="403.showNotes"/> + <string key="404.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="404.showNotes"/> + <string key="405.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="405.showNotes"/> + <string key="406.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="406.showNotes"/> + <string key="407.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="407.showNotes"/> + <string key="408.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="408.showNotes"/> + <string key="409.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="409.showNotes"/> + <string key="410.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="410.showNotes"/> + <string key="411.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="411.showNotes"/> + <string key="412.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="412.showNotes"/> + <string key="413.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="413.showNotes"/> + <string key="414.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="414.showNotes"/> + <string key="415.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="415.showNotes"/> + <string key="416.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="416.showNotes"/> + <string key="417.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="417.showNotes"/> + <string key="418.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="418.showNotes"/> + <string key="419.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="419.showNotes"/> + <string key="420.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="420.showNotes"/> + <string key="450.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="450.showNotes"/> + <string key="451.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="451.showNotes"/> + <string key="452.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="452.showNotes"/> + <string key="453.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="453.showNotes"/> + <string key="454.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="454.showNotes"/> + <string key="457.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="457.showNotes"/> + <string key="459.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="459.showNotes"/> + <string key="460.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="460.showNotes"/> + <string key="462.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="462.showNotes"/> + <string key="465.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="465.showNotes"/> + <string key="466.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="466.showNotes"/> + <string key="485.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="485.showNotes"/> + <string key="490.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="490.showNotes"/> + <string key="491.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="491.showNotes"/> + <string key="492.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="492.showNotes"/> + <string key="494.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="494.showNotes"/> + <string key="496.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="496.showNotes"/> + <string key="497.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="497.showNotes"/> + <string key="498.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="498.showNotes"/> + <string key="499.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="499.showNotes"/> + <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="5.showNotes"/> + <string key="500.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="500.showNotes"/> + <string key="501.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="501.showNotes"/> + <string key="502.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="502.showNotes"/> + <string key="503.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="503.showNotes"/> + <string key="504.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="504.showNotes"/> + <string key="505.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="505.showNotes"/> + <string key="506.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="506.showNotes"/> + <string key="507.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="507.showNotes"/> + <string key="508.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="508.showNotes"/> + <string key="509.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="509.showNotes"/> + <string key="510.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="510.showNotes"/> + <string key="511.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="511.showNotes"/> + <string key="512.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="512.showNotes"/> + <string key="513.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="513.showNotes"/> + <string key="514.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="514.showNotes"/> + <string key="515.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="515.showNotes"/> + <string key="516.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="516.showNotes"/> + <string key="517.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="517.showNotes"/> + <string key="534.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="534.showNotes"/> + <string key="536.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="536.IBUserGuides" ref="0"/> + <boolean value="NO" key="536.showNotes"/> + <string key="537.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="537.IBUserGuides" ref="0"/> + <boolean value="NO" key="537.showNotes"/> + <string key="538.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="538.IBUserGuides" ref="0"/> + <boolean value="NO" key="538.showNotes"/> + <string key="539.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="539.IBUserGuides" ref="0"/> + <boolean value="NO" key="539.showNotes"/> + <string key="540.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="540.IBUserGuides" ref="0"/> + <boolean value="NO" key="540.showNotes"/> + <string key="541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="541.showNotes"/> + <string key="544.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="544.showNotes"/> + <string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="56.showNotes"/> + <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="57.showNotes"/> + <string key="573.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="573.IBUserGuides" ref="0"/> + <boolean value="NO" key="573.showNotes"/> + <string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="58.showNotes"/> + <string key="594.CustomClassName">MCTMsgListViewController</string> + <string key="594.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="594.showNotes"/> + <string key="595.CustomClassName">MCTMsgViewController</string> + <string key="595.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="595.showNotes"/> + <string key="609.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="609.showNotes"/> + <boolean value="YES" key="610.IBNSWindowAutoPositionCentersHorizontal"/> + <boolean value="YES" key="610.IBNSWindowAutoPositionCentersVertical"/> + <string key="610.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="610.showNotes"/> + <string key="611.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="611.IBUserGuides" ref="0"/> + <boolean value="NO" key="611.showNotes"/> + <string key="612.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="612.IBUserGuides" ref="0"/> + <boolean value="NO" key="612.showNotes"/> + <string key="613.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="613.showNotes"/> + <string key="616.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="616.IBUserGuides" ref="0"/> + <boolean value="NO" key="616.showNotes"/> + <string key="617.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="617.showNotes"/> + <string key="618.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="618.IBUserGuides" ref="0"/> + <boolean value="NO" key="618.showNotes"/> + <string key="619.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="619.showNotes"/> + <string key="620.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="620.IBUserGuides" ref="0"/> + <boolean value="NO" key="620.showNotes"/> + <string key="621.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="621.showNotes"/> + <string key="623.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="623.showNotes"/> + <string key="627.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="627.IBUserGuides" ref="0"/> + <boolean value="NO" key="627.showNotes"/> + <string key="628.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="628.showNotes"/> + <string key="629.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="629.IBUserGuides" ref="0"/> + <boolean value="NO" key="629.showNotes"/> + <string key="630.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="630.showNotes"/> + <string key="631.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="631.IBUserGuides" ref="0"/> + <boolean value="NO" key="631.showNotes"/> + <string key="646.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="646.showNotes"/> + <string key="681.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="681.IBUserGuides" ref="0"/> + <boolean value="NO" key="681.showNotes"/> + <string key="682.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="682.showNotes"/> + <string key="684.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="684.IBUserGuides" ref="0"/> + <boolean value="NO" key="684.showNotes"/> + <string key="685.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="685.showNotes"/> + <string key="687.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="687.IBUserGuides" ref="0"/> + <boolean value="NO" key="687.showNotes"/> + <string key="73.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="73.showNotes"/> + <string key="79.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="79.showNotes"/> + <string key="81.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="81.showNotes"/> + <string key="83.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="83.showNotes"/> + <string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="92.showNotes"/> + <string key="rf2-ay-8rn.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="rf2-ay-8rn.showNotes"/> + </dictionary> + <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/> + <nil key="activeLocalization"/> + <dictionary class="NSMutableDictionary" key="localizations"/> + <nil key="sourceID"/> + </object> + <object class="IBClassDescriber" key="IBDocument.Classes"> + <array class="NSMutableArray" key="referencedPartialClassDescriptions"> + <object class="IBPartialClassDescription"> + <string key="className">AppDelegate</string> + <string key="superclassName">UIResponder</string> + <dictionary class="NSMutableDictionary" key="actions"> + <string key="accountCancel:">id</string> + <string key="accountLogin:">id</string> + </dictionary> + <dictionary class="NSMutableDictionary" key="actionInfosByName"> + <object class="IBActionInfo" key="accountCancel:"> + <string key="name">accountCancel:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo" key="accountLogin:"> + <string key="name">accountLogin:</string> + <string key="candidateClassName">id</string> + </object> + </dictionary> + <dictionary class="NSMutableDictionary" key="outlets"> + <string key="_accountWindow">NSWindow</string> + <string key="_msgListViewController">MCTMsgListViewController</string> + </dictionary> + <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> + <object class="IBToOneOutletInfo" key="_accountWindow"> + <string key="name">_accountWindow</string> + <string key="candidateClassName">NSWindow</string> + </object> + <object class="IBToOneOutletInfo" key="_msgListViewController"> + <string key="name">_msgListViewController</string> + <string key="candidateClassName">MCTMsgListViewController</string> + </object> + </dictionary> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">./Classes/AppDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">MCOMessageView</string> + <string key="superclassName">NSView</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">./Classes/MCOMessageView.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">MCTMsgListViewController</string> + <string key="superclassName">NSViewController</string> + <dictionary class="NSMutableDictionary" key="outlets"> + <string key="_msgViewController">MCTMsgViewController</string> + <string key="_tableView">NSTableView</string> + </dictionary> + <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> + <object class="IBToOneOutletInfo" key="_msgViewController"> + <string key="name">_msgViewController</string> + <string key="candidateClassName">MCTMsgViewController</string> + </object> + <object class="IBToOneOutletInfo" key="_tableView"> + <string key="name">_tableView</string> + <string key="candidateClassName">NSTableView</string> + </object> + </dictionary> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">./Classes/MCTMsgListViewController.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">MCTMsgViewController</string> + <string key="superclassName">NSViewController</string> + <object class="NSMutableDictionary" key="outlets"> + <string key="NS.key.0">_messageView</string> + <string key="NS.object.0">MCOMessageView</string> + </object> + <object class="NSMutableDictionary" key="toOneOutletInfosByName"> + <string key="NS.key.0">_messageView</string> + <object class="IBToOneOutletInfo" key="NS.object.0"> + <string key="name">_messageView</string> + <string key="candidateClassName">MCOMessageView</string> + </object> + </object> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">./Classes/MCTMsgViewController.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSTextView</string> + <dictionary class="NSMutableDictionary" key="actions"> + <string key="orderFrontSharingServicePicker:">id</string> + <string key="toggleQuickLookPreviewPanel:">id</string> + </dictionary> + <dictionary class="NSMutableDictionary" key="actionInfosByName"> + <object class="IBActionInfo" key="orderFrontSharingServicePicker:"> + <string key="name">orderFrontSharingServicePicker:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo" key="toggleQuickLookPreviewPanel:"> + <string key="name">toggleQuickLookPreviewPanel:</string> + <string key="candidateClassName">id</string> + </object> + </dictionary> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">./Classes/NSTextView.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">UIResponder</string> + <string key="superclassName">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">./Classes/UIResponder.h</string> + </object> + </object> + </array> + </object> + <int key="IBDocument.localizationMode">0</int> + <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> + <real value="1080" key="NS.object.0"/> + </object> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string> + <integer value="4600" key="NS.object.0"/> + </object> + <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> + <int key="IBDocument.defaultPropertyAccessControl">3</int> + <dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> + <string key="NSMenuCheckmark">{11, 11}</string> + <string key="NSMenuMixedState">{10, 3}</string> + </dictionary> + </data> +</archive> diff --git a/scripts/prepare-ctemplate-ios.sh b/scripts/prepare-ctemplate-ios.sh index 02c2a7b0..50521f57 100755 --- a/scripts/prepare-ctemplate-ios.sh +++ b/scripts/prepare-ctemplate-ios.sh @@ -58,7 +58,6 @@ cd "$srcdir/ctemplate" TOOLCHAIN=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin export CC=$TOOLCHAIN/clang export CXX=$TOOLCHAIN/clang++ -export LDLAGS="-lc++ -isysroot $sysrootpath" sdk="iphoneos$sdkversion" sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$sdkversion.sdk" diff --git a/scripts/prepare-ctemplate-macos.sh b/scripts/prepare-ctemplate-macos.sh index 2e0fdd60..718dd0bc 100755 --- a/scripts/prepare-ctemplate-macos.sh +++ b/scripts/prepare-ctemplate-macos.sh @@ -65,7 +65,6 @@ export CC=clang export CXX=clang++ export CFLAGS="$arch_flags" export CXXFLAGS="-std=c++11 -stdlib=libc++ $arch_flags" -export LDLAGS="-lc++ $arch_flags -isysroot $sysrootpath" ./configure --disable-shared --disable-dependency-tracking >> "$logdir/ctemplate-build.log" #make libctemplate.la >> "$logdir/ctemplate-build.log" #make libctemplate_nothreads.la >> "$logdir/ctemplate-build.log" diff --git a/scripts/prepare-libetpan-ios.sh b/scripts/prepare-libetpan-ios.sh index 5e5684fd..4e4f9d6e 100755 --- a/scripts/prepare-libetpan-ios.sh +++ b/scripts/prepare-libetpan-ios.sh @@ -2,7 +2,7 @@ sdkversion=6.1 url="https://github.com/dinhviethoa/libetpan.git" -rev=20aa2b2b15b6f8db350ec07b6041e4951bb255d0 +rev=3c99ce26d751c168c4e67813e1bedc6a6c4d1c87 pushd `dirname $0` > /dev/null scriptpath=`pwd` diff --git a/scripts/prepare-libetpan-macos.sh b/scripts/prepare-libetpan-macos.sh index e4bc3e82..b932cb0b 100755 --- a/scripts/prepare-libetpan-macos.sh +++ b/scripts/prepare-libetpan-macos.sh @@ -1,7 +1,7 @@ #!/bin/sh url="https://github.com/dinhviethoa/libetpan.git" -rev=20aa2b2b15b6f8db350ec07b6041e4951bb255d0 +rev=3c99ce26d751c168c4e67813e1bedc6a6c4d1c87 pushd `dirname $0` > /dev/null scriptpath=`pwd` diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4d314aea..3c368309 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,6 +6,7 @@ ELSE() ENDIF() set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +include(public-headers) include(core) include(async) include(objc) @@ -16,6 +17,8 @@ IF(APPLE) ${CMAKE_CURRENT_SOURCE_DIR}/../Externals/ctemplate/include ${CMAKE_CURRENT_SOURCE_DIR}/../Externals/icu4c/include ${CMAKE_CURRENT_SOURCE_DIR}/../Externals/libetpan/include + /usr/include/tidy + /usr/include/libxml2 ) set(additional_lib_searchpath @@ -80,6 +83,74 @@ else() endif() +# detect tidy + +find_path(TIDY_INCLUDE_DIR + NAMES tidy/tidy.h + PATHS ${additional_includes} +) +find_library(TIDY_LIBRARY + NAMES tidy + PATHS ${additional_lib_searchpath} +) + +if(NOT TIDY_INCLUDE_DIR OR NOT TIDY_LIBRARY) + message(FATAL_ERROR "ERROR: Could not find tidy") +else() + message(STATUS "Found tidy") +endif() + + +# detect uuid + +find_path(UUID_INCLUDE_DIR + NAMES uuid/uuid.h + PATHS ${additional_includes} +) + +if(NOT UUID_INCLUDE_DIR) + message(FATAL_ERROR "ERROR: Could not find uuid") +else() + message(STATUS "Found uuid") +endif() + + +# detect libxml2 + +find_path(LIBXML_INCLUDE_DIR + NAMES libxml/xmlreader.h + PATHS ${additional_includes} +) +find_library(LIBXML_LIBRARY + NAMES xml2 + PATHS ${additional_lib_searchpath} +) + +if(NOT LIBXML_INCLUDE_DIR OR NOT LIBXML_LIBRARY) + message(FATAL_ERROR "ERROR: Could not find libxml2") +else() + message(STATUS "Found libxml2") +endif() + + +# detect zlib + +find_path(ZLIB_INCLUDE_DIR + NAMES zlib.h + PATHS ${additional_includes} +) +find_library(ZLIB_LIBRARY + NAMES z + PATHS ${additional_lib_searchpath} +) + +if(NOT ZLIB_INCLUDE_DIR OR NOT ZLIB_LIBRARY) + message(FATAL_ERROR "ERROR: Could not find zlib") +else() + message(STATUS "Found zlib") +endif() + + file(GLOB_RECURSE source_files *.h @@ -93,10 +164,7 @@ SET_SOURCE_FILES_PROPERTIES( ) file(COPY - MailCore.h - ${public_headers_objc} - ${public_headers_core} - ${public_headers_async} + ${public_headers} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/include/MailCore diff --git a/src/async/imap/MCAsyncIMAP.h b/src/async/imap/MCAsyncIMAP.h index 1a7a955d..a6bf40d0 100644 --- a/src/async/imap/MCAsyncIMAP.h +++ b/src/async/imap/MCAsyncIMAP.h @@ -28,6 +28,6 @@ #include <MailCore/MCIMAPIdentityOperation.h> #include <MailCore/MCIMAPCapabilityOperation.h> #include <MailCore/MCIMAPOperationCallback.h> - +#include <MailCore/MCIMAPMessageRenderingOperation.h> #endif diff --git a/src/async/imap/MCIMAPAsyncConnection.cc b/src/async/imap/MCIMAPAsyncConnection.cc index 1d07f79a..85c411a8 100644 --- a/src/async/imap/MCIMAPAsyncConnection.cc +++ b/src/async/imap/MCIMAPAsyncConnection.cc @@ -34,6 +34,7 @@ #include "MCIMAPDisconnectOperation.h" #include "MCIMAPAsyncSession.h" #include "MCConnectionLogger.h" +#include "MCIMAPMessageRenderingOperation.h" using namespace mailcore; @@ -592,3 +593,40 @@ void IMAPAsyncConnection::logConnection(ConnectionLogType logType, Data * buffer } pthread_mutex_unlock(&mConnectionLoggerLock); } + +IMAPMessageRenderingOperation * IMAPAsyncConnection::renderingOperation(IMAPMessage * message, + String * folder, + IMAPMessageRenderingType type) +{ + IMAPMessageRenderingOperation * op = new IMAPMessageRenderingOperation(); + op->setSession(this); + op->setMessage(message); + op->setFolder(folder); + op->setRenderingType(type); + op->autorelease(); + return op; +} + +IMAPMessageRenderingOperation * IMAPAsyncConnection::htmlRenderingOperation(IMAPMessage * message, + String * folder) +{ + return renderingOperation(message, folder, IMAPMessageRenderingTypeHTML); +} + +IMAPMessageRenderingOperation * IMAPAsyncConnection::htmlBodyRenderingOperation(IMAPMessage * message, + String * folder) +{ + return renderingOperation(message, folder, IMAPMessageRenderingTypeHTMLBody); +} + +IMAPMessageRenderingOperation * IMAPAsyncConnection::plainTextRenderingOperation(IMAPMessage * message, + String * folder) +{ + return renderingOperation(message, folder, IMAPMessageRenderingTypePlainText); +} + +IMAPMessageRenderingOperation * IMAPAsyncConnection::plainTextBodyRenderingOperation(IMAPMessage * message, + String * folder) +{ + return renderingOperation(message, folder, IMAPMessageRenderingTypePlainTextBody); +} diff --git a/src/async/imap/MCIMAPAsyncConnection.h b/src/async/imap/MCIMAPAsyncConnection.h index 319cc224..45acb707 100644 --- a/src/async/imap/MCIMAPAsyncConnection.h +++ b/src/async/imap/MCIMAPAsyncConnection.h @@ -28,6 +28,8 @@ namespace mailcore { class IMAPOperationQueueCallback; class IMAPAsyncSession; class IMAPConnectionLogger; + class IMAPMessageRenderingOperation; + class IMAPMessage; class IMAPAsyncConnection : public Object { public: @@ -119,6 +121,12 @@ namespace mailcore { virtual IMAPCapabilityOperation * capabilityOperation(); + virtual IMAPMessageRenderingOperation * htmlRenderingOperation(IMAPMessage * message, String * folder); + virtual IMAPMessageRenderingOperation * htmlBodyRenderingOperation(IMAPMessage * message, String * folder); + virtual IMAPMessageRenderingOperation * plainTextRenderingOperation(IMAPMessage * message, String * folder); + virtual IMAPMessageRenderingOperation * plainTextBodyRenderingOperation(IMAPMessage * message, String * folder); + + private: IMAPSession * mSession; OperationQueue * mQueue; @@ -132,6 +140,9 @@ namespace mailcore { pthread_mutex_t mConnectionLoggerLock; virtual void tryAutomaticDisconnectAfterDelay(void * context); + virtual IMAPMessageRenderingOperation * renderingOperation(IMAPMessage * message, + String * folder, + IMAPMessageRenderingType type); public: // private virtual void runOperation(IMAPOperation * operation); diff --git a/src/async/imap/MCIMAPAsyncSession.cc b/src/async/imap/MCIMAPAsyncSession.cc index 6981322e..7aa37d83 100644 --- a/src/async/imap/MCIMAPAsyncSession.cc +++ b/src/async/imap/MCIMAPAsyncSession.cc @@ -1,5 +1,5 @@ // -// MCIMAPAsyncSession.cpp +// MCIMAPAsyncSession.cc // mailcore2 // // Created by DINH Viêt Hoà on 1/17/13. @@ -462,3 +462,31 @@ ConnectionLogger * IMAPAsyncSession::connectionLogger() { return mConnectionLogger; } + +IMAPMessageRenderingOperation * IMAPAsyncSession::htmlRenderingOperation(IMAPMessage * message, + String * folder) +{ + IMAPAsyncConnection * session = sessionForFolder(folder); + return session->htmlRenderingOperation(message, folder); +} + +IMAPMessageRenderingOperation * IMAPAsyncSession::htmlBodyRenderingOperation(IMAPMessage * message, + String * folder) +{ + IMAPAsyncConnection * session = sessionForFolder(folder); + return session->htmlBodyRenderingOperation(message, folder); +} + +IMAPMessageRenderingOperation * IMAPAsyncSession::plainTextRenderingOperation(IMAPMessage * message, + String * folder) +{ + IMAPAsyncConnection * session = sessionForFolder(folder); + return session->plainTextRenderingOperation(message, folder); +} + +IMAPMessageRenderingOperation * IMAPAsyncSession::plainTextBodyRenderingOperation(IMAPMessage * message, + String * folder) +{ + IMAPAsyncConnection * session = sessionForFolder(folder); + return session->plainTextBodyRenderingOperation(message, folder); +}
\ No newline at end of file diff --git a/src/async/imap/MCIMAPAsyncSession.h b/src/async/imap/MCIMAPAsyncSession.h index ae1bbb90..d919493b 100644 --- a/src/async/imap/MCIMAPAsyncSession.h +++ b/src/async/imap/MCIMAPAsyncSession.h @@ -33,6 +33,8 @@ namespace mailcore { class IMAPIdentityOperation; class IMAPAsyncConnection; class IMAPCapabilityOperation; + class IMAPMessageRenderingOperation; + class IMAPMessage; class IMAPAsyncSession : public Object { public: @@ -132,6 +134,11 @@ namespace mailcore { virtual IMAPOperation * checkAccountOperation(); virtual IMAPCapabilityOperation * capabilityOperation(); + + virtual IMAPMessageRenderingOperation * htmlRenderingOperation(IMAPMessage * message, String * folder); + virtual IMAPMessageRenderingOperation * htmlBodyRenderingOperation(IMAPMessage * message, String * folder); + virtual IMAPMessageRenderingOperation * plainTextRenderingOperation(IMAPMessage * message, String * folder); + virtual IMAPMessageRenderingOperation * plainTextBodyRenderingOperation(IMAPMessage * message, String * folder); private: Array * mSessions; diff --git a/src/async/imap/MCIMAPDisconnectOperation.cc b/src/async/imap/MCIMAPDisconnectOperation.cc index 070eeaae..4ee4ee9a 100644 --- a/src/async/imap/MCIMAPDisconnectOperation.cc +++ b/src/async/imap/MCIMAPDisconnectOperation.cc @@ -24,5 +24,5 @@ IMAPDisconnectOperation::~IMAPDisconnectOperation() void IMAPDisconnectOperation::main() { session()->session()->disconnect(); - setError(ErrorCode::ErrorNone); + setError(ErrorNone); } diff --git a/src/async/imap/MCIMAPFetchMessagesOperation.cc b/src/async/imap/MCIMAPFetchMessagesOperation.cc index ece60c66..480f2c1b 100644 --- a/src/async/imap/MCIMAPFetchMessagesOperation.cc +++ b/src/async/imap/MCIMAPFetchMessagesOperation.cc @@ -21,6 +21,7 @@ IMAPFetchMessagesOperation::IMAPFetchMessagesOperation() mMessages = NULL; mVanishedMessages = NULL; mModSequenceValue = 0; + mExtraHeaders = NULL; } IMAPFetchMessagesOperation::~IMAPFetchMessagesOperation() @@ -28,6 +29,7 @@ IMAPFetchMessagesOperation::~IMAPFetchMessagesOperation() MC_SAFE_RELEASE(mIndexes); MC_SAFE_RELEASE(mMessages); MC_SAFE_RELEASE(mVanishedMessages); + MC_SAFE_RELEASE(mExtraHeaders); } void IMAPFetchMessagesOperation::setFetchByUidEnabled(bool enabled) @@ -70,6 +72,14 @@ IMAPMessagesRequestKind IMAPFetchMessagesOperation::kind() return mKind; } +void IMAPFetchMessagesOperation::setExtraHeaders(Array * extraHeaders) { + MC_SAFE_REPLACE_COPY(Array, mExtraHeaders, extraHeaders); +} + +Array * IMAPFetchMessagesOperation::extraHeaders() { + return mExtraHeaders; +} + Array * IMAPFetchMessagesOperation::messages() { return mMessages; @@ -87,18 +97,22 @@ void IMAPFetchMessagesOperation::main() if (mModSequenceValue != 0) { IMAPSyncResult * syncResult; - syncResult = session()->session()->syncMessagesByUID(folder(), mKind, mIndexes, mModSequenceValue, this, &error); + syncResult = session()->session()->syncMessagesByUIDWithExtraHeaders(folder(), mKind, mIndexes, + mModSequenceValue, this, mExtraHeaders, + &error); if (syncResult != NULL) { mMessages = syncResult->modifiedOrAddedMessages(); mVanishedMessages = syncResult->vanishedMessages(); } } else { - mMessages = session()->session()->fetchMessagesByUID(folder(), mKind, mIndexes, this, &error); + mMessages = session()->session()->fetchMessagesByUIDWithExtraHeaders(folder(), mKind, mIndexes, this, + mExtraHeaders, &error); } } else { - mMessages = session()->session()->fetchMessagesByNumber(folder(), mKind, mIndexes, this, &error); + mMessages = session()->session()->fetchMessagesByNumberWithExtraHeaders(folder(), mKind, mIndexes, this, + mExtraHeaders, &error); } MC_SAFE_RETAIN(mMessages); MC_SAFE_RETAIN(mVanishedMessages); diff --git a/src/async/imap/MCIMAPFetchMessagesOperation.h b/src/async/imap/MCIMAPFetchMessagesOperation.h index 64f75bbf..2a57e44c 100644 --- a/src/async/imap/MCIMAPFetchMessagesOperation.h +++ b/src/async/imap/MCIMAPFetchMessagesOperation.h @@ -33,6 +33,9 @@ namespace mailcore { virtual void setKind(IMAPMessagesRequestKind kind); virtual IMAPMessagesRequestKind kind(); + virtual void setExtraHeaders(Array * extraHeaders); + virtual Array * extraHeaders(); + // Result. virtual Array * /* IMAPMessage */ messages(); virtual IndexSet * vanishedMessages(); @@ -44,6 +47,7 @@ namespace mailcore { bool mFetchByUidEnabled; IndexSet * mIndexes; IMAPMessagesRequestKind mKind; + Array * /* String */ mExtraHeaders; Array * /* IMAPMessage */ mMessages; IndexSet * mVanishedMessages; uint64_t mModSequenceValue; diff --git a/src/async/imap/MCIMAPFolderInfoOperation.cc b/src/async/imap/MCIMAPFolderInfoOperation.cc index 20df52ed..c6bba891 100644 --- a/src/async/imap/MCIMAPFolderInfoOperation.cc +++ b/src/async/imap/MCIMAPFolderInfoOperation.cc @@ -56,13 +56,13 @@ void IMAPFolderInfoOperation::main() ErrorCode error; session()->session()->loginIfNeeded(&error); - if (error != ErrorCode::ErrorNone) { + if (error != ErrorNone) { setError(error); return; } session()->session()->select(folder(), &error); - if (error != ErrorCode::ErrorNone) { + if (error != ErrorNone) { setError(error); return; } diff --git a/src/async/imap/MCIMAPFolderStatusOperation.cc b/src/async/imap/MCIMAPFolderStatusOperation.cc index 0ca7d884..22f2797b 100644 --- a/src/async/imap/MCIMAPFolderStatusOperation.cc +++ b/src/async/imap/MCIMAPFolderStatusOperation.cc @@ -29,13 +29,13 @@ void IMAPFolderStatusOperation::main() ErrorCode error; session()->session()->loginIfNeeded(&error); - if (error != ErrorCode::ErrorNone) { + if (error != ErrorNone) { setError(error); return; } IMAPFolderStatus *status = session()->session()->folderStatus(folder(), &error); - if (error != ErrorCode::ErrorNone) { + if (error != ErrorNone) { setError(error); return; } diff --git a/src/async/imap/MCIMAPMessageRenderingOperation.cc b/src/async/imap/MCIMAPMessageRenderingOperation.cc new file mode 100644 index 00000000..e054aa3f --- /dev/null +++ b/src/async/imap/MCIMAPMessageRenderingOperation.cc @@ -0,0 +1,73 @@ +// +// MCIMAPMessageRenderingOperation.cc +// mailcore2 +// +// Created by Paul Young on 27/06/2013. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#include "MCIMAPMessageRenderingOperation.h" + +#include "MCIMAPSession.h" +#include "MCIMAPAsyncConnection.h" + +using namespace mailcore; + +IMAPMessageRenderingOperation::IMAPMessageRenderingOperation() +{ + mMessage = NULL; + mRenderingType = IMAPMessageRenderingTypePlainTextBody; + mResult = NULL; +} + +IMAPMessageRenderingOperation::~IMAPMessageRenderingOperation() +{ + MC_SAFE_RELEASE(mMessage); + MC_SAFE_RELEASE(mResult); +} + +void IMAPMessageRenderingOperation::setRenderingType(IMAPMessageRenderingType type) +{ + mRenderingType = type; +} + +IMAPMessageRenderingType IMAPMessageRenderingOperation::renderingType() +{ + return mRenderingType; +} + +void IMAPMessageRenderingOperation::setMessage(IMAPMessage * message) +{ + MC_SAFE_REPLACE_COPY(IMAPMessage, mMessage, message); +} + +IMAPMessage * IMAPMessageRenderingOperation::message() +{ + return mMessage; +} + +String * IMAPMessageRenderingOperation::result() +{ + return mResult; +} + +void IMAPMessageRenderingOperation::main() +{ + ErrorCode error = ErrorNone; + + if (mRenderingType == IMAPMessageRenderingTypeHTML) { + mResult = session()->session()->htmlRendering(mMessage, folder(), &error); + } + else if (mRenderingType == IMAPMessageRenderingTypeHTMLBody) { + mResult = session()->session()->htmlBodyRendering(mMessage, folder(), &error); + } + else if (mRenderingType == IMAPMessageRenderingTypePlainText) { + mResult = session()->session()->plainTextRendering(mMessage, folder(), &error); + } + else if (mRenderingType == IMAPMessageRenderingTypePlainTextBody) { + mResult = session()->session()->plainTextBodyRendering(mMessage, folder(), &error); + } + + MC_SAFE_RETAIN(mResult); + setError(error); +} diff --git a/src/async/imap/MCIMAPMessageRenderingOperation.h b/src/async/imap/MCIMAPMessageRenderingOperation.h new file mode 100644 index 00000000..9840fd88 --- /dev/null +++ b/src/async/imap/MCIMAPMessageRenderingOperation.h @@ -0,0 +1,47 @@ +// +// MCIMAPMessageRenderingOperation.h +// mailcore2 +// +// Created by Paul Young on 27/06/2013. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef __MAILCORE_MCIMAPMessageRenderingOperation_H_ + +#define __MAILCORE_MCIMAPMessageRenderingOperation_H_ + +#include <MailCore/MCIMAPOperation.h> +#include <MailCore/MCIMAPMessage.h> + +#ifdef __cplusplus + +namespace mailcore { + + class IMAPMessageRenderingOperation : public IMAPOperation { + public: + IMAPMessageRenderingOperation(); + virtual ~IMAPMessageRenderingOperation(); + + virtual void setRenderingType(IMAPMessageRenderingType type); + virtual IMAPMessageRenderingType renderingType(); + + virtual void setMessage(IMAPMessage * message); + virtual IMAPMessage * message(); + + // Result. + virtual String * result(); + + public: // subclass behavior + virtual void main(); + + private: + IMAPMessageRenderingType mRenderingType; + String * mResult; + IMAPMessage * mMessage; + + }; +} + +#endif + +#endif diff --git a/src/async/smtp/MCSMTPDisconnectOperation.cc b/src/async/smtp/MCSMTPDisconnectOperation.cc index 592ceb48..ba20567b 100644 --- a/src/async/smtp/MCSMTPDisconnectOperation.cc +++ b/src/async/smtp/MCSMTPDisconnectOperation.cc @@ -24,5 +24,5 @@ SMTPDisconnectOperation::~SMTPDisconnectOperation() void SMTPDisconnectOperation::main() { session()->session()->disconnect(); - setError(ErrorCode::ErrorNone); + setError(ErrorNone); } diff --git a/src/cmake/async.cmake b/src/cmake/async.cmake index 239d3cce..8b4857ea 100644 --- a/src/cmake/async.cmake +++ b/src/cmake/async.cmake @@ -1,48 +1,3 @@ -# public headers - -set(public_headers_async_imap - async/imap/MCAsyncIMAP.h - async/imap/MCIMAPAppendMessageOperation.h - async/imap/MCIMAPAsyncSession.h - async/imap/MCIMAPCapabilityOperation.h - async/imap/MCIMAPCopyMessagesOperation.h - async/imap/MCIMAPFetchContentOperation.h - async/imap/MCIMAPFetchFoldersOperation.h - async/imap/MCIMAPFetchMessagesOperation.h - async/imap/MCIMAPFetchNamespaceOperation.h - async/imap/MCIMAPFolderInfoOperation.h - async/imap/MCIMAPFolderStatusOperation.h - async/imap/MCIMAPIdentityOperation.h - async/imap/MCIMAPIdleOperation.h - async/imap/MCIMAPOperation.h - async/imap/MCIMAPOperationCallback.h - async/imap/MCIMAPSearchOperation.h -) - -set(public_headers_async_pop - async/pop/MCAsyncPOP.h - async/pop/MCPOPAsyncSession.h - async/pop/MCPOPFetchHeaderOperation.h - async/pop/MCPOPFetchMessageOperation.h - async/pop/MCPOPFetchMessagesOperation.h - async/pop/MCPOPOperation.h - async/pop/MCPOPOperationCallback.h -) - -set(public_headers_async_smtp - async/smtp/MCAsyncSMTP.h - async/smtp/MCSMTPAsyncSession.h - async/smtp/MCSMTPOperation.h - async/smtp/MCSMTPOperationCallback.h -) - -set(public_headers_async - async/MCAsync.h - ${public_headers_async_pop} - ${public_headers_async_smtp} - ${public_headers_async_imap} -) - # Files to build set(async_imap_files @@ -54,14 +9,17 @@ set(async_imap_files async/imap/MCIMAPCopyMessagesOperation.cc async/imap/MCIMAPCreateFolderOperation.cc async/imap/MCIMAPDeleteFolderOperation.cc + async/imap/MCIMAPDisconnectOperation.cc async/imap/MCIMAPExpungeOperation.cc async/imap/MCIMAPFetchContentOperation.cc async/imap/MCIMAPFetchFoldersOperation.cc async/imap/MCIMAPFetchMessagesOperation.cc async/imap/MCIMAPFetchNamespaceOperation.cc async/imap/MCIMAPFolderInfoOperation.cc + async/imap/MCIMAPFolderStatusOperation.cc async/imap/MCIMAPIdentityOperation.cc async/imap/MCIMAPIdleOperation.cc + async/imap/MCIMAPMessageRenderingOperation.cc async/imap/MCIMAPOperation.cc async/imap/MCIMAPRenameFolderOperation.cc async/imap/MCIMAPSearchOperation.cc @@ -83,6 +41,7 @@ set(async_pop_files set(async_smtp_files async/smtp/MCSMTPAsyncSession.cc async/smtp/MCSMTPCheckAccountOperation.cc + async/smtp/MCSMTPDisconnectOperation.cc async/smtp/MCSMTPOperation.cc async/smtp/MCSMTPSendWithDataOperation.cc ) diff --git a/src/cmake/core.cmake b/src/cmake/core.cmake index 24de3963..f2678ad1 100644 --- a/src/cmake/core.cmake +++ b/src/cmake/core.cmake @@ -1,110 +1,3 @@ -# public headers - -set(public_headers_abstract - core/abstract/MCAbstract.h - core/abstract/MCAbstractMessage.h - core/abstract/MCAbstractMessagePart.h - core/abstract/MCAbstractMultipart.h - core/abstract/MCAbstractPart.h - core/abstract/MCAddress.h - core/abstract/MCMessageConstants.h - core/abstract/MCMessageHeader.h -) - -set(public_headers_basetypes - core/basetypes/MCArray.h - core/basetypes/MCAssert.h - core/basetypes/MCAutoreleasePool.h - core/basetypes/MCBaseTypes.h - core/basetypes/MCData.h - core/basetypes/MCHash.h - core/basetypes/MCHashMap.h - core/basetypes/MCHTMLCleaner.h - core/basetypes/MCIndexSet.h - core/basetypes/MCIterator.h - core/basetypes/MCICUTypes.h - core/basetypes/MCJSON.h - core/basetypes/MCLibetpanTypes.h - core/basetypes/MCLog.h - core/basetypes/MCMainThread.h - core/basetypes/MCMD5.h - core/basetypes/MCNull.h - core/basetypes/MCObject.h - core/basetypes/MCOperation.h - core/basetypes/MCOperationCallback.h - core/basetypes/MCOperationQueue.h - core/basetypes/MCRange.h - core/basetypes/MCSet.h - core/basetypes/MCString.h - core/basetypes/MCUtils.h - core/basetypes/MCValue.h -) - -set(public_headers_imap - core/imap/MCIMAP.h - core/imap/MCIMAPFolder.h - core/imap/MCIMAPFolderStatus.h - core/imap/MCIMAPMessage.h - core/imap/MCIMAPMessagePart.h - core/imap/MCIMAPMultipart.h - core/imap/MCIMAPNamespace.h - core/imap/MCIMAPNamespaceItem.h - core/imap/MCIMAPPart.h - core/imap/MCIMAPProgressCallback.h - core/imap/MCIMAPSearchExpression.h - core/imap/MCIMAPSession.h - core/imap/MCIMAPSyncResult.h -) - -set(public_headers_pop - core/pop/MCPOP.h - core/pop/MCPOPMessageInfo.h - core/pop/MCPOPProgressCallback.h - core/pop/MCPOPSession.h -) - -set(public_headers_provider - core/provider/MCMailProvider.h - core/provider/MCMailProvidersManager.h - core/provider/MCNetService.h - core/provider/MCProvider.h -) - -set(public_headers_renderer - core/renderer/MCAddressDisplay.h - core/renderer/MCDateFormatter.h - core/renderer/MCHTMLRendererCallback.h - core/renderer/MCRenderer.h - core/renderer/MCSizeFormatter.h -) - -set(public_headers_rfc822 - core/rfc822/MCAttachment.h - core/rfc822/MCMessageBuilder.h - core/rfc822/MCMessageParser.h - core/rfc822/MCMessagePart.h - core/rfc822/MCMultipart.h - core/rfc822/MCRFC822.h -) - -set(public_headers_smtp - core/smtp/MCSMTP.h - core/smtp/MCSMTPProgressCallback.h - core/smtp/MCSMTPSession.h -) - -set(public_headers_core - core/MCCore.h - ${public_headers_basetypes} - ${public_headers_renderer} - ${public_headers_imap} - ${public_headers_pop} - ${public_headers_smtp} - ${public_headers_abstract} - ${public_headers_rfc822} - ${public_headers_provider} -) - # Files to build set(abstract_files @@ -126,8 +19,9 @@ ENDIF() set(basetypes_files core/basetypes/MCArray.cc - core/basetypes/MCAssert.cc + core/basetypes/MCAssert.c core/basetypes/MCAutoreleasePool.cc + core/basetypes/MCConnectionLoggerUtils.cc core/basetypes/MCData.cc core/basetypes/MCHash.cc core/basetypes/MCHashMap.cc @@ -135,7 +29,8 @@ set(basetypes_files core/basetypes/MCIndexSet.cc core/basetypes/MCJSON.cc core/basetypes/MCJSONParser.cc - core/basetypes/MCLog.cc + core/basetypes/MCLibetpan.cc + core/basetypes/MCLog.c core/basetypes/MCMD5.cc core/basetypes/MCNull.cc core/basetypes/MCObject.cc @@ -176,9 +71,12 @@ set(provider_files set(renderer_files core/renderer/MCAddressDisplay.cc core/renderer/MCDateFormatter.cc + core/renderer/MCHTMLBodyRendererTemplateCallback.cc core/renderer/MCHTMLRenderer.cc core/renderer/MCHTMLRendererCallback.cc + core/renderer/MCHTMLRendererIMAPDataCallback.cc core/renderer/MCSizeFormatter.cc + ) set(rfc822_files @@ -193,6 +91,14 @@ set(smtp_files core/smtp/MCSMTPSession.cc ) +set(zip_files + core/zip/MCZip.cc + core/zip/MiniZip/ioapi.c + core/zip/MiniZip/mztools.c + core/zip/MiniZip/unzip.c + core/zip/MiniZip/zip.c +) + set(core_files ${basetypes_files} ${abstract_files} @@ -201,6 +107,7 @@ set(core_files ${renderer_files} ${rfc822_files} ${smtp_files} + ${zip_files} ) # Includes for build @@ -215,4 +122,6 @@ set(core_includes ${CMAKE_CURRENT_SOURCE_DIR}/core/renderer ${CMAKE_CURRENT_SOURCE_DIR}/core/rfc822 ${CMAKE_CURRENT_SOURCE_DIR}/core/smtp + ${CMAKE_CURRENT_SOURCE_DIR}/core/zip + ${CMAKE_CURRENT_SOURCE_DIR}/core/zip/MiniZip ) diff --git a/src/cmake/gen-public-headers.sh b/src/cmake/gen-public-headers.sh new file mode 100755 index 00000000..1cb591d6 --- /dev/null +++ b/src/cmake/gen-public-headers.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +files="" + +list_headers() +{ + local filename="$1" + + if echo $files | grep "\[$filename\]" >/dev/null ; then + return + fi + + local path="`find . -name $filename`" + echo $path | sed 's/^.\///' + files="$files[$filename]" + subfilenames="`grep '#include <MailCore/' "$path" | sed 's/^#include <MailCore\/\(.*\)>$/\1/'`" + subfilenames+=" " + subfilenames+="`grep '#import <MailCore/' "$path" | sed 's/^#import <MailCore\/\(.*\)>$/\1/'`" + for include_dir in $subfilenames ; do + list_headers $include_dir + done +} + +cd .. +echo 'set(public_headers' +list_headers MailCore.h +echo ')' diff --git a/src/cmake/objc.cmake b/src/cmake/objc.cmake index 72975a1f..57a8c317 100644 --- a/src/cmake/objc.cmake +++ b/src/cmake/objc.cmake @@ -1,105 +1,3 @@ -set(public_headers_objc_abstract - objc/abstract/MCOAbstract.h - objc/abstract/MCOAbstractMessage.h - objc/abstract/MCOAbstractMessagePart.h - objc/abstract/MCOAbstractMultipart.h - objc/abstract/MCOAbstractPart.h - objc/abstract/MCOAddress.h - objc/abstract/MCOConstants.h - objc/abstract/MCOHTMLRendererDelegate.h - objc/abstract/MCOHTMLRendererIMAPDelegate.h - objc/abstract/MCOMessageHeader.h -) - -set(public_headers_objc_imap - objc/imap/MCOIMAP.h - objc/imap/MCOIMAPAppendMessageOperation.h - objc/imap/MCOIMAPBaseOperation.h - objc/imap/MCOIMAPCapabilityOperation.h - objc/imap/MCOIMAPCopyMessagesOperation.h - objc/imap/MCOIMAPFetchContentOperation.h - objc/imap/MCOIMAPFetchFoldersOperation.h - objc/imap/MCOIMAPFetchMessagesOperation.h - objc/imap/MCOIMAPFetchNamespaceOperation.h - objc/imap/MCOIMAPFolder.h - objc/imap/MCOIMAPFolderInfo.h - objc/imap/MCOIMAPFolderInfoOperation.h - objc/imap/MCOIMAPFolderStatus.h - objc/imap/MCOIMAPFolderStatusOperation.h - objc/imap/MCOIMAPIdentityOperation.h - objc/imap/MCOIMAPIdleOperation.h - objc/imap/MCOIMAPMessage.h - objc/imap/MCOIMAPMessagePart.h - objc/imap/MCOIMAPMultipart.h - objc/imap/MCOIMAPNamespace.h - objc/imap/MCOIMAPNamespaceItem.h - objc/imap/MCOIMAPOperation.h - objc/imap/MCOIMAPPart.h - objc/imap/MCOIMAPSearchExpression.h - objc/imap/MCOIMAPSearchOperation.h - objc/imap/MCOIMAPSession.h -) - -set(public_headers_objc_pop - objc/pop/MCOPOP.h - objc/pop/MCOPOPFetchHeaderOperation.h - objc/pop/MCOPOPFetchMessageOperation.h - objc/pop/MCOPOPFetchMessagesOperation.h - objc/pop/MCOPOPMessageInfo.h - objc/pop/MCOPOPOperation.h - objc/pop/MCOPOPSession.h -) - -set(public_headers_objc_provider - objc/provider/MCOProvider.h - objc/provider/MCOMailProvider.h - objc/provider/MCOMailProvidersManager.h - objc/provider/MCONetService.h -) - -set(public_headers_objc_rfc822 - objc/rfc822/MCOAttachment.h - objc/rfc822/MCOMessageBuilder.h - objc/rfc822/MCOMessageParser.h - objc/rfc822/MCOMessagePart.h - objc/rfc822/MCOMultipart.h - objc/rfc822/MCORFC822.h -) - -set(public_headers_objc_smtp - objc/smtp/MCOSMTP.h - objc/smtp/MCOSMTPOperation.h - objc/smtp/MCOSMTPSendOperation.h - objc/smtp/MCOSMTPSession.h -) - -set(public_headers_objc_utils - objc/utils/MCOIndexSet.h - objc/utils/MCOObjectWrapper.h - objc/utils/MCOOperation.h - objc/utils/MCORange.h - objc/utils/MCOUtils.h - objc/utils/NSArray+MCO.h - objc/utils/NSData+MCO.h - objc/utils/NSDictionary+MCO.h - objc/utils/NSError+MCO.h - objc/utils/NSObject+MCO.h - objc/utils/NSString+MCO.h - objc/utils/NSValue+MCO.h -) - -IF(APPLE) -set(public_headers_objc - objc/MCObjC.h - ${public_headers_objc_abstract} - ${public_headers_objc_imap} - ${public_headers_objc_pop} - ${public_headers_objc_rfc822} - ${public_headers_objc_smtp} - ${public_headers_objc_utils} -) -ENDIF() - # Files to build set(async_objc_abstract @@ -130,6 +28,7 @@ set(async_objc_imap objc/imap/MCOIMAPIdleOperation.mm objc/imap/MCOIMAPMessage.mm objc/imap/MCOIMAPMessagePart.mm + objc/imap/MCOIMAPMessageRenderingOperation.mm objc/imap/MCOIMAPMultipart.mm objc/imap/MCOIMAPNamespace.mm objc/imap/MCOIMAPNamespaceItem.mm diff --git a/src/cmake/public-headers.cmake b/src/cmake/public-headers.cmake new file mode 100644 index 00000000..41409f59 --- /dev/null +++ b/src/cmake/public-headers.cmake @@ -0,0 +1,171 @@ +set(public_headers +MailCore.h +core/MCCore.h +core/abstract/MCAbstract.h +core/abstract/MCAbstractMessage.h +core/basetypes/MCBaseTypes.h +core/basetypes/MCAutoreleasePool.h +core/basetypes/MCObject.h +core/basetypes/MCValue.h +core/basetypes/MCString.h +core/basetypes/MCRange.h +core/basetypes/MCICUTypes.h +core/basetypes/MCData.h +core/abstract/MCMessageConstants.h +core/basetypes/MCArray.h +core/basetypes/MCHashMap.h +core/basetypes/MCJSON.h +core/basetypes/MCMD5.h +core/basetypes/MCNull.h +core/basetypes/MCSet.h +core/basetypes/MCHash.h +core/basetypes/MCLog.h +core/basetypes/MCAssert.h +core/basetypes/MCUtils.h +core/basetypes/MCIndexSet.h +core/basetypes/MCOperation.h +core/basetypes/MCOperationQueue.h +core/basetypes/MCLibetpanTypes.h +core/basetypes/MCOperationCallback.h +core/basetypes/MCIterator.h +core/basetypes/MCConnectionLogger.h +core/abstract/MCAbstractMessagePart.h +core/abstract/MCAbstractPart.h +core/abstract/MCAbstractMultipart.h +core/abstract/MCAddress.h +core/abstract/MCMessageHeader.h +core/imap/MCIMAP.h +core/imap/MCIMAPFolder.h +core/imap/MCIMAPMessage.h +core/imap/MCIMAPMessagePart.h +core/imap/MCIMAPMultipart.h +core/imap/MCIMAPNamespace.h +core/imap/MCIMAPNamespaceItem.h +core/imap/MCIMAPPart.h +core/imap/MCIMAPProgressCallback.h +core/imap/MCIMAPSearchExpression.h +core/imap/MCIMAPSession.h +core/imap/MCIMAPSyncResult.h +core/imap/MCIMAPFolderStatus.h +core/pop/MCPOP.h +core/pop/MCPOPMessageInfo.h +core/pop/MCPOPProgressCallback.h +core/pop/MCPOPSession.h +core/rfc822/MCRFC822.h +core/rfc822/MCAttachment.h +core/rfc822/MCMessageBuilder.h +core/rfc822/MCMessageParser.h +core/rfc822/MCMessagePart.h +core/rfc822/MCMultipart.h +core/smtp/MCSMTP.h +core/smtp/MCSMTPProgressCallback.h +core/smtp/MCSMTPSession.h +core/renderer/MCRenderer.h +core/renderer/MCHTMLRendererCallback.h +core/renderer/MCDateFormatter.h +core/renderer/MCAddressDisplay.h +core/provider/MCProvider.h +core/provider/MCMailProvidersManager.h +core/provider/MCMailProvider.h +core/provider/MCNetService.h +async/MCAsync.h +async/smtp/MCAsyncSMTP.h +async/smtp/MCSMTPAsyncSession.h +async/smtp/MCSMTPOperation.h +async/smtp/MCSMTPOperationCallback.h +async/imap/MCAsyncIMAP.h +async/imap/MCIMAPAsyncSession.h +async/imap/MCIMAPOperation.h +async/imap/MCIMAPFetchFoldersOperation.h +async/imap/MCIMAPAppendMessageOperation.h +async/imap/MCIMAPCopyMessagesOperation.h +async/imap/MCIMAPFetchMessagesOperation.h +async/imap/MCIMAPFetchContentOperation.h +async/imap/MCIMAPIdleOperation.h +async/imap/MCIMAPFolderInfoOperation.h +async/imap/MCIMAPFolderStatusOperation.h +async/imap/MCIMAPSearchOperation.h +async/imap/MCIMAPFetchNamespaceOperation.h +async/imap/MCIMAPIdentityOperation.h +async/imap/MCIMAPCapabilityOperation.h +async/imap/MCIMAPOperationCallback.h +async/imap/MCIMAPMessageRenderingOperation.h +async/pop/MCAsyncPOP.h +async/pop/MCPOPAsyncSession.h +async/pop/MCPOPOperation.h +async/pop/MCPOPFetchHeaderOperation.h +async/pop/MCPOPFetchMessageOperation.h +async/pop/MCPOPFetchMessagesOperation.h +async/pop/MCPOPOperationCallback.h +objc/MCObjC.h +objc/utils/MCOUtils.h +objc/utils/MCOObjectWrapper.h +objc/utils/NSData+MCO.h +objc/utils/NSString+MCO.h +objc/utils/NSDictionary+MCO.h +objc/utils/NSArray+MCO.h +objc/utils/NSObject+MCO.h +objc/utils/NSError+MCO.h +objc/utils/NSValue+MCO.h +objc/utils/MCOOperation.h +objc/abstract/MCOConstants.h +objc/utils/MCOIndexSet.h +objc/utils/MCORange.h +objc/abstract/MCOAbstract.h +objc/abstract/MCOAbstractMessage.h +objc/abstract/MCOAbstractMessagePart.h +objc/abstract/MCOAbstractPart.h +objc/abstract/MCOAbstractMultipart.h +objc/abstract/MCOAddress.h +objc/abstract/MCOMessageHeader.h +objc/abstract/MCOHTMLRendererDelegate.h +objc/abstract/MCOHTMLRendererIMAPDelegate.h +objc/imap/MCOIMAP.h +objc/imap/MCOIMAPSession.h +objc/imap/MCOIMAPOperation.h +objc/imap/MCOIMAPBaseOperation.h +objc/imap/MCOIMAPFetchFoldersOperation.h +objc/imap/MCOIMAPFolder.h +objc/imap/MCOIMAPMessage.h +objc/imap/MCOIMAPMessagePart.h +objc/imap/MCOIMAPMultipart.h +objc/imap/MCOIMAPNamespace.h +objc/imap/MCOIMAPNamespaceItem.h +objc/imap/MCOIMAPPart.h +objc/imap/MCOIMAPFolderInfoOperation.h +objc/imap/MCOIMAPFolderInfo.h +objc/imap/MCOIMAPFolderStatusOperation.h +objc/imap/MCOIMAPFolderStatus.h +objc/imap/MCOIMAPAppendMessageOperation.h +objc/imap/MCOIMAPCopyMessagesOperation.h +objc/imap/MCOIMAPFetchMessagesOperation.h +objc/imap/MCOIMAPFetchContentOperation.h +objc/imap/MCOIMAPSearchOperation.h +objc/imap/MCOIMAPIdleOperation.h +objc/imap/MCOIMAPFetchNamespaceOperation.h +objc/imap/MCOIMAPIdentityOperation.h +objc/imap/MCOIMAPCapabilityOperation.h +objc/imap/MCOIMAPSearchExpression.h +objc/imap/MCOIMAPMessageRenderingOperation.h +objc/rfc822/MCORFC822.h +objc/rfc822/MCOAttachment.h +objc/rfc822/MCOMessageBuilder.h +objc/rfc822/MCOMessageParser.h +objc/rfc822/MCOMessagePart.h +objc/rfc822/MCOMultipart.h +objc/pop/MCOPOP.h +objc/pop/MCOPOPSession.h +objc/pop/MCOPOPOperation.h +objc/pop/MCOPOPFetchHeaderOperation.h +objc/pop/MCOPOPFetchMessageOperation.h +objc/pop/MCOPOPFetchMessagesOperation.h +objc/pop/MCOPOPMessageInfo.h +objc/smtp/MCOSMTP.h +objc/smtp/MCOSMTPSession.h +objc/smtp/MCOSMTPSendOperation.h +objc/smtp/MCOSMTPOperation.h +objc/provider/MCOProvider.h +objc/provider/MCONetService.h +objc/provider/MCOMailProvider.h +objc/provider/MCOMailProvidersManager.h +) diff --git a/src/core/abstract/MCMessageConstants.h b/src/core/abstract/MCMessageConstants.h index 9e1b46b7..a245eac3 100644 --- a/src/core/abstract/MCMessageConstants.h +++ b/src/core/abstract/MCMessageConstants.h @@ -68,6 +68,7 @@ namespace mailcore { IMAPMessagesRequestKindGmailLabels = 1 << 6, IMAPMessagesRequestKindGmailMessageID = 1 << 7, IMAPMessagesRequestKindGmailThreadID = 1 << 8, + IMAPMessagesRequestKindExtraHeaders = 1 << 9, }; enum IMAPFetchRequestType { @@ -121,6 +122,7 @@ namespace mailcore { IMAPCapabilityAuthPlain, IMAPCapabilityAuthSKey, IMAPCapabilityAuthSRP, + IMAPCapabilityXOAuth2, }; enum POPCapability { @@ -204,6 +206,7 @@ namespace mailcore { ErrorFetchMessageList, ErrorDeleteMessage, ErrorInvalidAccount, + ErrorFile, }; enum PartType { @@ -213,8 +216,16 @@ namespace mailcore { PartTypeMultipartRelated, PartTypeMultipartAlternative, }; + + // Private type - It should not be used directly. + enum IMAPMessageRenderingType { + IMAPMessageRenderingTypeHTML, + IMAPMessageRenderingTypeHTMLBody, + IMAPMessageRenderingTypePlainText, + IMAPMessageRenderingTypePlainTextBody + }; } #endif -#endif
\ No newline at end of file +#endif diff --git a/src/core/abstract/MCMessageHeader.cc b/src/core/abstract/MCMessageHeader.cc index ac792111..c1ee43f5 100644 --- a/src/core/abstract/MCMessageHeader.cc +++ b/src/core/abstract/MCMessageHeader.cc @@ -45,6 +45,7 @@ MessageHeader::MessageHeader(MessageHeader * other) setDate(other->date()); setReceivedDate(other->receivedDate()); setUserAgent(other->mUserAgent); + setExtraHeaders(other->mExtraHeaders); } void MessageHeader::init(bool generateDate, bool generateMessageID) @@ -62,6 +63,7 @@ void MessageHeader::init(bool generateDate, bool generateMessageID) mDate = (time_t) -1; mReceivedDate = (time_t) -1; mUserAgent = NULL; + mExtraHeaders = NULL; if (generateDate) { time_t date; @@ -113,6 +115,7 @@ MessageHeader::~MessageHeader() MC_SAFE_RELEASE(mReplyTo); MC_SAFE_RELEASE(mSubject); MC_SAFE_RELEASE(mUserAgent); + MC_SAFE_RELEASE(mExtraHeaders); } String * MessageHeader::description() @@ -152,6 +155,11 @@ String * MessageHeader::description() if (mUserAgent != NULL) { result->appendUTF8Format("X-Mailer: %s\n", mUserAgent->UTF8Characters()); } + if (mExtraHeaders != NULL) { + mc_foreachdictionaryKeyAndValue(String, header, String, value, mExtraHeaders) { + result->appendUTF8Format("%s: %s\n", header->UTF8Characters(), value->UTF8Characters()); + } + } result->appendUTF8Format(">"); return result; @@ -292,6 +300,39 @@ String * MessageHeader::userAgent() return mUserAgent; } +void MessageHeader::setExtraHeaders(HashMap * headers) +{ + MC_SAFE_REPLACE_COPY(HashMap, mExtraHeaders, headers); +} + +Array * MessageHeader::allExtraHeadersNames() +{ + if (mExtraHeaders == NULL) + return Array::array(); + return mExtraHeaders->allKeys(); +} + +void MessageHeader::addHeader(String * name, String * object) +{ + if (mExtraHeaders == NULL) + mExtraHeaders = new HashMap(); + mExtraHeaders->setObjectForKey(name, object); +} + +void MessageHeader::removeHeader(String * name) +{ + if (mExtraHeaders == NULL) + return; + mExtraHeaders->removeObjectForKey(name); +} + +String * MessageHeader::headerValueForName(String * name) +{ + if (mExtraHeaders == NULL) + return NULL; + return (String *) mExtraHeaders->objectForKey(name); +} + String * MessageHeader::extractedSubject() { if (subject() == NULL) @@ -313,133 +354,171 @@ void MessageHeader::importHeadersData(Data * data) int r; cur_token = 0; - r = mailimf_fields_parse(data->bytes(), data->length(), &cur_token, &fields); + r = mailimf_envelope_and_optional_fields_parse(data->bytes(), data->length(), &cur_token, &fields); if (r != MAILIMF_NO_ERROR) { return; } importIMFFields(fields); - + mailimf_fields_free(fields); } void MessageHeader::importIMFFields(struct mailimf_fields * fields) { - struct mailimf_single_fields single_fields; - - mailimf_single_fields_init(&single_fields, fields); - - /* date */ - - if (single_fields.fld_orig_date != NULL) { - time_t timestamp; - timestamp = timestamp_from_date(single_fields.fld_orig_date->dt_date_time); - setDate(timestamp); - setReceivedDate(timestamp); - //MCLog("%lu %lu", (unsigned long) timestamp, date()); - } - - /* subject */ - if (single_fields.fld_subject != NULL) { - char * subject; - - subject = single_fields.fld_subject->sbj_value; - setSubject(String::stringByDecodingMIMEHeaderValue(subject)); - } - - /* sender */ - if (single_fields.fld_sender != NULL) { - struct mailimf_mailbox * mb; - Address * address; - - mb = single_fields.fld_sender->snd_mb; - if (mb != NULL) { - address = Address::addressWithIMFMailbox(mb); - setSender(address); - } - } + clistiter * cur; + cur = clist_begin(fields->fld_list); + while (cur != NULL) { + struct mailimf_field * field; + + field = (mailimf_field *)clist_content(cur); + + switch (field->fld_type) { + case MAILIMF_FIELD_ORIG_DATE: + // Set only if date is not set + if (date() == (time_t) -1) { + time_t timestamp; + + timestamp = timestamp_from_date(field->fld_data.fld_orig_date->dt_date_time); + setDate(timestamp); + setReceivedDate(timestamp); + } + break; + case MAILIMF_FIELD_SUBJECT: + // Set only if subject is not set + if (subject() == NULL) { + char * subject; + + subject = field->fld_data.fld_subject->sbj_value; + setSubject(String::stringByDecodingMIMEHeaderValue(subject)); + } + break; + case MAILIMF_FIELD_SENDER: + // Set only if sender is not set + if (sender() == NULL) { + struct mailimf_mailbox * mb; + Address * address; + + mb = field->fld_data.fld_sender->snd_mb; + if (mb != NULL) { + address = Address::addressWithIMFMailbox(mb); + setSender(address); + } + } + break; + case MAILIMF_FIELD_FROM: + // Set only if from is not set + if (from() == NULL) { + struct mailimf_mailbox_list * mb_list; + Array * addresses; + + mb_list = field->fld_data.fld_from->frm_mb_list; + addresses = lep_address_list_from_lep_mailbox(mb_list); + if (addresses->count() > 0) { + setFrom((Address *) (addresses->objectAtIndex(0))); + } + } + break; + case MAILIMF_FIELD_REPLY_TO: + // Set only if reply-to is not set + if (replyTo() == NULL) { + struct mailimf_address_list * addr_list; + Array * addresses; + + addr_list = field->fld_data.fld_reply_to->rt_addr_list; + addresses = lep_address_list_from_lep_addr(addr_list); + setReplyTo(addresses); + } + break; + case MAILIMF_FIELD_TO: + // Set only if to is not set + if (to() == NULL) { + struct mailimf_address_list * addr_list; + Array * addresses; + + addr_list = field->fld_data.fld_to->to_addr_list; + addresses = lep_address_list_from_lep_addr(addr_list); + setTo(addresses); + } + break; + case MAILIMF_FIELD_CC: + // Set only if cc is not set + if (cc() == NULL) { + struct mailimf_address_list * addr_list; + Array * addresses; + + addr_list = field->fld_data.fld_cc->cc_addr_list; + addresses = lep_address_list_from_lep_addr(addr_list); + setCc(addresses); + } + break; + case MAILIMF_FIELD_BCC: + // Set only if bcc is not set + if (bcc() == NULL) { + struct mailimf_address_list * addr_list; + Array * addresses; + + addr_list = field->fld_data.fld_bcc->bcc_addr_list; + addresses = lep_address_list_from_lep_addr(addr_list); + setBcc(addresses); + } + break; + case MAILIMF_FIELD_MESSAGE_ID: + // message-id has a default value set by the constructor, so we can't check for NULL here + char * msgid; + String * str; + + msgid = field->fld_data.fld_message_id->mid_value; + str = String::stringWithUTF8Characters(msgid); + setMessageID(str); + break; + case MAILIMF_FIELD_REFERENCES: + // Set only if references is not set + if (references() == NULL) { + clist * msg_id_list; + Array * msgids; + + msg_id_list = field->fld_data.fld_references->mid_list; + msgids = msg_id_to_string_array(msg_id_list); + setReferences(msgids); + } + break; + case MAILIMF_FIELD_IN_REPLY_TO: + // Set only if in-reply-to is not set + if (inReplyTo() == NULL) { + clist * msg_id_list; + Array * msgids; + + msg_id_list = field->fld_data.fld_references->mid_list; + msgids = msg_id_to_string_array(msg_id_list); + setReferences(msgids); + } + break; + case MAILIMF_FIELD_OPTIONAL_FIELD: + char * fieldName; + String * fieldNameStr; + + fieldName = field->fld_data.fld_optional_field->fld_name; + fieldNameStr = String::stringWithUTF8Characters(fieldName); + // Set only if this optional-field is not set + if (headerValueForName(fieldNameStr) == NULL) { + char * fieldValue; + String * fieldValueStr; + + fieldValue = field->fld_data.fld_optional_field->fld_value; + fieldValueStr = String::stringWithUTF8Characters(fieldValue); + addHeader(fieldNameStr, fieldValueStr); + } + break; + default: + // It won't happen with mailimf_envelope_and_optional_fields_parse(). + MCAssert(0); + break; + } + cur = clist_next(cur); + - /* from */ - if (single_fields.fld_from != NULL) { - struct mailimf_mailbox_list * mb_list; - Array * addresses; - - mb_list = single_fields.fld_from->frm_mb_list; - addresses = lep_address_list_from_lep_mailbox(mb_list); - if (addresses->count() > 0) { - setFrom((Address *) (addresses->objectAtIndex(0))); - } - } - - /* replyto */ - if (single_fields.fld_reply_to != NULL) { - struct mailimf_address_list * addr_list; - Array * addresses; - - addr_list = single_fields.fld_reply_to->rt_addr_list; - addresses = lep_address_list_from_lep_addr(addr_list); - setReplyTo(addresses); - } - - /* to */ - if (single_fields.fld_to != NULL) { - struct mailimf_address_list * addr_list; - Array * addresses; - - addr_list = single_fields.fld_to->to_addr_list; - addresses = lep_address_list_from_lep_addr(addr_list); - setTo(addresses); - } - - /* cc */ - if (single_fields.fld_cc != NULL) { - struct mailimf_address_list * addr_list; - Array * addresses; - - addr_list = single_fields.fld_cc->cc_addr_list; - addresses = lep_address_list_from_lep_addr(addr_list); - setCc(addresses); - } - - /* bcc */ - if (single_fields.fld_bcc != NULL) { - struct mailimf_address_list * addr_list; - Array * addresses; - - addr_list = single_fields.fld_bcc->bcc_addr_list; - addresses = lep_address_list_from_lep_addr(addr_list); - setBcc(addresses); - } - - /* msgid */ - if (single_fields.fld_message_id != NULL) { - char * msgid; - String * str; - - msgid = single_fields.fld_message_id->mid_value; - str = String::stringWithUTF8Characters(msgid); - setMessageID(str); - } - - /* references */ - if (single_fields.fld_references != NULL) { - clist * msg_id_list; - Array * msgids; - - msg_id_list = single_fields.fld_references->mid_list; - msgids = msg_id_to_string_array(msg_id_list); - setReferences(msgids); - } - - /* inreplyto */ - if (single_fields.fld_in_reply_to != NULL) { - clist * msg_id_list; - Array * msgids; - - msg_id_list = single_fields.fld_in_reply_to->mid_list; - msgids = msg_id_to_string_array(msg_id_list); - setInReplyTo(msgids); - } + } } static time_t timestamp_from_date(struct mailimf_date_time * date_time) @@ -822,6 +901,15 @@ struct mailimf_fields * MessageHeader::createIMFFieldsAndFilterBcc(bool filterBc field = mailimf_field_new_custom(strdup("X-Mailer"), strdup(mUserAgent->UTF8Characters())); mailimf_fields_add(fields, field); } + + if (mExtraHeaders != NULL) { + mc_foreachdictionaryKeyAndValue(String, header, String, value, mExtraHeaders) { + struct mailimf_field * field; + + field = mailimf_field_new_custom(strdup(header->UTF8Characters()), strdup(value->UTF8Characters())); + mailimf_fields_add(fields, field); + } + } return fields; } diff --git a/src/core/abstract/MCMessageHeader.h b/src/core/abstract/MCMessageHeader.h index f90c1c2d..8da5f980 100644 --- a/src/core/abstract/MCMessageHeader.h +++ b/src/core/abstract/MCMessageHeader.h @@ -8,91 +8,98 @@ #ifdef __cplusplus namespace mailcore { - - class Address; - - class MessageHeader : public Object { - public: - MessageHeader(); - virtual ~MessageHeader(); - - virtual void setMessageID(String * messageID); - virtual String * messageID(); - - virtual void setReferences(Array * /* String */ references); - virtual Array * /* String */ references(); - - virtual void setInReplyTo(Array * /* String */ inReplyTo); - virtual Array * /* String */ inReplyTo(); - - virtual void setDate(time_t date); - virtual time_t date(); - - virtual void setReceivedDate(time_t date); - virtual time_t receivedDate(); - - virtual void setSender(Address * sender); - virtual Address * sender(); - - virtual void setFrom(Address * from); - virtual Address * from(); - - virtual void setTo(Array * /* Address */ to); - virtual Array * /* Address */ to(); - - virtual void setCc(Array * /* Address */ cc); - virtual Array * /* Address */ cc(); - - virtual void setBcc(Array * /* Address */ bcc); - virtual Array * /* Address */ bcc(); - - virtual void setReplyTo(Array * /* Address */ replyTo); - virtual Array * /* Address */ replyTo(); - - virtual void setSubject(String * subject); - virtual String * subject(); - - virtual void setUserAgent(String * userAgent); - virtual String * userAgent(); - - virtual String * extractedSubject(); - virtual String * partialExtractedSubject(); - virtual void importHeadersData(Data * data); - + + class Address; + + class MessageHeader : public Object { + public: + MessageHeader(); + virtual ~MessageHeader(); + + virtual void setMessageID(String * messageID); + virtual String * messageID(); + + virtual void setReferences(Array * /* String */ references); + virtual Array * /* String */ references(); + + virtual void setInReplyTo(Array * /* String */ inReplyTo); + virtual Array * /* String */ inReplyTo(); + + virtual void setDate(time_t date); + virtual time_t date(); + + virtual void setReceivedDate(time_t date); + virtual time_t receivedDate(); + + virtual void setSender(Address * sender); + virtual Address * sender(); + + virtual void setFrom(Address * from); + virtual Address * from(); + + virtual void setTo(Array * /* Address */ to); + virtual Array * /* Address */ to(); + + virtual void setCc(Array * /* Address */ cc); + virtual Array * /* Address */ cc(); + + virtual void setBcc(Array * /* Address */ bcc); + virtual Array * /* Address */ bcc(); + + virtual void setReplyTo(Array * /* Address */ replyTo); + virtual Array * /* Address */ replyTo(); + + virtual void setSubject(String * subject); + virtual String * subject(); + + virtual void setUserAgent(String * userAgent); + virtual String * userAgent(); + + virtual void addHeader(String *name, String * value); + virtual void removeHeader(String *name); + virtual String * headerValueForName(String *name); + virtual Array * allExtraHeadersNames(); + + String * extractedSubject(); + virtual String * partialExtractedSubject(); + virtual void importHeadersData(Data * data); + virtual MessageHeader * replyHeader(bool replyAll, Array * addressesExcludedFromRecipient); virtual MessageHeader * forwardHeader(); - + public: // subclass behavior - MessageHeader(MessageHeader * other); - virtual String * description(); - virtual Object * copy(); - + MessageHeader(MessageHeader * other); + virtual String * description(); + virtual Object * copy(); + public: // private - virtual void importIMAPEnvelope(struct mailimap_envelope * env); - virtual void importIMAPReferences(Data * data); - virtual void importIMAPInternalDate(struct mailimap_date_time * date); - - virtual struct mailimf_fields * createIMFFieldsAndFilterBcc(bool filterBcc); - virtual void importIMFFields(struct mailimf_fields * fields); - - private: - String * mMessageID; - Array * /* String */ mReferences; - Array * /* String */ mInReplyTo; - Address * mSender; - Address * mFrom; - Array * /* Address */ mTo; - Array * /* Address */ mCc; - Array * /* Address */ mBcc; - Array * /* Address */ mReplyTo; - String * mSubject; - time_t mDate; - time_t mReceivedDate; - String * mUserAgent; - void init(bool generateDate, bool generateMessageID); + virtual void importIMAPEnvelope(struct mailimap_envelope * env); + virtual void importIMAPReferences(Data * data); + virtual void importIMAPInternalDate(struct mailimap_date_time * date); + + virtual struct mailimf_fields * createIMFFieldsAndFilterBcc(bool filterBcc); + virtual void importIMFFields(struct mailimf_fields * fields); + + private: + String * mMessageID; + Array * /* String */ mReferences; + Array * /* String */ mInReplyTo; + Address * mSender; + Address * mFrom; + Array * /* Address */ mTo; + Array * /* Address */ mCc; + Array * /* Address */ mBcc; + Array * /* Address */ mReplyTo; + String * mSubject; + time_t mDate; + time_t mReceivedDate; + String * mUserAgent; + HashMap * mExtraHeaders; + void init(bool generateDate, bool generateMessageID); + void setExtraHeaders(HashMap *headers); Array * recipientWithReplyAll(bool replyAll, bool includeTo, bool includeCc, Array * senderEmails); - }; - + }; + } #endif diff --git a/src/core/basetypes/MCLibetpan.cpp b/src/core/basetypes/MCLibetpan.cc index c8258cc2..5da4452b 100644 --- a/src/core/basetypes/MCLibetpan.cpp +++ b/src/core/basetypes/MCLibetpan.cc @@ -12,5 +12,6 @@ __attribute__((constructor)) static void initialize() { + // It will enable CFStream on platforms that supports it. mailstream_cfstream_enabled = 1; } diff --git a/src/core/basetypes/MCString.cc b/src/core/basetypes/MCString.cc index 034e3299..badf1425 100644 --- a/src/core/basetypes/MCString.cc +++ b/src/core/basetypes/MCString.cc @@ -1127,8 +1127,15 @@ String * String::uppercaseString() void String::appendBytes(const char * bytes, unsigned int length, const char * charset) { #if __APPLE__ - CFStringRef encodingName = CFStringCreateWithCString(NULL, charset, kCFStringEncodingUTF8); - CFStringEncoding encoding = CFStringConvertIANACharSetNameToEncoding(encodingName); + CFStringEncoding encoding; + if (strcasecmp(charset, "mutf-7") == 0) { + encoding = kCFStringEncodingUTF7_IMAP; + } + else { + CFStringRef encodingName = CFStringCreateWithCString(NULL, charset, kCFStringEncodingUTF8); + encoding = CFStringConvertIANACharSetNameToEncoding(encodingName); + CFRelease(encodingName); + } CFStringRef cfStr = CFStringCreateWithBytes(NULL, (const UInt8 *) bytes, (CFIndex) length, encoding, false); if (cfStr != NULL) { CFDataRef data = CFStringCreateExternalRepresentation(NULL, cfStr, kCFStringEncodingUTF16LE, '_'); @@ -1138,7 +1145,6 @@ void String::appendBytes(const char * bytes, unsigned int length, const char * c } CFRelease(cfStr); } - CFRelease(encodingName); #else UErrorCode err; @@ -1913,6 +1919,13 @@ String * String::stringByAppendingPathComponent(String * component) return result; } +String * String::stringByDeletingLastPathComponent() +{ + String * component = lastPathComponent(); + String * result = (String *) this->copy()->autorelease(); + result->deleteCharactersInRange(RangeMake(result->length() - component->length(), component->length())); + return result; +} Array * String::componentsSeparatedByString(String * separator) { diff --git a/src/core/basetypes/MCString.h b/src/core/basetypes/MCString.h index e6c6ce5d..f06a429f 100644 --- a/src/core/basetypes/MCString.h +++ b/src/core/basetypes/MCString.h @@ -50,7 +50,8 @@ namespace mailcore { virtual String * stringByAppendingUTF8Characters(const char * UTF8Characters); virtual String * stringByAppendingCharacters(const UChar * unicodeCharacters); virtual String * stringByAppendingPathComponent(String * component); - + virtual String * stringByDeletingLastPathComponent(); + virtual int compare(String * otherString); virtual int caseInsensitiveCompare(String * otherString); virtual String * lowercaseString(); diff --git a/src/core/imap/MCIMAPNamespace.cc b/src/core/imap/MCIMAPNamespace.cc index f087d87d..1cfa5a3a 100644 --- a/src/core/imap/MCIMAPNamespace.cc +++ b/src/core/imap/MCIMAPNamespace.cc @@ -93,12 +93,17 @@ String * IMAPNamespace::pathForComponents(Array * components) String * IMAPNamespace::pathForComponentsAndPrefix(Array * components, String * prefix) { - return itemForPath(prefix)->pathForComponents(components); + IMAPNamespaceItem * item = itemForPath(prefix); + if (item == NULL) + return NULL; + return item->pathForComponents(components); } Array * IMAPNamespace::componentsFromPath(String * path) { IMAPNamespaceItem * item = itemForPath(path); + if (item == NULL) + return NULL; return item->componentsForPath(path); } diff --git a/src/core/imap/MCIMAPSession.cc b/src/core/imap/MCIMAPSession.cc index e013ac75..002fbe20 100644 --- a/src/core/imap/MCIMAPSession.cc +++ b/src/core/imap/MCIMAPSession.cc @@ -16,6 +16,11 @@ #include "MCIMAPFolderStatus.h" #include "MCConnectionLogger.h" #include "MCConnectionLoggerUtils.h" +#include "MCHTMLRenderer.h" +#include "MCString.h" +#include "MCUtils.h" +#include "MCHTMLRendererIMAPDataCallback.h" +#include "MCHTMLBodyRendererTemplateCallback.h" using namespace mailcore; @@ -482,7 +487,7 @@ static bool hasError(int errorCode) bool IMAPSession::checkCertificate() { -#warning check certificate + //TODO check certificate return true; } @@ -1717,7 +1722,8 @@ static void msg_att_handler(struct mailimap_msg_att * msg_att, void * context) hasHeader = true; } else if (att_static->att_type == MAILIMAP_MSG_ATT_BODY_SECTION) { - if ((requestKind & IMAPMessagesRequestKindFullHeaders) != 0) { + if ((requestKind & IMAPMessagesRequestKindFullHeaders) != 0 || + (requestKind & IMAPMessagesRequestKindExtraHeaders) != 0) { char * bytes; size_t length; @@ -1844,7 +1850,7 @@ static void msg_att_handler(struct mailimap_msg_att * msg_att, void * context) IMAPSyncResult * IMAPSession::fetchMessages(String * folder, IMAPMessagesRequestKind requestKind, bool fetchByUID, struct mailimap_set * imapset, uint64_t modseq, HashMap * mapping, uint32_t startUid, - IMAPProgressCallback * progressCallback, ErrorCode * pError) + IMAPProgressCallback * progressCallback, Array * extraHeaders, ErrorCode * pError) { struct mailimap_fetch_type * fetch_type; clist * fetch_result; @@ -1864,10 +1870,13 @@ IMAPSyncResult * IMAPSession::fetchMessages(String * folder, IMAPMessagesRequest if (* pError != ErrorNone) return NULL; - if (mNeedsMboxMailWorkaround) { + if (mNeedsMboxMailWorkaround && ((requestKind & IMAPMessagesRequestKindHeaders) != 0)) { requestKind = (IMAPMessagesRequestKind) (requestKind & ~IMAPMessagesRequestKindHeaders); requestKind = (IMAPMessagesRequestKind) (requestKind | IMAPMessagesRequestKindFullHeaders); } + if (extraHeaders != NULL) { + requestKind = (IMAPMessagesRequestKind) (requestKind | IMAPMessagesRequestKindExtraHeaders); + } if ((requestKind & IMAPMessagesRequestKindHeaders) != 0) { mProgressItemsCount = 0; @@ -1981,6 +1990,28 @@ IMAPSyncResult * IMAPSession::fetchMessages(String * folder, IMAPMessagesRequest fetch_att = mailimap_fetch_att_new_internaldate(); mailimap_fetch_type_new_fetch_att_list_add(fetch_type, fetch_att); } + if ((requestKind & IMAPMessagesRequestKindExtraHeaders) != 0) { + // custom header request + clist * hdrlist; + char * header; + struct mailimap_header_list * imap_hdrlist; + struct mailimap_section * section; + + if (extraHeaders && extraHeaders->count() > 0) { + hdrlist = clist_new(); + for (unsigned int i = 0; i < extraHeaders->count(); i++) { + String *headerString = (String *)extraHeaders->objectAtIndex(i); + header = strdup(headerString->UTF8Characters()); + clist_append(hdrlist, header); + } + + imap_hdrlist = mailimap_header_list_new(hdrlist); + section = mailimap_section_new_header_fields(imap_hdrlist); + fetch_att = mailimap_fetch_att_new_body_peek_section(section); + mailimap_fetch_type_new_fetch_att_list_add(fetch_type, fetch_att); + needsHeader = true; + } + } struct msg_att_handler_data msg_att_data; @@ -2081,7 +2112,7 @@ IMAPSyncResult * IMAPSession::fetchMessages(String * folder, IMAPMessagesRequest requestKind = (IMAPMessagesRequestKind) (requestKind | IMAPMessagesRequestKindFullHeaders); result = fetchMessages(folder, requestKind, fetchByUID, - imapset, modseq, NULL, startUid, progressCallback, pError); + imapset, modseq, NULL, startUid, progressCallback, extraHeaders, pError); if (result != NULL) { if (result->modifiedOrAddedMessages() != NULL) { if (result->modifiedOrAddedMessages()->count() > 0) { @@ -2102,9 +2133,17 @@ IMAPSyncResult * IMAPSession::fetchMessages(String * folder, IMAPMessagesRequest Array * IMAPSession::fetchMessagesByUID(String * folder, IMAPMessagesRequestKind requestKind, IndexSet * uids, IMAPProgressCallback * progressCallback, ErrorCode * pError) { + return fetchMessagesByUIDWithExtraHeaders(folder, requestKind, uids, progressCallback, NULL, pError); +} + + +Array * IMAPSession::fetchMessagesByUIDWithExtraHeaders(String * folder, IMAPMessagesRequestKind requestKind, + IndexSet * uids, IMAPProgressCallback * progressCallback, + Array * extraHeaders, ErrorCode * pError) +{ struct mailimap_set * imapset = setFromIndexSet(uids); IMAPSyncResult * syncResult = fetchMessages(folder, requestKind, true, imapset, 0, NULL, 0, - progressCallback, pError); + progressCallback, extraHeaders, pError); if (syncResult == NULL) return NULL; Array * result = syncResult->modifiedOrAddedMessages(); @@ -2114,11 +2153,19 @@ Array * IMAPSession::fetchMessagesByUID(String * folder, IMAPMessagesRequestKind } Array * IMAPSession::fetchMessagesByNumber(String * folder, IMAPMessagesRequestKind requestKind, - IndexSet * numbers, IMAPProgressCallback * progressCallback, ErrorCode * pError) + IndexSet * numbers, IMAPProgressCallback * progressCallback, + ErrorCode * pError) +{ + return fetchMessagesByNumberWithExtraHeaders(folder, requestKind, numbers, progressCallback, NULL, pError); +} + +Array * IMAPSession::fetchMessagesByNumberWithExtraHeaders(String * folder, IMAPMessagesRequestKind requestKind, + IndexSet * numbers, IMAPProgressCallback * progressCallback, + Array * extraHeaders, ErrorCode * pError) { struct mailimap_set * imapset = setFromIndexSet(numbers); IMAPSyncResult * syncResult = fetchMessages(folder, requestKind, false, imapset, 0, NULL, 0, - progressCallback, pError); + progressCallback, extraHeaders, pError); if (syncResult == NULL) return NULL; Array * result = syncResult->modifiedOrAddedMessages(); @@ -2911,13 +2958,22 @@ IMAPSyncResult * IMAPSession::syncMessagesByUID(String * folder, IMAPMessagesReq IndexSet * uids, uint64_t modseq, IMAPProgressCallback * progressCallback, ErrorCode * pError) { + return syncMessagesByUIDWithExtraHeaders(folder, requestKind, uids, modseq, progressCallback, NULL, pError); +} + +IMAPSyncResult * IMAPSession::syncMessagesByUIDWithExtraHeaders(String * folder, IMAPMessagesRequestKind requestKind, + IndexSet * uids, uint64_t modseq, + IMAPProgressCallback * progressCallback, Array * extraHeaders, + ErrorCode * pError) +{ MCAssert(uids->rangesCount() > 0); struct mailimap_set * imapset = setFromIndexSet(uids); IMAPSyncResult * result = fetchMessages(folder, requestKind, true, imapset, modseq, NULL, (uint32_t) uids->allRanges()[0].location, - progressCallback, pError); + progressCallback, extraHeaders, pError); mailimap_set_free(imapset); return result; + } IndexSet * IMAPSession::capability(ErrorCode * pError) @@ -2971,6 +3027,10 @@ IndexSet * IMAPSession::capability(ErrorCode * pError) result->addIndex(IMAPCapabilityQResync); mQResyncEnabled = true; } + if (mailimap_has_xoauth2(mImap)) { + result->addIndex(IMAPCapabilityXOAuth2); + mXOauth2Enabled = true; + } * pError = ErrorNone; result->autorelease(); @@ -3002,6 +3062,10 @@ bool IMAPSession::isIdentityEnabled() return mIdentityEnabled; } +bool IMAPSession::isXOAuthEnabled() { + return mXOauth2Enabled; +} + bool IMAPSession::isDisconnected() { return mState == STATE_DISCONNECTED; @@ -3016,3 +3080,76 @@ ConnectionLogger * IMAPSession::connectionLogger() { return mConnectionLogger; } + +String * IMAPSession::htmlRendering(IMAPMessage * message, String * folder, ErrorCode * pError) +{ + HTMLRendererIMAPDataCallback * dataCallback = new HTMLRendererIMAPDataCallback(this, message->uid()); + String * htmlString = HTMLRenderer::htmlForIMAPMessage(folder, + message, + dataCallback, + NULL); + * pError = dataCallback->error(); + + if (* pError != ErrorNone) { + return NULL; + } + + MC_SAFE_RELEASE(dataCallback); + return htmlString; +} + +String * IMAPSession::htmlBodyRendering(IMAPMessage * message, String * folder, ErrorCode * pError) +{ + HTMLRendererIMAPDataCallback * dataCallback = new HTMLRendererIMAPDataCallback(this, message->uid()); + HTMLBodyRendererTemplateCallback * htmlCallback = new HTMLBodyRendererTemplateCallback(); + + String * htmlBodyString = HTMLRenderer::htmlForIMAPMessage(folder, + message, + dataCallback, + htmlCallback); + + * pError = dataCallback->error(); + + if (* pError != ErrorNone) { + return NULL; + } + + MC_SAFE_RELEASE(dataCallback); + MC_SAFE_RELEASE(htmlCallback); + return htmlBodyString; +} + +String * IMAPSession::plainTextRendering(IMAPMessage * message, String * folder, ErrorCode * pError) +{ + String * htmlString = htmlRendering(message, folder, pError); + + if (* pError != ErrorNone) { + return NULL; + } + + String * plainTextString = htmlString->flattenHTML(); + return plainTextString; +} + +String * IMAPSession::plainTextBodyRendering(IMAPMessage * message, String * folder, ErrorCode * pError) +{ + String * htmlBodyString = htmlBodyRendering(message, folder, pError); + + if (* pError != ErrorNone) { + return NULL; + } + + String * plainTextBodyString = htmlBodyString->flattenHTML(); + + plainTextBodyString->replaceOccurrencesOfString(MCSTR("\t"), MCSTR(" ")); + plainTextBodyString->replaceOccurrencesOfString(MCSTR("\n"), MCSTR(" ")); + plainTextBodyString->replaceOccurrencesOfString(MCSTR("\v"), MCSTR(" ")); + plainTextBodyString->replaceOccurrencesOfString(MCSTR("\f"), MCSTR(" ")); + plainTextBodyString->replaceOccurrencesOfString(MCSTR("\r"), MCSTR(" ")); + + while (plainTextBodyString->replaceOccurrencesOfString(MCSTR(" "), MCSTR(" ")) > 0) { + /* do nothing */ + } + + return plainTextBodyString; +} diff --git a/src/core/imap/MCIMAPSession.h b/src/core/imap/MCIMAPSession.h index 212f0876..4128b516 100644 --- a/src/core/imap/MCIMAPSession.h +++ b/src/core/imap/MCIMAPSession.h @@ -4,6 +4,7 @@ #include <MailCore/MCBaseTypes.h> #include <MailCore/MCMessageConstants.h> +#include <MailCore/MCIMAPMessage.h> #ifdef __cplusplus @@ -87,10 +88,22 @@ namespace mailcore { virtual void expunge(String * folder, ErrorCode * pError); virtual Array * /* IMAPMessage */ fetchMessagesByUID(String * folder, IMAPMessagesRequestKind requestKind, - IndexSet * uids, IMAPProgressCallback * progressCallback, ErrorCode * pError); + IndexSet * uids, IMAPProgressCallback * progressCallback, + ErrorCode * pError); + virtual Array * /* IMAPMessage */ fetchMessagesByUIDWithExtraHeaders(String * folder, + IMAPMessagesRequestKind requestKind, + IndexSet * uids, + IMAPProgressCallback * progressCallback, + Array * extraHeaders, ErrorCode * pError); virtual Array * /* IMAPMessage */ fetchMessagesByNumber(String * folder, IMAPMessagesRequestKind requestKind, - IndexSet * numbers, IMAPProgressCallback * progressCallback, ErrorCode * pError); - + IndexSet * numbers, IMAPProgressCallback * progressCallback, + ErrorCode * pError); + virtual Array * /* IMAPMessage */ fetchMessagesByNumberWithExtraHeaders(String * folder, + IMAPMessagesRequestKind requestKind, + IndexSet * numbers, + IMAPProgressCallback * progressCallback, + Array * extraHeaders, ErrorCode * pError); + virtual Data * fetchMessageByUID(String * folder, uint32_t uid, IMAPProgressCallback * progressCallback, ErrorCode * pError); virtual Data * fetchMessageAttachmentByUID(String * folder, uint32_t uid, String * partID, @@ -102,7 +115,12 @@ namespace mailcore { virtual IMAPSyncResult * syncMessagesByUID(String * folder, IMAPMessagesRequestKind requestKind, IndexSet * uids, uint64_t modseq, IMAPProgressCallback * progressCallback, ErrorCode * pError); - + /* Same as syncMessagesByUID, allows for extra headers */ + virtual IMAPSyncResult * syncMessagesByUIDWithExtraHeaders(String * folder, IMAPMessagesRequestKind requestKind, + IndexSet * uids, uint64_t modseq, + IMAPProgressCallback * progressCallback, + Array * extraHeaders, ErrorCode * pError); + virtual void storeFlags(String * folder, IndexSet * uids, IMAPStoreFlagsRequestKind kind, MessageFlag flags, ErrorCode * pError); virtual void storeLabels(String * folder, IndexSet * uids, IMAPStoreFlagsRequestKind kind, Array * labels, ErrorCode * pError); @@ -136,10 +154,24 @@ namespace mailcore { virtual bool isCondstoreEnabled(); virtual bool isQResyncEnabled(); virtual bool isIdentityEnabled(); + virtual bool isXOAuthEnabled(); virtual void setConnectionLogger(ConnectionLogger * logger); virtual ConnectionLogger * connectionLogger(); + /** HTML rendering of the body of the message to be displayed in a web view.*/ + virtual String * htmlRendering(IMAPMessage * message, String * folder, ErrorCode * pError); + + /** HTML rendering of the body of the message.*/ + virtual String * htmlBodyRendering(IMAPMessage * message, String * folder, ErrorCode * pError); + + /** Text rendering of the message.*/ + virtual String * plainTextRendering(IMAPMessage * message, String * folder, ErrorCode * pError); + + /** Text rendering of the body of the message. All end of line will be removed and white spaces cleaned up. + This method can be used to generate the summary of the message.*/ + virtual String * plainTextBodyRendering(IMAPMessage * message, String * folder, ErrorCode * pError); + public: // private virtual void loginIfNeeded(ErrorCode * pError); virtual void connectIfNeeded(ErrorCode * pError); @@ -165,6 +197,7 @@ namespace mailcore { bool mCondstoreEnabled; bool mQResyncEnabled; bool mIdentityEnabled; + bool mXOauth2Enabled; String * mWelcomeString; bool mNeedsMboxMailWorkaround; uint32_t mUIDValidity; @@ -193,9 +226,10 @@ namespace mailcore { void unsetup(); void selectIfNeeded(String * folder, ErrorCode * pError); char fetchDelimiterIfNeeded(char defaultDelimiter, ErrorCode * pError); - IMAPSyncResult * fetchMessages(String * folder, IMAPMessagesRequestKind requestKind, bool fetchByUID, - struct mailimap_set * imapset, uint64_t modseq, HashMap * mapping, uint32_t startUid, - IMAPProgressCallback * progressCallback, ErrorCode * pError); + IMAPSyncResult * fetchMessages(String * folder, IMAPMessagesRequestKind requestKind, + bool fetchByUID, struct mailimap_set * imapset, uint64_t modseq, + HashMap * mapping, uint32_t startUid, IMAPProgressCallback * progressCallback, + Array * extraHeaders, ErrorCode * pError); }; } diff --git a/src/core/pop/MCPOPSession.cc b/src/core/pop/MCPOPSession.cc index fea4e5e0..42a8d585 100644 --- a/src/core/pop/MCPOPSession.cc +++ b/src/core/pop/MCPOPSession.cc @@ -129,7 +129,7 @@ bool POPSession::isCheckCertificateEnabled() bool POPSession::checkCertificate() { -#warning check certificate + //TODO check certificate return true; } diff --git a/src/core/renderer/HTMLBodyRendererTemplateCallback.cc b/src/core/renderer/MCHTMLBodyRendererTemplateCallback.cc index 94ee6de7..06a1a7a3 100644 --- a/src/core/renderer/HTMLBodyRendererTemplateCallback.cc +++ b/src/core/renderer/MCHTMLBodyRendererTemplateCallback.cc @@ -1,12 +1,12 @@ // -// HTMLBodyRendererTemplateCallback.cc +// MCHTMLBodyRendererTemplateCallback.cc // mailcore2 // // Created by Paul Young on 02/07/2013. // Copyright (c) 2013 MailCore. All rights reserved. // -#include "HTMLBodyRendererTemplateCallback.h" +#include "MCHTMLBodyRendererTemplateCallback.h" using namespace mailcore; diff --git a/src/core/renderer/HTMLBodyRendererTemplateCallback.h b/src/core/renderer/MCHTMLBodyRendererTemplateCallback.h index 7901e265..7cb9ae10 100644 --- a/src/core/renderer/HTMLBodyRendererTemplateCallback.h +++ b/src/core/renderer/MCHTMLBodyRendererTemplateCallback.h @@ -1,5 +1,5 @@ // -// HTMLBodyRendererTemplateCallback.h +// MCHTMLBodyRendererTemplateCallback.h // mailcore2 // // Created by Paul Young on 02/07/2013. diff --git a/src/core/renderer/MCHTMLRendererIMAPDataCallback.cc b/src/core/renderer/MCHTMLRendererIMAPDataCallback.cc new file mode 100644 index 00000000..d438ef85 --- /dev/null +++ b/src/core/renderer/MCHTMLRendererIMAPDataCallback.cc @@ -0,0 +1,28 @@ +// +// MCHTMLRendererIMAPDataCallback.cc +// mailcore2 +// +// Created by Paul Young on 06/07/2013. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#include "MCHTMLRendererIMAPDataCallback.h" + +using namespace mailcore; + +HTMLRendererIMAPDataCallback::HTMLRendererIMAPDataCallback(IMAPSession * session, uint32_t uid) +{ + mSession = session; + mUid = uid; + mError = ErrorNone; +} + +Data * HTMLRendererIMAPDataCallback::dataForIMAPPart(String * folder, IMAPPart * part) +{ + return mSession->fetchMessageAttachmentByUID(folder, mUid, part->partID(), part->encoding(), NULL, &mError); +} + +ErrorCode HTMLRendererIMAPDataCallback::error() +{ + return mError; +}
\ No newline at end of file diff --git a/src/core/renderer/MCHTMLRendererIMAPDataCallback.h b/src/core/renderer/MCHTMLRendererIMAPDataCallback.h new file mode 100644 index 00000000..4638f0a0 --- /dev/null +++ b/src/core/renderer/MCHTMLRendererIMAPDataCallback.h @@ -0,0 +1,36 @@ +// +// MCHTMLRendererIMAPDataCallback.h +// mailcore2 +// +// Created by Paul Young on 06/07/2013. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef __MAILCORE_MCHTMLRENDERERIMAPDATACALLBACK_H_ + +#define __MAILCORE_MCHTMLRENDERERIMAPDATACALLBACK_H_ + +#include "MCHTMLRendererCallback.h" + +#ifdef __cplusplus + +namespace mailcore { + + class HTMLRendererIMAPDataCallback : public Object, public HTMLRendererIMAPCallback { + public: + HTMLRendererIMAPDataCallback(IMAPSession * session, uint32_t uid); + + virtual Data * dataForIMAPPart(String * folder, IMAPPart * part); + virtual ErrorCode error(); + + private: + IMAPSession * mSession; + uint32_t mUid; + ErrorCode mError; + }; + +} + +#endif + +#endif diff --git a/src/core/rfc822/MCAttachment.cc b/src/core/rfc822/MCAttachment.cc index b6167941..6df46937 100644 --- a/src/core/rfc822/MCAttachment.cc +++ b/src/core/rfc822/MCAttachment.cc @@ -5,9 +5,12 @@ #include "MCMessageHeader.h" #include "MCMessageConstants.h" #include "MCLog.h" +#include "MCZip.h" #include <stdlib.h> #include <string.h> +#include <unistd.h> +#include <sys/stat.h> #include <libetpan/libetpan.h> using namespace mailcore; @@ -124,12 +127,36 @@ String * Attachment::mimeTypeForFilename(String * filename) Attachment * Attachment::attachmentWithContentsOfFile(String * filename) { + const char * cPath = filename->fileSystemRepresentation(); + struct stat statinfo; + int r; + + r = stat(cPath, &statinfo); + if (r < 0) { + return NULL; + } + + if (S_ISDIR(statinfo.st_mode)) { + String * zipFilename = CreateTemporaryZipFileFromFolder(filename); + if (zipFilename == NULL) { + return NULL; + } + Attachment * result = attachmentWithContentsOfFile(zipFilename); + RemoveTemporaryZipFile(zipFilename); + return result; + } + else { + Data * data = Data::dataWithContentsOfFile(filename); + return attachmentWithData(filename, data); + } +} + +Attachment * Attachment::attachmentWithData(String * filename, Data * data) +{ Attachment * attachment; String * mimeType; - Data * data; attachment = new Attachment(); - data = Data::dataWithContentsOfFile(filename); mimeType = Attachment::mimeTypeForFilename(filename); if (mimeType != NULL) { attachment->setMimeType(mimeType); diff --git a/src/core/rfc822/MCAttachment.h b/src/core/rfc822/MCAttachment.h index 272e589d..2bad2c0f 100644 --- a/src/core/rfc822/MCAttachment.h +++ b/src/core/rfc822/MCAttachment.h @@ -10,43 +10,44 @@ #ifdef __cplusplus namespace mailcore { - - class MessagePart; - - class Attachment : public AbstractPart { - public: - static String * mimeTypeForFilename(String * filename); - static Attachment * attachmentWithContentsOfFile(String * filename); - static Attachment * attachmentWithHTMLString(String * htmlString); - static Attachment * attachmentWithRFC822Message(Data * messageData); - static Attachment * attachmentWithText(String * text); - - Attachment(); - virtual ~Attachment(); - - virtual void setData(Data * data); - virtual Data * data(); - virtual String * decodedString(); - + + class MessagePart; + + class Attachment : public AbstractPart { + public: + static String * mimeTypeForFilename(String * filename); + static Attachment * attachmentWithContentsOfFile(String * filename); + static Attachment * attachmentWithData(String * filename, Data * data); + static Attachment * attachmentWithHTMLString(String * htmlString); + static Attachment * attachmentWithRFC822Message(Data * messageData); + static Attachment * attachmentWithText(String * text); + + Attachment(); + virtual ~Attachment(); + + virtual void setData(Data * data); + virtual Data * data(); + virtual String * decodedString(); + public: // subclass behavior - Attachment(Attachment * other); - virtual String * description(); - virtual Object * copy(); + Attachment(Attachment * other); + virtual String * description(); + virtual Object * copy(); public: // private - static AbstractPart * attachmentsWithMIME(struct mailmime * mime); + static AbstractPart * attachmentsWithMIME(struct mailmime * mime); - private: - Data * mData; - void init(); - static void fillMultipartSubAttachments(AbstractMultipart * multipart, struct mailmime * mime); - static AbstractPart * attachmentsWithMIMEWithMain(struct mailmime * mime, bool isMain); - static Attachment * attachmentWithSingleMIME(struct mailmime * mime); - static MessagePart * attachmentWithMessageMIME(struct mailmime * mime); - static Encoding encodingForMIMEEncoding(struct mailmime_mechanism * mechanism, int defaultMimeEncoding); + private: + Data * mData; + void init(); + static void fillMultipartSubAttachments(AbstractMultipart * multipart, struct mailmime * mime); + static AbstractPart * attachmentsWithMIMEWithMain(struct mailmime * mime, bool isMain); + static Attachment * attachmentWithSingleMIME(struct mailmime * mime); + static MessagePart * attachmentWithMessageMIME(struct mailmime * mime); + static Encoding encodingForMIMEEncoding(struct mailmime_mechanism * mechanism, int defaultMimeEncoding); static HashMap * readMimeTypesFile(String * filename); - }; - + }; + } #endif diff --git a/src/core/rfc822/MCMessageParser.cc b/src/core/rfc822/MCMessageParser.cc index 3c3037d3..435841f5 100644 --- a/src/core/rfc822/MCMessageParser.cc +++ b/src/core/rfc822/MCMessageParser.cc @@ -5,7 +5,7 @@ #include "MCAttachment.h" #include "MCMessageHeader.h" #include "MCHTMLRenderer.h" -#include "HTMLBodyRendererTemplateCallback.h" +#include "MCHTMLBodyRendererTemplateCallback.h" using namespace mailcore; diff --git a/src/core/smtp/MCSMTPSession.cc b/src/core/smtp/MCSMTPSession.cc index 0febf66e..e6f51807 100644 --- a/src/core/smtp/MCSMTPSession.cc +++ b/src/core/smtp/MCSMTPSession.cc @@ -146,7 +146,7 @@ bool SMTPSession::isCheckCertificateEnabled() bool SMTPSession::checkCertificate() { -#warning check certificate + //TODO check certificate return true; } @@ -532,7 +532,7 @@ void SMTPSession::checkAccount(Address * from, ErrorCode * pError) return; } - r = mailsmtp_rcpt(mSmtp, "email@invalid"); + r = mailsmtp_rcpt(mSmtp, "email@invalid.com"); if (r == MAILSMTP_ERROR_STREAM) { * pError = ErrorConnection; return; diff --git a/src/core/zip/MCZip.cc b/src/core/zip/MCZip.cc new file mode 100644 index 00000000..03e1f2ad --- /dev/null +++ b/src/core/zip/MCZip.cc @@ -0,0 +1,150 @@ +#include "MCZip.h" + +#include "zip.h" +#include "unzip.h" + +#include <sys/types.h> +#include <dirent.h> +#include <sys/stat.h> +#include <time.h> + +using namespace mailcore; + +static ErrorCode addFile(zipFile file, String * path); + +ErrorCode mailcore::CreateZipFileFromFolder(String * zipFilename, String * path) +{ + zipFile file = zipOpen(zipFilename->fileSystemRepresentation(), APPEND_STATUS_CREATE); + if (file == NULL) { + return ErrorFile; + } + + addFile(file, path); + + int err = zipClose(file, NULL); + if (err != ZIP_OK) { + return ErrorFile; + } + + return ErrorNone; +} + +static ErrorCode addFile(zipFile file, String * path) +{ + const char * cPath = path->fileSystemRepresentation(); + struct stat statinfo; + int r; + int err; + + r = stat(cPath, &statinfo); + if (r < 0) + return ErrorFile; + + if (S_ISDIR(statinfo.st_mode)) { + DIR * dir = opendir(cPath); + if (dir == NULL) { + return ErrorFile; + } + + struct dirent * ent; + while ((ent = readdir(dir)) != NULL) { + if ((strcmp(ent->d_name, ".") == 0) || (strcmp(ent->d_name, "..") == 0)) { + continue; + } + + String * subpath = path->stringByAppendingPathComponent(String::stringWithFileSystemRepresentation(ent->d_name)); + addFile(file, subpath); + } + closedir(dir); + + return ErrorNone; + } + + time_t clock; + time(&clock); + + struct tm timevalue; + zip_fileinfo zi; + gmtime_r(&clock, &timevalue); + zi.tmz_date.tm_sec = timevalue.tm_sec; + zi.tmz_date.tm_min = timevalue.tm_min; + zi.tmz_date.tm_hour = timevalue.tm_hour; + zi.tmz_date.tm_mday = timevalue.tm_mday; + zi.tmz_date.tm_mon = timevalue.tm_mon; + zi.tmz_date.tm_year = timevalue.tm_year; + zi.internal_fa = 0; + zi.external_fa = 0; + zi.dosDate = 0; + + err = zipOpenNewFileInZip3(file, path->lastPathComponent()->fileSystemRepresentation(), + &zi, NULL, 0, NULL, 0, NULL, + Z_DEFLATED, + -1, 0, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0); + if (err != ZIP_OK) { + return ErrorFile; + } + + FILE * f = fopen(cPath, "rb"); + if (f == NULL) { + return ErrorFile; + } + + char * bytes = (char *) malloc(4096); + + size_t count; + do { + count = fread(bytes, 1, 4096, f); + + err = zipWriteInFileInZip(file, bytes, (unsigned) count); + if (err != ZIP_OK) { + free(bytes); + zipCloseFileInZip(file); + return ErrorFile; + } + } while (count > 0); + + free(bytes); + + if (ferror(f)) { + return ErrorFile; + } + + fclose(f); + + err = zipCloseFileInZip(file); + if (err != ZIP_OK) { + return ErrorFile; + } + + return ErrorNone; +} + +String * mailcore::CreateTemporaryZipFileFromFolder(String * folder) +{ + char tempdir[] = "/tmp/mailcore2-XXXXXX"; + char * result = mkdtemp(tempdir); + if (result == NULL) { + return NULL; + } + + String * tempDirectoryString = String::stringWithFileSystemRepresentation(tempdir); + String * path = tempDirectoryString->stringByAppendingPathComponent(folder->lastPathComponent())->stringByAppendingUTF8Format(".zip"); + + ErrorCode err = CreateZipFileFromFolder(path, folder); + if (err != ErrorNone) { + unlink(path->fileSystemRepresentation()); + unlink(tempdir); + return NULL; + } + + return path; +} + +void mailcore::RemoveTemporaryZipFile(String * zipFilename) +{ + String * tempDir = zipFilename->stringByDeletingLastPathComponent(); + unlink(zipFilename->fileSystemRepresentation()); + unlink(tempDir->fileSystemRepresentation()); +} diff --git a/src/core/zip/MCZip.h b/src/core/zip/MCZip.h new file mode 100644 index 00000000..28dcf39e --- /dev/null +++ b/src/core/zip/MCZip.h @@ -0,0 +1,17 @@ +#ifndef __MAILCORE_MCZIP_H_ + +#ifdef __cplusplus + +#include <MailCore/MCMessageConstants.h> +#include <MailCore/MCBaseTypes.h> + +namespace mailcore { + ErrorCode CreateZipFileFromFolder(String * zipFilename, String * folder); + + String * CreateTemporaryZipFileFromFolder(String * folder); + void RemoveTemporaryZipFile(String * zipFilename); +}; + +#endif + +#endif diff --git a/src/core/zip/MiniZip/ioapi.c b/src/core/zip/MiniZip/ioapi.c new file mode 100644 index 00000000..f1bee23e --- /dev/null +++ b/src/core/zip/MiniZip/ioapi.c @@ -0,0 +1,177 @@ +/* ioapi.c -- IO base function header for compress/uncompress .zip + files using zlib + zip or unzip API + + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "zlib.h" +#include "ioapi.h" + + + +/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ + +#ifndef SEEK_CUR +#define SEEK_CUR 1 +#endif + +#ifndef SEEK_END +#define SEEK_END 2 +#endif + +#ifndef SEEK_SET +#define SEEK_SET 0 +#endif + +voidpf ZCALLBACK fopen_file_func OF(( + voidpf opaque, + const char* filename, + int mode)); + +uLong ZCALLBACK fread_file_func OF(( + voidpf opaque, + voidpf stream, + void* buf, + uLong size)); + +uLong ZCALLBACK fwrite_file_func OF(( + voidpf opaque, + voidpf stream, + const void* buf, + uLong size)); + +long ZCALLBACK ftell_file_func OF(( + voidpf opaque, + voidpf stream)); + +long ZCALLBACK fseek_file_func OF(( + voidpf opaque, + voidpf stream, + uLong offset, + int origin)); + +int ZCALLBACK fclose_file_func OF(( + voidpf opaque, + voidpf stream)); + +int ZCALLBACK ferror_file_func OF(( + voidpf opaque, + voidpf stream)); + + +voidpf ZCALLBACK fopen_file_func (opaque, filename, mode) + voidpf opaque; + const char* filename; + int mode; +{ + FILE* file = NULL; + const char* mode_fopen = NULL; + if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) + mode_fopen = "rb"; + else + if (mode & ZLIB_FILEFUNC_MODE_EXISTING) + mode_fopen = "r+b"; + else + if (mode & ZLIB_FILEFUNC_MODE_CREATE) + mode_fopen = "wb"; + + if ((filename!=NULL) && (mode_fopen != NULL)) + file = fopen(filename, mode_fopen); + return file; +} + + +uLong ZCALLBACK fread_file_func (opaque, stream, buf, size) + voidpf opaque; + voidpf stream; + void* buf; + uLong size; +{ + uLong ret; + ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); + return ret; +} + + +uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size) + voidpf opaque; + voidpf stream; + const void* buf; + uLong size; +{ + uLong ret; + ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); + return ret; +} + +long ZCALLBACK ftell_file_func (opaque, stream) + voidpf opaque; + voidpf stream; +{ + long ret; + ret = ftell((FILE *)stream); + return ret; +} + +long ZCALLBACK fseek_file_func (opaque, stream, offset, origin) + voidpf opaque; + voidpf stream; + uLong offset; + int origin; +{ + int fseek_origin=0; + long ret; + switch (origin) + { + case ZLIB_FILEFUNC_SEEK_CUR : + fseek_origin = SEEK_CUR; + break; + case ZLIB_FILEFUNC_SEEK_END : + fseek_origin = SEEK_END; + break; + case ZLIB_FILEFUNC_SEEK_SET : + fseek_origin = SEEK_SET; + break; + default: return -1; + } + ret = 0; + fseek((FILE *)stream, offset, fseek_origin); + return ret; +} + +int ZCALLBACK fclose_file_func (opaque, stream) + voidpf opaque; + voidpf stream; +{ + int ret; + ret = fclose((FILE *)stream); + return ret; +} + +int ZCALLBACK ferror_file_func (opaque, stream) + voidpf opaque; + voidpf stream; +{ + int ret; + ret = ferror((FILE *)stream); + return ret; +} + +void fill_fopen_filefunc (pzlib_filefunc_def) + zlib_filefunc_def* pzlib_filefunc_def; +{ + pzlib_filefunc_def->zopen_file = fopen_file_func; + pzlib_filefunc_def->zread_file = fread_file_func; + pzlib_filefunc_def->zwrite_file = fwrite_file_func; + pzlib_filefunc_def->ztell_file = ftell_file_func; + pzlib_filefunc_def->zseek_file = fseek_file_func; + pzlib_filefunc_def->zclose_file = fclose_file_func; + pzlib_filefunc_def->zerror_file = ferror_file_func; + pzlib_filefunc_def->opaque = NULL; +} diff --git a/src/core/zip/MiniZip/ioapi.h b/src/core/zip/MiniZip/ioapi.h new file mode 100644 index 00000000..7d457baa --- /dev/null +++ b/src/core/zip/MiniZip/ioapi.h @@ -0,0 +1,75 @@ +/* ioapi.h -- IO base function header for compress/uncompress .zip + files using zlib + zip or unzip API + + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant +*/ + +#ifndef _ZLIBIOAPI_H +#define _ZLIBIOAPI_H + + +#define ZLIB_FILEFUNC_SEEK_CUR (1) +#define ZLIB_FILEFUNC_SEEK_END (2) +#define ZLIB_FILEFUNC_SEEK_SET (0) + +#define ZLIB_FILEFUNC_MODE_READ (1) +#define ZLIB_FILEFUNC_MODE_WRITE (2) +#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) + +#define ZLIB_FILEFUNC_MODE_EXISTING (4) +#define ZLIB_FILEFUNC_MODE_CREATE (8) + + +#ifndef ZCALLBACK + +#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) +#define ZCALLBACK CALLBACK +#else +#define ZCALLBACK +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); +typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); +typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); +typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); +typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); +typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); +typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); + +typedef struct zlib_filefunc_def_s +{ + open_file_func zopen_file; + read_file_func zread_file; + write_file_func zwrite_file; + tell_file_func ztell_file; + seek_file_func zseek_file; + close_file_func zclose_file; + testerror_file_func zerror_file; + voidpf opaque; +} zlib_filefunc_def; + + + +void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); + +#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size)) +#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size)) +#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream)) +#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode)) +#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream)) +#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream)) + + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/src/core/zip/MiniZip/mztools.c b/src/core/zip/MiniZip/mztools.c new file mode 100644 index 00000000..b51d0e07 --- /dev/null +++ b/src/core/zip/MiniZip/mztools.c @@ -0,0 +1,282 @@ +/* + Additional tools for Minizip + Code: Xavier Roche '2004 + License: Same as ZLIB (www.gzip.org) +*/ + +/* Code */ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "zlib.h" +#include "unzip.h" +#include "mztools.h" + +#define READ_8(adr) ((unsigned char)*(adr)) +#define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) ) +#define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) ) + +#define WRITE_8(buff, n) do { \ + *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \ +} while(0) +#define WRITE_16(buff, n) do { \ + WRITE_8((unsigned char*)(buff), n); \ + WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \ +} while(0) +#define WRITE_32(buff, n) do { \ + WRITE_16((unsigned char*)(buff), (n) & 0xffff); \ + WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \ +} while(0) + +extern int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered) +const char* file; +const char* fileOut; +const char* fileOutTmp; +uLong* nRecovered; +uLong* bytesRecovered; +{ + int err = Z_OK; + FILE* fpZip = fopen(file, "rb"); + FILE* fpOut = fopen(fileOut, "wb"); + FILE* fpOutCD = fopen(fileOutTmp, "wb"); + if (fpZip != NULL && fpOut != NULL) { + int entries = 0; + uLong totalBytes = 0; + char header[30]; + char filename[256]; + char extra[1024]; + int offset = 0; + int offsetCD = 0; + while ( fread(header, 1, 30, fpZip) == 30 ) { + int currentOffset = offset; + + /* File entry */ + if (READ_32(header) == 0x04034b50) { + unsigned int version = READ_16(header + 4); + unsigned int gpflag = READ_16(header + 6); + unsigned int method = READ_16(header + 8); + unsigned int filetime = READ_16(header + 10); + unsigned int filedate = READ_16(header + 12); + unsigned int crc = READ_32(header + 14); /* crc */ + unsigned int cpsize = READ_32(header + 18); /* compressed size */ + unsigned int uncpsize = READ_32(header + 22); /* uncompressed sz */ + unsigned int fnsize = READ_16(header + 26); /* file name length */ + unsigned int extsize = READ_16(header + 28); /* extra field length */ + filename[0] = extra[0] = '\0'; + + /* Header */ + if (fwrite(header, 1, 30, fpOut) == 30) { + offset += 30; + } else { + err = Z_ERRNO; + break; + } + + /* Filename */ + if (fnsize > 0) { + if (fread(filename, 1, fnsize, fpZip) == fnsize) { + if (fwrite(filename, 1, fnsize, fpOut) == fnsize) { + offset += fnsize; + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_STREAM_ERROR; + break; + } + + /* Extra field */ + if (extsize > 0) { + if (fread(extra, 1, extsize, fpZip) == extsize) { + if (fwrite(extra, 1, extsize, fpOut) == extsize) { + offset += extsize; + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_ERRNO; + break; + } + } + + /* Data */ + { + int dataSize = cpsize; + if (dataSize == 0) { + dataSize = uncpsize; + } + if (dataSize > 0) { + char* data = malloc(dataSize); + if (data != NULL) { + if ((int)fread(data, 1, dataSize, fpZip) == dataSize) { + if ((int)fwrite(data, 1, dataSize, fpOut) == dataSize) { + offset += dataSize; + totalBytes += dataSize; + } else { + err = Z_ERRNO; + } + } else { + err = Z_ERRNO; + } + free(data); + if (err != Z_OK) { + break; + } + } else { + err = Z_MEM_ERROR; + break; + } + } + } + + /* Central directory entry */ + { + char cdeHeader[46]; + char* comment = ""; + int comsize = (int) strlen(comment); + WRITE_32(cdeHeader, 0x02014b50); + WRITE_16(cdeHeader + 4, version); + WRITE_16(cdeHeader + 6, version); + WRITE_16(cdeHeader + 8, gpflag); + WRITE_16(cdeHeader + 10, method); + WRITE_16(cdeHeader + 12, filetime); + WRITE_16(cdeHeader + 14, filedate); + WRITE_32(cdeHeader + 16, crc); + WRITE_32(cdeHeader + 20, cpsize); + WRITE_32(cdeHeader + 24, uncpsize); + WRITE_16(cdeHeader + 28, fnsize); + WRITE_16(cdeHeader + 30, extsize); + WRITE_16(cdeHeader + 32, comsize); + WRITE_16(cdeHeader + 34, 0); /* disk # */ + WRITE_16(cdeHeader + 36, 0); /* int attrb */ + WRITE_32(cdeHeader + 38, 0); /* ext attrb */ + WRITE_32(cdeHeader + 42, currentOffset); + /* Header */ + if (fwrite(cdeHeader, 1, 46, fpOutCD) == 46) { + offsetCD += 46; + + /* Filename */ + if (fnsize > 0) { + if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) { + offsetCD += fnsize; + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_STREAM_ERROR; + break; + } + + /* Extra field */ + if (extsize > 0) { + if (fwrite(extra, 1, extsize, fpOutCD) == extsize) { + offsetCD += extsize; + } else { + err = Z_ERRNO; + break; + } + } + + /* Comment field */ + if (comsize > 0) { + if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) { + offsetCD += comsize; + } else { + err = Z_ERRNO; + break; + } + } + + + } else { + err = Z_ERRNO; + break; + } + } + + /* Success */ + entries++; + + } else { + break; + } + } + + /* Final central directory */ + { + int entriesZip = entries; + char fcdHeader[22]; + char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools"; + int comsize = (int) strlen(comment); + if (entriesZip > 0xffff) { + entriesZip = 0xffff; + } + WRITE_32(fcdHeader, 0x06054b50); + WRITE_16(fcdHeader + 4, 0); /* disk # */ + WRITE_16(fcdHeader + 6, 0); /* disk # */ + WRITE_16(fcdHeader + 8, entriesZip); /* hack */ + WRITE_16(fcdHeader + 10, entriesZip); /* hack */ + WRITE_32(fcdHeader + 12, offsetCD); /* size of CD */ + WRITE_32(fcdHeader + 16, offset); /* offset to CD */ + WRITE_16(fcdHeader + 20, comsize); /* comment */ + + /* Header */ + if (fwrite(fcdHeader, 1, 22, fpOutCD) == 22) { + + /* Comment field */ + if (comsize > 0) { + if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) { + err = Z_ERRNO; + } + } + + } else { + err = Z_ERRNO; + } + } + + /* Final merge (file + central directory) */ + fclose(fpOutCD); + if (err == Z_OK) { + fpOutCD = fopen(fileOutTmp, "rb"); + if (fpOutCD != NULL) { + int nRead; + char buffer[8192]; + while ( (nRead = (int)fread(buffer, 1, sizeof(buffer), fpOutCD)) > 0) { + if ((int)fwrite(buffer, 1, nRead, fpOut) != nRead) { + err = Z_ERRNO; + break; + } + } + fclose(fpOutCD); + } + } + + /* Close */ + fclose(fpZip); + fclose(fpOut); + + /* Wipe temporary file */ + (void)remove(fileOutTmp); + + /* Number of recovered entries */ + if (err == Z_OK) { + if (nRecovered != NULL) { + *nRecovered = entries; + } + if (bytesRecovered != NULL) { + *bytesRecovered = totalBytes; + } + } + } else { + err = Z_STREAM_ERROR; + } + return err; +} diff --git a/src/core/zip/MiniZip/mztools.h b/src/core/zip/MiniZip/mztools.h new file mode 100644 index 00000000..eee78dc5 --- /dev/null +++ b/src/core/zip/MiniZip/mztools.h @@ -0,0 +1,31 @@ +/* + Additional tools for Minizip + Code: Xavier Roche '2004 + License: Same as ZLIB (www.gzip.org) +*/ + +#ifndef _zip_tools_H +#define _zip_tools_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#include "unzip.h" + +/* Repair a ZIP file (missing central directory) + file: file to recover + fileOut: output file after recovery + fileOutTmp: temporary file name used for recovery +*/ +extern int ZEXPORT unzRepair(const char* file, + const char* fileOut, + const char* fileOutTmp, + uLong* nRecovered, + uLong* bytesRecovered); + +#endif diff --git a/src/core/zip/MiniZip/unzip.c b/src/core/zip/MiniZip/unzip.c new file mode 100644 index 00000000..a9a9b5ab --- /dev/null +++ b/src/core/zip/MiniZip/unzip.c @@ -0,0 +1,1604 @@ +/* unzip.c -- IO for uncompress .zip files using zlib + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant + + Read unzip.h for more info +*/ + +/* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of +compatibility with older software. The following is from the original crypt.c. Code +woven in by Terry Thorsen 1/2003. +*/ +/* + Copyright (c) 1990-2000 Info-ZIP. All rights reserved. + + See the accompanying file LICENSE, version 2000-Apr-09 or later + (the contents of which are also included in zip.h) for terms of use. + If, for some reason, all these files are missing, the Info-ZIP license + also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html +*/ +/* + crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h] + + The encryption/decryption parts of this source code (as opposed to the + non-echoing password parts) were originally written in Europe. The + whole source package can be freely distributed, including from the USA. + (Prior to January 2000, re-export from the US was a violation of US law.) + */ + +/* + This encryption code is a direct transcription of the algorithm from + Roger Schlafly, described by Phil Katz in the file appnote.txt. This + file (appnote.txt) is distributed with the PKZIP program (even in the + version without encryption capabilities). + */ + +#define NOCRYPT +#define NOUNCRYPT + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "zlib.h" +#include "unzip.h" + +#ifdef STDC +# include <stddef.h> +# include <string.h> +# include <stdlib.h> +#endif +#ifdef NO_ERRNO_H + extern int errno; +#else +# include <errno.h> +#endif + + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + + +#ifndef CASESENSITIVITYDEFAULT_NO +# if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES) +# define CASESENSITIVITYDEFAULT_NO +# endif +#endif + + +#ifndef UNZ_BUFSIZE +#define UNZ_BUFSIZE (16384) +#endif + +#ifndef UNZ_MAXFILENAMEINZIP +#define UNZ_MAXFILENAMEINZIP (256) +#endif + +#ifndef ALLOC +# define ALLOC(size) (malloc(size)) +#endif +#ifndef TRYFREE +# define TRYFREE(p) {if (p) free(p);} +#endif + +#define SIZECENTRALDIRITEM (0x2e) +#define SIZEZIPLOCALHEADER (0x1e) + + + + +const char unz_copyright[] = + " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; + +/* unz_file_info_interntal contain internal info about a file in zipfile*/ +typedef struct unz_file_info_internal_s +{ + uLong offset_curfile;/* relative offset of local header 4 bytes */ +} unz_file_info_internal; + + +/* file_in_zip_read_info_s contain internal information about a file in zipfile, + when reading and decompress it */ +typedef struct +{ + char *read_buffer; /* internal buffer for compressed data */ + z_stream stream; /* zLib stream structure for inflate */ + + uLong pos_in_zipfile; /* position in byte on the zipfile, for fseek*/ + uLong stream_initialised; /* flag set if stream structure is initialised*/ + + uLong offset_local_extrafield;/* offset of the local extra field */ + uInt size_local_extrafield;/* size of the local extra field */ + uLong pos_local_extrafield; /* position in the local extra field in read*/ + + uLong crc32; /* crc32 of all data uncompressed */ + uLong crc32_wait; /* crc32 we must obtain after decompress all */ + uLong rest_read_compressed; /* number of byte to be decompressed */ + uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/ + zlib_filefunc_def z_filefunc; + voidpf filestream; /* io structore of the zipfile */ + uLong compression_method; /* compression method (0==store) */ + uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + int raw; +} file_in_zip_read_info_s; + + +/* unz_s contain internal information about the zipfile +*/ +typedef struct +{ + zlib_filefunc_def z_filefunc; + voidpf filestream; /* io structore of the zipfile */ + unz_global_info gi; /* public global information */ + uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + uLong num_file; /* number of the current file in the zipfile*/ + uLong pos_in_central_dir; /* pos of the current file in the central dir*/ + uLong current_file_ok; /* flag about the usability of the current file*/ + uLong central_pos; /* position of the beginning of the central dir*/ + + uLong size_central_dir; /* size of the central directory */ + uLong offset_central_dir; /* offset of start of central directory with + respect to the starting disk number */ + + unz_file_info cur_file_info; /* public info about the current file in zip*/ + unz_file_info_internal cur_file_info_internal; /* private info about it*/ + file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current + file if we are decompressing it */ + int encrypted; +# ifndef NOUNCRYPT + unsigned long keys[3]; /* keys defining the pseudo-random sequence */ + const unsigned long* pcrc_32_tab; +# endif +} unz_s; + + +#ifndef NOUNCRYPT +#include "crypt.h" +#endif + +/* =========================================================================== + Read a byte from a gz_stream; update next_in and avail_in. Return EOF + for end of file. + IN assertion: the stream s has been sucessfully opened for reading. +*/ + + +local int unzlocal_getByte OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + int *pi)); + +local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + int *pi; +{ + unsigned char c; + int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1); + if (err==1) + { + *pi = (int)c; + return UNZ_OK; + } + else + { + if (ZERROR(*pzlib_filefunc_def,filestream)) + return UNZ_ERRNO; + else + return UNZ_EOF; + } +} + + +/* =========================================================================== + Reads a long in LSB order from the given gz_stream. Sets +*/ +local int unzlocal_getShort OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX)); + +local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + uLong *pX; +{ + uLong x ; + int i; + int err; + + err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==UNZ_OK) + err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==UNZ_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int unzlocal_getLong OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX)); + +local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + uLong *pX; +{ + uLong x ; + int i; + int err; + + err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==UNZ_OK) + err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==UNZ_OK) + err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<16; + + if (err==UNZ_OK) + err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<24; + + if (err==UNZ_OK) + *pX = x; + else + *pX = 0; + return err; +} + + +/* My own strcmpi / strcasecmp */ +local int strcmpcasenosensitive_internal (fileName1,fileName2) + const char* fileName1; + const char* fileName2; +{ + for (;;) + { + char c1=*(fileName1++); + char c2=*(fileName2++); + if ((c1>='a') && (c1<='z')) + c1 -= 0x20; + if ((c2>='a') && (c2<='z')) + c2 -= 0x20; + if (c1=='\0') + return ((c2=='\0') ? 0 : -1); + if (c2=='\0') + return 1; + if (c1<c2) + return -1; + if (c1>c2) + return 1; + } +} + + +#ifdef CASESENSITIVITYDEFAULT_NO +#define CASESENSITIVITYDEFAULTVALUE 2 +#else +#define CASESENSITIVITYDEFAULTVALUE 1 +#endif + +#ifndef STRCMPCASENOSENTIVEFUNCTION +#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal +#endif + +/* + Compare two filename (fileName1,fileName2). + If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) + If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi + or strcasecmp) + If iCaseSenisivity = 0, case sensitivity is defaut of your operating system + (like 1 on Unix, 2 on Windows) + +*/ +extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity) + const char* fileName1; + const char* fileName2; + int iCaseSensitivity; +{ + if (iCaseSensitivity==0) + iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE; + + if (iCaseSensitivity==1) + return strcmp(fileName1,fileName2); + + return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2); +} + +#ifndef BUFREADCOMMENT +#define BUFREADCOMMENT (0x400) +#endif + +/* + Locate the Central directory of a zipfile (at the end, just before + the global comment) +*/ +local uLong unzlocal_SearchCentralDir OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream)); + +local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; +{ + unsigned char* buf; + uLong uSizeFile; + uLong uBackRead; + uLong uMaxBack=0xffff; /* maximum size of global comment */ + uLong uPosFound=0; + + if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + + uSizeFile = ZTELL(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackRead<uMaxBack) + { + uLong uReadSize,uReadPos ; + int i; + if (uBackRead+BUFREADCOMMENT>uMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uSizeFile-uReadPos); + if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && + ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) + { + uPosFound = uReadPos+i; + break; + } + + if (uPosFound!=0) + break; + } + TRYFREE(buf); + return uPosFound; +} + +/* + Open a Zip file. path contain the full pathname (by example, + on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer + "zlib/zlib114.zip". + If the zipfile cannot be opened (file doesn't exist or in not valid), the + return value is NULL. + Else, the return value is a unzFile Handle, usable with other function + of this unzip package. +*/ +extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def) + const char *path; + zlib_filefunc_def* pzlib_filefunc_def; +{ + unz_s us; + unz_s *s; + uLong central_pos,uL; + + uLong number_disk; /* number of the current dist, used for + spaning ZIP, unsupported, always 0*/ + uLong number_disk_with_CD; /* number the the disk with central dir, used + for spaning ZIP, unsupported, always 0*/ + uLong number_entry_CD; /* total number of entries in + the central dir + (same than number_entry on nospan) */ + + int err=UNZ_OK; + + if (unz_copyright[0]!=' ') + return NULL; + + if (pzlib_filefunc_def==NULL) + fill_fopen_filefunc(&us.z_filefunc); + else + us.z_filefunc = *pzlib_filefunc_def; + + us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque, + path, + ZLIB_FILEFUNC_MODE_READ | + ZLIB_FILEFUNC_MODE_EXISTING); + if (us.filestream==NULL) + return NULL; + + central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream); + if (central_pos==0) + err=UNZ_ERRNO; + + if (ZSEEK(us.z_filefunc, us.filestream, + central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=UNZ_ERRNO; + + /* the signature, already checked */ + if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of this disk */ + if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of the disk with the start of the central directory */ + if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) + err=UNZ_ERRNO; + + /* total number of entries in the central dir on this disk */ + if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK) + err=UNZ_ERRNO; + + /* total number of entries in the central dir */ + if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK) + err=UNZ_ERRNO; + + if ((number_entry_CD!=us.gi.number_entry) || + (number_disk_with_CD!=0) || + (number_disk!=0)) + err=UNZ_BADZIPFILE; + + /* size of the central directory */ + if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK) + err=UNZ_ERRNO; + + /* offset of start of central directory with respect to the + starting disk number */ + if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK) + err=UNZ_ERRNO; + + /* zipfile comment length */ + if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK) + err=UNZ_ERRNO; + + if ((central_pos<us.offset_central_dir+us.size_central_dir) && + (err==UNZ_OK)) + err=UNZ_BADZIPFILE; + + if (err!=UNZ_OK) + { + ZCLOSE(us.z_filefunc, us.filestream); + return NULL; + } + + us.byte_before_the_zipfile = central_pos - + (us.offset_central_dir+us.size_central_dir); + us.central_pos = central_pos; + us.pfile_in_zip_read = NULL; + us.encrypted = 0; + + + s=(unz_s*)ALLOC(sizeof(unz_s)); + *s=us; + unzGoToFirstFile((unzFile)s); + return (unzFile)s; +} + + +extern unzFile ZEXPORT unzOpen (path) + const char *path; +{ + return unzOpen2(path, NULL); +} + +/* + Close a ZipFile opened with unzipOpen. + If there is files inside the .Zip opened with unzipOpenCurrentFile (see later), + these files MUST be closed with unzipCloseCurrentFile before call unzipClose. + return UNZ_OK if there is no problem. */ +extern int ZEXPORT unzClose (file) + unzFile file; +{ + unz_s* s; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + + if (s->pfile_in_zip_read!=NULL) + unzCloseCurrentFile(file); + + ZCLOSE(s->z_filefunc, s->filestream); + TRYFREE(s); + return UNZ_OK; +} + + +/* + Write info about the ZipFile in the *pglobal_info structure. + No preparation of the structure is needed + return UNZ_OK if there is no problem. */ +extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info) + unzFile file; + unz_global_info *pglobal_info; +{ + unz_s* s; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + *pglobal_info=s->gi; + return UNZ_OK; +} + + +/* + Translate date/time from Dos format to tm_unz (readable more easilty) +*/ +local void unzlocal_DosDateToTmuDate (ulDosDate, ptm) + uLong ulDosDate; + tm_unz* ptm; +{ + uLong uDate; + uDate = (uLong)(ulDosDate>>16); + ptm->tm_mday = (uInt)(uDate&0x1f) ; + ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ; + ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; + + ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800); + ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ; + ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ; +} + +/* + Get Info about the current file in the zipfile, with internal only info +*/ +local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file, + unz_file_info *pfile_info, + unz_file_info_internal + *pfile_info_internal, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize)); + +local int unzlocal_GetCurrentFileInfoInternal (file, + pfile_info, + pfile_info_internal, + szFileName, fileNameBufferSize, + extraField, extraFieldBufferSize, + szComment, commentBufferSize) + unzFile file; + unz_file_info *pfile_info; + unz_file_info_internal *pfile_info_internal; + char *szFileName; + uLong fileNameBufferSize; + void *extraField; + uLong extraFieldBufferSize; + char *szComment; + uLong commentBufferSize; +{ + unz_s* s; + unz_file_info file_info; + unz_file_info_internal file_info_internal; + int err=UNZ_OK; + uLong uMagic; + long lSeek=0; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + if (ZSEEK(s->z_filefunc, s->filestream, + s->pos_in_central_dir+s->byte_before_the_zipfile, + ZLIB_FILEFUNC_SEEK_SET)!=0) + err=UNZ_ERRNO; + + + /* we check the magic */ + if (err==UNZ_OK) { + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) + err=UNZ_ERRNO; + else if (uMagic!=0x02014b50) + err=UNZ_BADZIPFILE; + } + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK) + err=UNZ_ERRNO; + + unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) + err=UNZ_ERRNO; + + lSeek+=file_info.size_filename; + if ((err==UNZ_OK) && (szFileName!=NULL)) + { + uLong uSizeRead ; + if (file_info.size_filename<fileNameBufferSize) + { + *(szFileName+file_info.size_filename)='\0'; + uSizeRead = file_info.size_filename; + } + else + uSizeRead = fileNameBufferSize; + + if ((file_info.size_filename>0) && (fileNameBufferSize>0)) + if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead) + err=UNZ_ERRNO; + lSeek -= uSizeRead; + } + + + if ((err==UNZ_OK) && (extraField!=NULL)) + { + uLong uSizeRead ; + if (file_info.size_file_extra<extraFieldBufferSize) + uSizeRead = file_info.size_file_extra; + else + uSizeRead = extraFieldBufferSize; + + if (lSeek!=0) { + if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) + lSeek=0; + else + err=UNZ_ERRNO; + } + if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) + if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead) + err=UNZ_ERRNO; + lSeek += file_info.size_file_extra - uSizeRead; + } + else + lSeek+=file_info.size_file_extra; + + + if ((err==UNZ_OK) && (szComment!=NULL)) + { + uLong uSizeRead ; + if (file_info.size_file_comment<commentBufferSize) + { + *(szComment+file_info.size_file_comment)='\0'; + uSizeRead = file_info.size_file_comment; + } + else + uSizeRead = commentBufferSize; + + if (lSeek!=0) { + if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) + lSeek=0; + else + err=UNZ_ERRNO; + } + if ((file_info.size_file_comment>0) && (commentBufferSize>0)) + if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead) + err=UNZ_ERRNO; + lSeek+=file_info.size_file_comment - uSizeRead; + } + else + lSeek+=file_info.size_file_comment; + + if ((err==UNZ_OK) && (pfile_info!=NULL)) + *pfile_info=file_info; + + if ((err==UNZ_OK) && (pfile_info_internal!=NULL)) + *pfile_info_internal=file_info_internal; + + return err; +} + + + +/* + Write info about the ZipFile in the *pglobal_info structure. + No preparation of the structure is needed + return UNZ_OK if there is no problem. +*/ +extern int ZEXPORT unzGetCurrentFileInfo (file, + pfile_info, + szFileName, fileNameBufferSize, + extraField, extraFieldBufferSize, + szComment, commentBufferSize) + unzFile file; + unz_file_info *pfile_info; + char *szFileName; + uLong fileNameBufferSize; + void *extraField; + uLong extraFieldBufferSize; + char *szComment; + uLong commentBufferSize; +{ + return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL, + szFileName,fileNameBufferSize, + extraField,extraFieldBufferSize, + szComment,commentBufferSize); +} + +/* + Set the current file of the zipfile to the first file. + return UNZ_OK if there is no problem +*/ +extern int ZEXPORT unzGoToFirstFile (file) + unzFile file; +{ + int err=UNZ_OK; + unz_s* s; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + s->pos_in_central_dir=s->offset_central_dir; + s->num_file=0; + err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + s->current_file_ok = (err == UNZ_OK); + return err; +} + +/* + Set the current file of the zipfile to the next file. + return UNZ_OK if there is no problem + return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. +*/ +extern int ZEXPORT unzGoToNextFile (file) + unzFile file; +{ + unz_s* s; + int err; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + if (!s->current_file_ok) + return UNZ_END_OF_LIST_OF_FILE; + if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */ + if (s->num_file+1==s->gi.number_entry) + return UNZ_END_OF_LIST_OF_FILE; + + s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + + s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; + s->num_file++; + err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + s->current_file_ok = (err == UNZ_OK); + return err; +} + + +/* + Try locate the file szFileName in the zipfile. + For the iCaseSensitivity signification, see unzipStringFileNameCompare + + return value : + UNZ_OK if the file is found. It becomes the current file. + UNZ_END_OF_LIST_OF_FILE if the file is not found +*/ +extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity) + unzFile file; + const char *szFileName; + int iCaseSensitivity; +{ + unz_s* s; + int err; + + /* We remember the 'current' position in the file so that we can jump + * back there if we fail. + */ + unz_file_info cur_file_infoSaved; + unz_file_info_internal cur_file_info_internalSaved; + uLong num_fileSaved; + uLong pos_in_central_dirSaved; + + + if (file==NULL) + return UNZ_PARAMERROR; + + if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) + return UNZ_PARAMERROR; + + s=(unz_s*)file; + if (!s->current_file_ok) + return UNZ_END_OF_LIST_OF_FILE; + + /* Save the current state */ + num_fileSaved = s->num_file; + pos_in_central_dirSaved = s->pos_in_central_dir; + cur_file_infoSaved = s->cur_file_info; + cur_file_info_internalSaved = s->cur_file_info_internal; + + err = unzGoToFirstFile(file); + + while (err == UNZ_OK) + { + char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; + err = unzGetCurrentFileInfo(file,NULL, + szCurrentFileName,sizeof(szCurrentFileName)-1, + NULL,0,NULL,0); + if (err == UNZ_OK) + { + if (unzStringFileNameCompare(szCurrentFileName, + szFileName,iCaseSensitivity)==0) + return UNZ_OK; + err = unzGoToNextFile(file); + } + } + + /* We failed, so restore the state of the 'current file' to where we + * were. + */ + s->num_file = num_fileSaved ; + s->pos_in_central_dir = pos_in_central_dirSaved ; + s->cur_file_info = cur_file_infoSaved; + s->cur_file_info_internal = cur_file_info_internalSaved; + return err; +} + + +/* +/////////////////////////////////////////// +// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net) +// I need random access +// +// Further optimization could be realized by adding an ability +// to cache the directory in memory. The goal being a single +// comprehensive file read to put the file I need in a memory. +*/ + +/* +typedef struct unz_file_pos_s +{ + uLong pos_in_zip_directory; // offset in file + uLong num_of_file; // # of file +} unz_file_pos; +*/ + +extern int ZEXPORT unzGetFilePos(file, file_pos) + unzFile file; + unz_file_pos* file_pos; +{ + unz_s* s; + + if (file==NULL || file_pos==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + if (!s->current_file_ok) + return UNZ_END_OF_LIST_OF_FILE; + + file_pos->pos_in_zip_directory = s->pos_in_central_dir; + file_pos->num_of_file = s->num_file; + + return UNZ_OK; +} + +extern int ZEXPORT unzGoToFilePos(file, file_pos) + unzFile file; + unz_file_pos* file_pos; +{ + unz_s* s; + int err; + + if (file==NULL || file_pos==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + + /* jump to the right spot */ + s->pos_in_central_dir = file_pos->pos_in_zip_directory; + s->num_file = file_pos->num_of_file; + + /* set the current file */ + err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + /* return results */ + s->current_file_ok = (err == UNZ_OK); + return err; +} + +/* +// Unzip Helper Functions - should be here? +/////////////////////////////////////////// +*/ + +/* + Read the local header of the current zipfile + Check the coherency of the local header and info in the end of central + directory about this file + store in *piSizeVar the size of extra info in local header + (filename and size of extra field data) +*/ +local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar, + poffset_local_extrafield, + psize_local_extrafield) + unz_s* s; + uInt* piSizeVar; + uLong *poffset_local_extrafield; + uInt *psize_local_extrafield; +{ + uLong uMagic,uData,uFlags; + uLong size_filename; + uLong size_extra_field; + int err=UNZ_OK; + + *piSizeVar = 0; + *poffset_local_extrafield = 0; + *psize_local_extrafield = 0; + + if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile + + s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + + + if (err==UNZ_OK) { + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) + err=UNZ_ERRNO; + else if (uMagic!=0x04034b50) + err=UNZ_BADZIPFILE; + } + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) + err=UNZ_ERRNO; +/* + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion)) + err=UNZ_BADZIPFILE; +*/ + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method)) + err=UNZ_BADZIPFILE; + + if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && + (s->cur_file_info.compression_method!=Z_DEFLATED)) + err=UNZ_BADZIPFILE; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */ + err=UNZ_ERRNO; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */ + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && + ((uFlags & 8)==0)) + err=UNZ_BADZIPFILE; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */ + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && + ((uFlags & 8)==0)) + err=UNZ_BADZIPFILE; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */ + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && + ((uFlags & 8)==0)) + err=UNZ_BADZIPFILE; + + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK) + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename)) + err=UNZ_BADZIPFILE; + + *piSizeVar += (uInt)size_filename; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK) + err=UNZ_ERRNO; + *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile + + SIZEZIPLOCALHEADER + size_filename; + *psize_local_extrafield = (uInt)size_extra_field; + + *piSizeVar += (uInt)size_extra_field; + + return err; +} + +/* + Open for reading data the current file in the zipfile. + If there is no error and the file is opened, the return value is UNZ_OK. +*/ +extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password) + unzFile file; + int* method; + int* level; + int raw; + const char* password; +{ + int err=UNZ_OK; + uInt iSizeVar; + unz_s* s; + file_in_zip_read_info_s* pfile_in_zip_read_info; + uLong offset_local_extrafield; /* offset of the local extra field */ + uInt size_local_extrafield; /* size of the local extra field */ +# ifndef NOUNCRYPT + char source[12]; +# else + if (password != NULL) + return UNZ_PARAMERROR; +# endif + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + if (!s->current_file_ok) + return UNZ_PARAMERROR; + + if (s->pfile_in_zip_read != NULL) + unzCloseCurrentFile(file); + + if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar, + &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) + return UNZ_BADZIPFILE; + + pfile_in_zip_read_info = (file_in_zip_read_info_s*) + ALLOC(sizeof(file_in_zip_read_info_s)); + if (pfile_in_zip_read_info==NULL) + return UNZ_INTERNALERROR; + + pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE); + pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield; + pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield; + pfile_in_zip_read_info->pos_local_extrafield=0; + pfile_in_zip_read_info->raw=raw; + + if (pfile_in_zip_read_info->read_buffer==NULL) + { + TRYFREE(pfile_in_zip_read_info); + return UNZ_INTERNALERROR; + } + + pfile_in_zip_read_info->stream_initialised=0; + + if (method!=NULL) + *method = (int)s->cur_file_info.compression_method; + + if (level!=NULL) + { + *level = 6; + switch (s->cur_file_info.flag & 0x06) + { + case 6 : *level = 1; break; + case 4 : *level = 2; break; + case 2 : *level = 9; break; + } + } + + if ((s->cur_file_info.compression_method!=0) && + (s->cur_file_info.compression_method!=Z_DEFLATED)) + err=UNZ_BADZIPFILE; + + pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc; + pfile_in_zip_read_info->crc32=0; + pfile_in_zip_read_info->compression_method = + s->cur_file_info.compression_method; + pfile_in_zip_read_info->filestream=s->filestream; + pfile_in_zip_read_info->z_filefunc=s->z_filefunc; + pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile; + + pfile_in_zip_read_info->stream.total_out = 0; + + if ((s->cur_file_info.compression_method==Z_DEFLATED) && + (!raw)) + { + pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; + pfile_in_zip_read_info->stream.zfree = (free_func)0; + pfile_in_zip_read_info->stream.opaque = (voidpf)0; + pfile_in_zip_read_info->stream.next_in = (voidpf)0; + pfile_in_zip_read_info->stream.avail_in = 0; + + err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS); + if (err == Z_OK) + pfile_in_zip_read_info->stream_initialised=1; + else + { + TRYFREE(pfile_in_zip_read_info); + return err; + } + /* windowBits is passed < 0 to tell that there is no zlib header. + * Note that in this case inflate *requires* an extra "dummy" byte + * after the compressed stream in order to complete decompression and + * return Z_STREAM_END. + * In unzip, i don't wait absolutely Z_STREAM_END because I known the + * size of both compressed and uncompressed data + */ + } + pfile_in_zip_read_info->rest_read_compressed = + s->cur_file_info.compressed_size ; + pfile_in_zip_read_info->rest_read_uncompressed = + s->cur_file_info.uncompressed_size ; + + + pfile_in_zip_read_info->pos_in_zipfile = + s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + + iSizeVar; + + pfile_in_zip_read_info->stream.avail_in = (uInt)0; + + s->pfile_in_zip_read = pfile_in_zip_read_info; + +# ifndef NOUNCRYPT + if (password != NULL) + { + int i; + s->pcrc_32_tab = get_crc_table(); + init_keys(password,s->keys,s->pcrc_32_tab); + if (ZSEEK(s->z_filefunc, s->filestream, + s->pfile_in_zip_read->pos_in_zipfile + + s->pfile_in_zip_read->byte_before_the_zipfile, + SEEK_SET)!=0) + return UNZ_INTERNALERROR; + if(ZREAD(s->z_filefunc, s->filestream,source, 12)<12) + return UNZ_INTERNALERROR; + + for (i = 0; i<12; i++) + zdecode(s->keys,s->pcrc_32_tab,source[i]); + + s->pfile_in_zip_read->pos_in_zipfile+=12; + s->encrypted=1; + } +# endif + + + return UNZ_OK; +} + +extern int ZEXPORT unzOpenCurrentFile (file) + unzFile file; +{ + return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL); +} + +extern int ZEXPORT unzOpenCurrentFilePassword (file, password) + unzFile file; + const char* password; +{ + return unzOpenCurrentFile3(file, NULL, NULL, 0, password); +} + +extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw) + unzFile file; + int* method; + int* level; + int raw; +{ + return unzOpenCurrentFile3(file, method, level, raw, NULL); +} + +/* + Read bytes from the current file. + buf contain buffer where data must be copied + len the size of buf. + + return the number of byte copied if somes bytes are copied + return 0 if the end of file was reached + return <0 with error code if there is an error + (UNZ_ERRNO for IO error, or zLib error for uncompress error) +*/ +extern int ZEXPORT unzReadCurrentFile (file, buf, len) + unzFile file; + voidp buf; + unsigned len; +{ + int err=UNZ_OK; + uInt iRead = 0; + unz_s* s; + file_in_zip_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + + if (pfile_in_zip_read_info->read_buffer == NULL) + return UNZ_END_OF_LIST_OF_FILE; + if (len==0) + return 0; + + pfile_in_zip_read_info->stream.next_out = (Bytef*)buf; + + pfile_in_zip_read_info->stream.avail_out = (uInt)len; + + if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && + (!(pfile_in_zip_read_info->raw))) + pfile_in_zip_read_info->stream.avail_out = + (uInt)pfile_in_zip_read_info->rest_read_uncompressed; + + if ((len>pfile_in_zip_read_info->rest_read_compressed+ + pfile_in_zip_read_info->stream.avail_in) && + (pfile_in_zip_read_info->raw)) + pfile_in_zip_read_info->stream.avail_out = + (uInt)pfile_in_zip_read_info->rest_read_compressed+ + pfile_in_zip_read_info->stream.avail_in; + + while (pfile_in_zip_read_info->stream.avail_out>0) + { + if ((pfile_in_zip_read_info->stream.avail_in==0) && + (pfile_in_zip_read_info->rest_read_compressed>0)) + { + uInt uReadThis = UNZ_BUFSIZE; + if (pfile_in_zip_read_info->rest_read_compressed<uReadThis) + uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed; + if (uReadThis == 0) + return UNZ_EOF; + if (ZSEEK(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + pfile_in_zip_read_info->pos_in_zipfile + + pfile_in_zip_read_info->byte_before_the_zipfile, + ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + if (ZREAD(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + pfile_in_zip_read_info->read_buffer, + uReadThis)!=uReadThis) + return UNZ_ERRNO; + + +# ifndef NOUNCRYPT + if(s->encrypted) + { + uInt i; + for(i=0;i<uReadThis;i++) + pfile_in_zip_read_info->read_buffer[i] = + zdecode(s->keys,s->pcrc_32_tab, + pfile_in_zip_read_info->read_buffer[i]); + } +# endif + + + pfile_in_zip_read_info->pos_in_zipfile += uReadThis; + + pfile_in_zip_read_info->rest_read_compressed-=uReadThis; + + pfile_in_zip_read_info->stream.next_in = + (Bytef*)pfile_in_zip_read_info->read_buffer; + pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis; + } + + if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw)) + { + uInt uDoCopy,i ; + + if ((pfile_in_zip_read_info->stream.avail_in == 0) && + (pfile_in_zip_read_info->rest_read_compressed == 0)) + return (iRead==0) ? UNZ_EOF : iRead; + + if (pfile_in_zip_read_info->stream.avail_out < + pfile_in_zip_read_info->stream.avail_in) + uDoCopy = pfile_in_zip_read_info->stream.avail_out ; + else + uDoCopy = pfile_in_zip_read_info->stream.avail_in ; + + for (i=0;i<uDoCopy;i++) + *(pfile_in_zip_read_info->stream.next_out+i) = + *(pfile_in_zip_read_info->stream.next_in+i); + + pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32, + pfile_in_zip_read_info->stream.next_out, + uDoCopy); + pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy; + pfile_in_zip_read_info->stream.avail_in -= uDoCopy; + pfile_in_zip_read_info->stream.avail_out -= uDoCopy; + pfile_in_zip_read_info->stream.next_out += uDoCopy; + pfile_in_zip_read_info->stream.next_in += uDoCopy; + pfile_in_zip_read_info->stream.total_out += uDoCopy; + iRead += uDoCopy; + } + else + { + uLong uTotalOutBefore,uTotalOutAfter; + const Bytef *bufBefore; + uLong uOutThis; + int flush=Z_SYNC_FLUSH; + + uTotalOutBefore = pfile_in_zip_read_info->stream.total_out; + bufBefore = pfile_in_zip_read_info->stream.next_out; + + /* + if ((pfile_in_zip_read_info->rest_read_uncompressed == + pfile_in_zip_read_info->stream.avail_out) && + (pfile_in_zip_read_info->rest_read_compressed == 0)) + flush = Z_FINISH; + */ + err=inflate(&pfile_in_zip_read_info->stream,flush); + + if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL)) + err = Z_DATA_ERROR; + + uTotalOutAfter = pfile_in_zip_read_info->stream.total_out; + uOutThis = uTotalOutAfter-uTotalOutBefore; + + pfile_in_zip_read_info->crc32 = + crc32(pfile_in_zip_read_info->crc32,bufBefore, + (uInt)(uOutThis)); + + pfile_in_zip_read_info->rest_read_uncompressed -= + uOutThis; + + iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); + + if (err==Z_STREAM_END) + return (iRead==0) ? UNZ_EOF : iRead; + if (err!=Z_OK) + break; + } + } + + if (err==Z_OK) + return iRead; + return err; +} + + +/* + Give the current position in uncompressed data +*/ +extern z_off_t ZEXPORT unztell (file) + unzFile file; +{ + unz_s* s; + file_in_zip_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + return (z_off_t)pfile_in_zip_read_info->stream.total_out; +} + + +/* + return 1 if the end of file was reached, 0 elsewhere +*/ +extern int ZEXPORT unzeof (file) + unzFile file; +{ + unz_s* s; + file_in_zip_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + if (pfile_in_zip_read_info->rest_read_uncompressed == 0) + return 1; + else + return 0; +} + + + +/* + Read extra field from the current file (opened by unzOpenCurrentFile) + This is the local-header version of the extra field (sometimes, there is + more info in the local-header version than in the central-header) + + if buf==NULL, it return the size of the local extra field that can be read + + if buf!=NULL, len is the size of the buffer, the extra header is copied in + buf. + the return value is the number of bytes copied in buf, or (if <0) + the error code +*/ +extern int ZEXPORT unzGetLocalExtrafield (file,buf,len) + unzFile file; + voidp buf; + unsigned len; +{ + unz_s* s; + file_in_zip_read_info_s* pfile_in_zip_read_info; + uInt read_now; + uLong size_to_read; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + size_to_read = (pfile_in_zip_read_info->size_local_extrafield - + pfile_in_zip_read_info->pos_local_extrafield); + + if (buf==NULL) + return (int)size_to_read; + + if (len>size_to_read) + read_now = (uInt)size_to_read; + else + read_now = (uInt)len ; + + if (read_now==0) + return 0; + + if (ZSEEK(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + pfile_in_zip_read_info->offset_local_extrafield + + pfile_in_zip_read_info->pos_local_extrafield, + ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + + if (ZREAD(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + buf,read_now)!=read_now) + return UNZ_ERRNO; + + return (int)read_now; +} + +/* + Close the file in zip opened with unzipOpenCurrentFile + Return UNZ_CRCERROR if all the file was read but the CRC is not good +*/ +extern int ZEXPORT unzCloseCurrentFile (file) + unzFile file; +{ + int err=UNZ_OK; + + unz_s* s; + file_in_zip_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + + if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) && + (!pfile_in_zip_read_info->raw)) + { + if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait) + err=UNZ_CRCERROR; + } + + + TRYFREE(pfile_in_zip_read_info->read_buffer); + pfile_in_zip_read_info->read_buffer = NULL; + if (pfile_in_zip_read_info->stream_initialised) + inflateEnd(&pfile_in_zip_read_info->stream); + + pfile_in_zip_read_info->stream_initialised = 0; + TRYFREE(pfile_in_zip_read_info); + + s->pfile_in_zip_read=NULL; + + return err; +} + + +/* + Get the global comment string of the ZipFile, in the szComment buffer. + uSizeBuf is the size of the szComment buffer. + return the number of byte copied or an error code <0 +*/ +extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf) + unzFile file; + char *szComment; + uLong uSizeBuf; +{ +// int err=UNZ_OK; + unz_s* s; + uLong uReadThis ; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + + uReadThis = uSizeBuf; + if (uReadThis>s->gi.size_comment) + uReadThis = s->gi.size_comment; + + if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + + if (uReadThis>0) + { + *szComment='\0'; + if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis) + return UNZ_ERRNO; + } + + if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment)) + *(szComment+s->gi.size_comment)='\0'; + return (int)uReadThis; +} + +/* Additions by RX '2004 */ +extern uLong ZEXPORT unzGetOffset (file) + unzFile file; +{ + unz_s* s; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + if (!s->current_file_ok) + return 0; + if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff) + if (s->num_file==s->gi.number_entry) + return 0; + return s->pos_in_central_dir; +} + +extern int ZEXPORT unzSetOffset (file, pos) + unzFile file; + uLong pos; +{ + unz_s* s; + int err; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + + s->pos_in_central_dir = pos; + s->num_file = s->gi.number_entry; /* hack */ + err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + s->current_file_ok = (err == UNZ_OK); + return err; +} diff --git a/src/core/zip/MiniZip/unzip.h b/src/core/zip/MiniZip/unzip.h new file mode 100644 index 00000000..b247937c --- /dev/null +++ b/src/core/zip/MiniZip/unzip.h @@ -0,0 +1,354 @@ +/* unzip.h -- IO for uncompress .zip files using zlib + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant + + This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g + WinZip, InfoZip tools and compatible. + + Multi volume ZipFile (span) are not supported. + Encryption compatible with pkzip 2.04g only supported + Old compressions used by old PKZip 1.x are not supported + + + I WAIT FEEDBACK at mail info@winimage.com + Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution + + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + +*/ + +/* for more info about .ZIP format, see + http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip + http://www.info-zip.org/pub/infozip/doc/ + PkWare has also a specification at : + ftp://ftp.pkware.com/probdesc.zip +*/ + +#ifndef _unz_H +#define _unz_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#ifndef _ZLIBIOAPI_H +#include "ioapi.h" +#endif + +#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) +/* like the STRICT of WIN32, we define a pointer that cannot be converted + from (void*) without cast */ +typedef struct TagunzFile__ { int unused; } unzFile__; +typedef unzFile__ *unzFile; +#else +typedef voidp unzFile; +#endif + + +#define UNZ_OK (0) +#define UNZ_END_OF_LIST_OF_FILE (-100) +#define UNZ_ERRNO (Z_ERRNO) +#define UNZ_EOF (0) +#define UNZ_PARAMERROR (-102) +#define UNZ_BADZIPFILE (-103) +#define UNZ_INTERNALERROR (-104) +#define UNZ_CRCERROR (-105) + +/* tm_unz contain date/time info */ +typedef struct tm_unz_s +{ + uInt tm_sec; /* seconds after the minute - [0,59] */ + uInt tm_min; /* minutes after the hour - [0,59] */ + uInt tm_hour; /* hours since midnight - [0,23] */ + uInt tm_mday; /* day of the month - [1,31] */ + uInt tm_mon; /* months since January - [0,11] */ + uInt tm_year; /* years - [1980..2044] */ +} tm_unz; + +/* unz_global_info structure contain global data about the ZIPfile + These data comes from the end of central dir */ +typedef struct unz_global_info_s +{ + uLong number_entry; /* total number of entries in + the central dir on this disk */ + uLong size_comment; /* size of the global comment of the zipfile */ +} unz_global_info; + + +/* unz_file_info contain information about a file in the zipfile */ +typedef struct unz_file_info_s +{ + uLong version; /* version made by 2 bytes */ + uLong version_needed; /* version needed to extract 2 bytes */ + uLong flag; /* general purpose bit flag 2 bytes */ + uLong compression_method; /* compression method 2 bytes */ + uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ + uLong crc; /* crc-32 4 bytes */ + uLong compressed_size; /* compressed size 4 bytes */ + uLong uncompressed_size; /* uncompressed size 4 bytes */ + uLong size_filename; /* filename length 2 bytes */ + uLong size_file_extra; /* extra field length 2 bytes */ + uLong size_file_comment; /* file comment length 2 bytes */ + + uLong disk_num_start; /* disk number start 2 bytes */ + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ + + tm_unz tmu_date; +} unz_file_info; + +extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1, + const char* fileName2, + int iCaseSensitivity)); +/* + Compare two filename (fileName1,fileName2). + If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) + If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi + or strcasecmp) + If iCaseSenisivity = 0, case sensitivity is defaut of your operating system + (like 1 on Unix, 2 on Windows) +*/ + + +extern unzFile ZEXPORT unzOpen OF((const char *path)); +/* + Open a Zip file. path contain the full pathname (by example, + on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer + "zlib/zlib113.zip". + If the zipfile cannot be opened (file don't exist or in not valid), the + return value is NULL. + Else, the return value is a unzFile Handle, usable with other function + of this unzip package. +*/ + +extern unzFile ZEXPORT unzOpen2 OF((const char *path, + zlib_filefunc_def* pzlib_filefunc_def)); +/* + Open a Zip file, like unzOpen, but provide a set of file low level API + for read/write the zip file (see ioapi.h) +*/ + +extern int ZEXPORT unzClose OF((unzFile file)); +/* + Close a ZipFile opened with unzipOpen. + If there is files inside the .Zip opened with unzOpenCurrentFile (see later), + these files MUST be closed with unzipCloseCurrentFile before call unzipClose. + return UNZ_OK if there is no problem. */ + +extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, + unz_global_info *pglobal_info)); +/* + Write info about the ZipFile in the *pglobal_info structure. + No preparation of the structure is needed + return UNZ_OK if there is no problem. */ + + +extern int ZEXPORT unzGetGlobalComment OF((unzFile file, + char *szComment, + uLong uSizeBuf)); +/* + Get the global comment string of the ZipFile, in the szComment buffer. + uSizeBuf is the size of the szComment buffer. + return the number of byte copied or an error code <0 +*/ + + +/***************************************************************************/ +/* Unzip package allow you browse the directory of the zipfile */ + +extern int ZEXPORT unzGoToFirstFile OF((unzFile file)); +/* + Set the current file of the zipfile to the first file. + return UNZ_OK if there is no problem +*/ + +extern int ZEXPORT unzGoToNextFile OF((unzFile file)); +/* + Set the current file of the zipfile to the next file. + return UNZ_OK if there is no problem + return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. +*/ + +extern int ZEXPORT unzLocateFile OF((unzFile file, + const char *szFileName, + int iCaseSensitivity)); +/* + Try locate the file szFileName in the zipfile. + For the iCaseSensitivity signification, see unzStringFileNameCompare + + return value : + UNZ_OK if the file is found. It becomes the current file. + UNZ_END_OF_LIST_OF_FILE if the file is not found +*/ + + +/* ****************************************** */ +/* Ryan supplied functions */ +/* unz_file_info contain information about a file in the zipfile */ +typedef struct unz_file_pos_s +{ + uLong pos_in_zip_directory; /* offset in zip file directory */ + uLong num_of_file; /* # of file */ +} unz_file_pos; + +extern int ZEXPORT unzGetFilePos( + unzFile file, + unz_file_pos* file_pos); + +extern int ZEXPORT unzGoToFilePos( + unzFile file, + unz_file_pos* file_pos); + +/* ****************************************** */ + +extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, + unz_file_info *pfile_info, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize)); +/* + Get Info about the current file + if pfile_info!=NULL, the *pfile_info structure will contain somes info about + the current file + if szFileName!=NULL, the filemane string will be copied in szFileName + (fileNameBufferSize is the size of the buffer) + if extraField!=NULL, the extra field information will be copied in extraField + (extraFieldBufferSize is the size of the buffer). + This is the Central-header version of the extra field + if szComment!=NULL, the comment string of the file will be copied in szComment + (commentBufferSize is the size of the buffer) +*/ + +/***************************************************************************/ +/* for reading the content of the current zipfile, you can open it, read data + from it, and close it (you can close it before reading all the file) + */ + +extern int ZEXPORT unzOpenCurrentFile OF((unzFile file)); +/* + Open for reading data the current file in the zipfile. + If there is no error, the return value is UNZ_OK. +*/ + +extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file, + const char* password)); +/* + Open for reading data the current file in the zipfile. + password is a crypting password + If there is no error, the return value is UNZ_OK. +*/ + +extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file, + int* method, + int* level, + int raw)); +/* + Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) + if raw==1 + *method will receive method of compression, *level will receive level of + compression + note : you can set level parameter as NULL (if you did not want known level, + but you CANNOT set method parameter as NULL +*/ + +extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file, + int* method, + int* level, + int raw, + const char* password)); +/* + Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) + if raw==1 + *method will receive method of compression, *level will receive level of + compression + note : you can set level parameter as NULL (if you did not want known level, + but you CANNOT set method parameter as NULL +*/ + + +extern int ZEXPORT unzCloseCurrentFile OF((unzFile file)); +/* + Close the file in zip opened with unzOpenCurrentFile + Return UNZ_CRCERROR if all the file was read but the CRC is not good +*/ + +extern int ZEXPORT unzReadCurrentFile OF((unzFile file, + voidp buf, + unsigned len)); +/* + Read bytes from the current file (opened by unzOpenCurrentFile) + buf contain buffer where data must be copied + len the size of buf. + + return the number of byte copied if somes bytes are copied + return 0 if the end of file was reached + return <0 with error code if there is an error + (UNZ_ERRNO for IO error, or zLib error for uncompress error) +*/ + +extern z_off_t ZEXPORT unztell OF((unzFile file)); +/* + Give the current position in uncompressed data +*/ + +extern int ZEXPORT unzeof OF((unzFile file)); +/* + return 1 if the end of file was reached, 0 elsewhere +*/ + +extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, + voidp buf, + unsigned len)); +/* + Read extra field from the current file (opened by unzOpenCurrentFile) + This is the local-header version of the extra field (sometimes, there is + more info in the local-header version than in the central-header) + + if buf==NULL, it return the size of the local extra field + + if buf!=NULL, len is the size of the buffer, the extra header is copied in + buf. + the return value is the number of bytes copied in buf, or (if <0) + the error code +*/ + +/***************************************************************************/ + +/* Get the current file offset */ +extern uLong ZEXPORT unzGetOffset (unzFile file); + +/* Set the current file offset */ +extern int ZEXPORT unzSetOffset (unzFile file, uLong pos); + + + +#ifdef __cplusplus +} +#endif + +#endif /* _unz_H */ diff --git a/src/core/zip/MiniZip/zip.c b/src/core/zip/MiniZip/zip.c new file mode 100644 index 00000000..76ac9cf1 --- /dev/null +++ b/src/core/zip/MiniZip/zip.c @@ -0,0 +1,1213 @@ +/* zip.c -- IO on .zip files using zlib + Version 1.01e, February 12th, 2005 + + 27 Dec 2004 Rolf Kalbermatter + Modification to zipOpen2 to support globalComment retrieval. + + Copyright (C) 1998-2005 Gilles Vollant + + Read zip.h for more info +*/ + +#define NOCRYPT +#define NOUNCRYPT + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> +#include "zlib.h" +#include "zip.h" + +#ifdef STDC +# include <stddef.h> +# include <string.h> +# include <stdlib.h> +#endif +#ifdef NO_ERRNO_H + extern int errno; +#else +# include <errno.h> +#endif + + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + +#ifndef VERSIONMADEBY +# define VERSIONMADEBY (0x0) /* platform depedent */ +#endif + +#ifndef Z_BUFSIZE +#define Z_BUFSIZE (16384) +#endif + +#ifndef Z_MAXFILENAMEINZIP +#define Z_MAXFILENAMEINZIP (256) +#endif + +#ifndef ALLOC +# define ALLOC(size) (malloc(size)) +#endif +#ifndef TRYFREE +# define TRYFREE(p) {if (p) free(p);} +#endif + +/* +#define SIZECENTRALDIRITEM (0x2e) +#define SIZEZIPLOCALHEADER (0x1e) +*/ + +/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ + +#ifndef SEEK_CUR +#define SEEK_CUR 1 +#endif + +#ifndef SEEK_END +#define SEEK_END 2 +#endif + +#ifndef SEEK_SET +#define SEEK_SET 0 +#endif + +#ifndef DEF_MEM_LEVEL +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif +#endif +const char zip_copyright[] = + " zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; + + +#define SIZEDATA_INDATABLOCK (4096-(4*4)) + +#define LOCALHEADERMAGIC (0x04034b50) +#define CENTRALHEADERMAGIC (0x02014b50) +#define ENDHEADERMAGIC (0x06054b50) + +#define FLAG_LOCALHEADER_OFFSET (0x06) +#define CRC_LOCALHEADER_OFFSET (0x0e) + +#define SIZECENTRALHEADER (0x2e) /* 46 */ + +typedef struct linkedlist_datablock_internal_s +{ + struct linkedlist_datablock_internal_s* next_datablock; + uLong avail_in_this_block; + uLong filled_in_this_block; + uLong unused; /* for future use and alignement */ + unsigned char data[SIZEDATA_INDATABLOCK]; +} linkedlist_datablock_internal; + +typedef struct linkedlist_data_s +{ + linkedlist_datablock_internal* first_block; + linkedlist_datablock_internal* last_block; +} linkedlist_data; + + +typedef struct +{ + z_stream stream; /* zLib stream structure for inflate */ + int stream_initialised; /* 1 is stream is initialised */ + uInt pos_in_buffered_data; /* last written byte in buffered_data */ + + uLong pos_local_header; /* offset of the local header of the file + currenty writing */ + char* central_header; /* central header data for the current file */ + uLong size_centralheader; /* size of the central header for cur file */ + uLong flag; /* flag of the file currently writing */ + + int method; /* compression method of file currenty wr.*/ + int raw; /* 1 for directly writing raw data */ + Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/ + uLong dosDate; + uLong crc32; + int encrypt; +#ifndef NOCRYPT + unsigned long keys[3]; /* keys defining the pseudo-random sequence */ + const unsigned long* pcrc_32_tab; + int crypt_header_size; +#endif +} curfile_info; + +typedef struct +{ + zlib_filefunc_def z_filefunc; + voidpf filestream; /* io structore of the zipfile */ + linkedlist_data central_dir;/* datablock with central dir in construction*/ + int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/ + curfile_info ci; /* info on the file curretly writing */ + + uLong begin_pos; /* position of the beginning of the zipfile */ + uLong add_position_when_writting_offset; + uLong number_entry; +#ifndef NO_ADDFILEINEXISTINGZIP + char *globalcomment; +#endif +} zip_internal; + + + +#ifndef NOCRYPT +#define INCLUDECRYPTINGCODE_IFCRYPTALLOWED +#include "crypt.h" +#endif + +local linkedlist_datablock_internal* allocate_new_datablock() +{ + linkedlist_datablock_internal* ldi; + ldi = (linkedlist_datablock_internal*) + ALLOC(sizeof(linkedlist_datablock_internal)); + if (ldi!=NULL) + { + ldi->next_datablock = NULL ; + ldi->filled_in_this_block = 0 ; + ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ; + } + return ldi; +} + +local void free_datablock(ldi) + linkedlist_datablock_internal* ldi; +{ + while (ldi!=NULL) + { + linkedlist_datablock_internal* ldinext = ldi->next_datablock; + TRYFREE(ldi); + ldi = ldinext; + } +} + +local void init_linkedlist(ll) + linkedlist_data* ll; +{ + ll->first_block = ll->last_block = NULL; +} + +local int add_data_in_datablock(ll,buf,len) + linkedlist_data* ll; + const void* buf; + uLong len; +{ + linkedlist_datablock_internal* ldi; + const unsigned char* from_copy; + + if (ll==NULL) + return ZIP_INTERNALERROR; + + if (ll->last_block == NULL) + { + ll->first_block = ll->last_block = allocate_new_datablock(); + if (ll->first_block == NULL) + return ZIP_INTERNALERROR; + } + + ldi = ll->last_block; + from_copy = (unsigned char*)buf; + + while (len>0) + { + uInt copy_this; + uInt i; + unsigned char* to_copy; + + if (ldi->avail_in_this_block==0) + { + ldi->next_datablock = allocate_new_datablock(); + if (ldi->next_datablock == NULL) + return ZIP_INTERNALERROR; + ldi = ldi->next_datablock ; + ll->last_block = ldi; + } + + if (ldi->avail_in_this_block < len) + copy_this = (uInt)ldi->avail_in_this_block; + else + copy_this = (uInt)len; + + to_copy = &(ldi->data[ldi->filled_in_this_block]); + + for (i=0;i<copy_this;i++) + *(to_copy+i)=*(from_copy+i); + + ldi->filled_in_this_block += copy_this; + ldi->avail_in_this_block -= copy_this; + from_copy += copy_this ; + len -= copy_this; + } + return ZIP_OK; +} + + + +/****************************************************************************/ + +#ifndef NO_ADDFILEINEXISTINGZIP +/* =========================================================================== + Inputs a long in LSB order to the given file + nbByte == 1, 2 or 4 (byte, short or long) +*/ + +local int ziplocal_putValue OF((const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, uLong x, int nbByte)); +local int ziplocal_putValue (pzlib_filefunc_def, filestream, x, nbByte) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + uLong x; + int nbByte; +{ + unsigned char buf[4]; + int n; + for (n = 0; n < nbByte; n++) + { + buf[n] = (unsigned char)(x & 0xff); + x >>= 8; + } + if (x != 0) + { /* data overflow - hack for ZIP64 (X Roche) */ + for (n = 0; n < nbByte; n++) + { + buf[n] = 0xff; + } + } + + if (ZWRITE(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte) + return ZIP_ERRNO; + else + return ZIP_OK; +} + +local void ziplocal_putValue_inmemory OF((void* dest, uLong x, int nbByte)); +local void ziplocal_putValue_inmemory (dest, x, nbByte) + void* dest; + uLong x; + int nbByte; +{ + unsigned char* buf=(unsigned char*)dest; + int n; + for (n = 0; n < nbByte; n++) { + buf[n] = (unsigned char)(x & 0xff); + x >>= 8; + } + + if (x != 0) + { /* data overflow - hack for ZIP64 */ + for (n = 0; n < nbByte; n++) + { + buf[n] = 0xff; + } + } +} + +/****************************************************************************/ + + +local uLong ziplocal_TmzDateToDosDate(ptm,dosDate) + const tm_zip* ptm; + uLong dosDate; +{ + uLong year = (uLong)ptm->tm_year; + if (year>1980) + year-=1980; + else if (year>80) + year-=80; + return + (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) | + ((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour)); +} + + +/****************************************************************************/ + +local int ziplocal_getByte OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + int *pi)); + +local int ziplocal_getByte(pzlib_filefunc_def,filestream,pi) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + int *pi; +{ + unsigned char c; + int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1); + if (err==1) + { + *pi = (int)c; + return ZIP_OK; + } + else + { + if (ZERROR(*pzlib_filefunc_def,filestream)) + return ZIP_ERRNO; + else + return ZIP_EOF; + } +} + + +/* =========================================================================== + Reads a long in LSB order from the given gz_stream. Sets +*/ +local int ziplocal_getShort OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX)); + +local int ziplocal_getShort (pzlib_filefunc_def,filestream,pX) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + uLong *pX; +{ + uLong x ; + int i; + int err; + + err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==ZIP_OK) + err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int ziplocal_getLong OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX)); + +local int ziplocal_getLong (pzlib_filefunc_def,filestream,pX) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + uLong *pX; +{ + uLong x ; + int i; + int err; + + err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==ZIP_OK) + err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==ZIP_OK) + err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<16; + + if (err==ZIP_OK) + err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<24; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + return err; +} + +#ifndef BUFREADCOMMENT +#define BUFREADCOMMENT (0x400) +#endif +/* + Locate the Central directory of a zipfile (at the end, just before + the global comment) +*/ +local uLong ziplocal_SearchCentralDir OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream)); + +local uLong ziplocal_SearchCentralDir(pzlib_filefunc_def,filestream) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; +{ + unsigned char* buf; + uLong uSizeFile; + uLong uBackRead; + uLong uMaxBack=0xffff; /* maximum size of global comment */ + uLong uPosFound=0; + + if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + + uSizeFile = ZTELL(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackRead<uMaxBack) + { + uLong uReadSize,uReadPos ; + int i; + if (uBackRead+BUFREADCOMMENT>uMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uSizeFile-uReadPos); + if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && + ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) + { + uPosFound = uReadPos+i; + break; + } + + if (uPosFound!=0) + break; + } + TRYFREE(buf); + return uPosFound; +} +#endif /* !NO_ADDFILEINEXISTINGZIP*/ + +/************************************************************/ +extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc_def) + const char *pathname; + int append; + zipcharpc* globalcomment; + zlib_filefunc_def* pzlib_filefunc_def; +{ + zip_internal ziinit; + zip_internal* zi; + int err=ZIP_OK; + + + if (pzlib_filefunc_def==NULL) + fill_fopen_filefunc(&ziinit.z_filefunc); + else + ziinit.z_filefunc = *pzlib_filefunc_def; + + ziinit.filestream = (*(ziinit.z_filefunc.zopen_file)) + (ziinit.z_filefunc.opaque, + pathname, + (append == APPEND_STATUS_CREATE) ? + (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) : + (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING)); + + if (ziinit.filestream == NULL) + return NULL; + ziinit.begin_pos = ZTELL(ziinit.z_filefunc,ziinit.filestream); + ziinit.in_opened_file_inzip = 0; + ziinit.ci.stream_initialised = 0; + ziinit.number_entry = 0; + ziinit.add_position_when_writting_offset = 0; + init_linkedlist(&(ziinit.central_dir)); + + + zi = (zip_internal*)ALLOC(sizeof(zip_internal)); + if (zi==NULL) + { + ZCLOSE(ziinit.z_filefunc,ziinit.filestream); + return NULL; + } + + /* now we add file in a zipfile */ +# ifndef NO_ADDFILEINEXISTINGZIP + ziinit.globalcomment = NULL; + if (append == APPEND_STATUS_ADDINZIP) + { + uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + + uLong size_central_dir; /* size of the central directory */ + uLong offset_central_dir; /* offset of start of central directory */ + uLong central_pos,uL; + + uLong number_disk; /* number of the current dist, used for + spaning ZIP, unsupported, always 0*/ + uLong number_disk_with_CD; /* number the the disk with central dir, used + for spaning ZIP, unsupported, always 0*/ + uLong number_entry; + uLong number_entry_CD; /* total number of entries in + the central dir + (same than number_entry on nospan) */ + uLong size_comment; + + central_pos = ziplocal_SearchCentralDir(&ziinit.z_filefunc,ziinit.filestream); + if (central_pos==0) + err=ZIP_ERRNO; + + if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, + central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=ZIP_ERRNO; + + /* the signature, already checked */ + if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&uL)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of this disk */ + if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of the disk with the start of the central directory */ + if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk_with_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central dir on this disk */ + if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central dir */ + if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + if ((number_entry_CD!=number_entry) || + (number_disk_with_CD!=0) || + (number_disk!=0)) + err=ZIP_BADZIPFILE; + + /* size of the central directory */ + if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&size_central_dir)!=ZIP_OK) + err=ZIP_ERRNO; + + /* offset of start of central directory with respect to the + starting disk number */ + if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&offset_central_dir)!=ZIP_OK) + err=ZIP_ERRNO; + + /* zipfile global comment length */ + if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&size_comment)!=ZIP_OK) + err=ZIP_ERRNO; + + if ((central_pos<offset_central_dir+size_central_dir) && + (err==ZIP_OK)) + err=ZIP_BADZIPFILE; + + if (err!=ZIP_OK) + { + ZCLOSE(ziinit.z_filefunc, ziinit.filestream); + return NULL; + } + + if (size_comment>0) + { + ziinit.globalcomment = ALLOC(size_comment+1); + if (ziinit.globalcomment) + { + size_comment = ZREAD(ziinit.z_filefunc, ziinit.filestream,ziinit.globalcomment,size_comment); + ziinit.globalcomment[size_comment]=0; + } + } + + byte_before_the_zipfile = central_pos - + (offset_central_dir+size_central_dir); + ziinit.add_position_when_writting_offset = byte_before_the_zipfile; + + { + uLong size_central_dir_to_read = size_central_dir; + size_t buf_size = SIZEDATA_INDATABLOCK; + void* buf_read = (void*)ALLOC(buf_size); + if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, + offset_central_dir + byte_before_the_zipfile, + ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + while ((size_central_dir_to_read>0) && (err==ZIP_OK)) + { + uLong read_this = SIZEDATA_INDATABLOCK; + if (read_this > size_central_dir_to_read) + read_this = size_central_dir_to_read; + if (ZREAD(ziinit.z_filefunc, ziinit.filestream,buf_read,read_this) != read_this) + err=ZIP_ERRNO; + + if (err==ZIP_OK) + err = add_data_in_datablock(&ziinit.central_dir,buf_read, + (uLong)read_this); + size_central_dir_to_read-=read_this; + } + TRYFREE(buf_read); + } + ziinit.begin_pos = byte_before_the_zipfile; + ziinit.number_entry = number_entry_CD; + + if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, + offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=ZIP_ERRNO; + } + + if (globalcomment) + { + *globalcomment = ziinit.globalcomment; + } +# endif /* !NO_ADDFILEINEXISTINGZIP*/ + + if (err != ZIP_OK) + { +# ifndef NO_ADDFILEINEXISTINGZIP + TRYFREE(ziinit.globalcomment); +# endif /* !NO_ADDFILEINEXISTINGZIP*/ + TRYFREE(zi); + return NULL; + } + else + { + *zi = ziinit; + return (zipFile)zi; + } +} + +extern zipFile ZEXPORT zipOpen (pathname, append) + const char *pathname; + int append; +{ + return zipOpen2(pathname,append,NULL,NULL); +} + +extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting) + zipFile file; + const char* filename; + const zip_fileinfo* zipfi; + const void* extrafield_local; + uInt size_extrafield_local; + const void* extrafield_global; + uInt size_extrafield_global; + const char* comment; + int method; + int level; + int raw; + int windowBits; + int memLevel; + int strategy; + const char* password; + uLong crcForCrypting; +{ + zip_internal* zi; + uInt size_filename; + uInt size_comment; + uInt i; + int err = ZIP_OK; + +# ifdef NOCRYPT + if (password != NULL) + return ZIP_PARAMERROR; +# endif + + if (file == NULL) + return ZIP_PARAMERROR; + if ((method!=0) && (method!=Z_DEFLATED)) + return ZIP_PARAMERROR; + + zi = (zip_internal*)file; + + if (zi->in_opened_file_inzip == 1) + { + err = zipCloseFileInZip (file); + if (err != ZIP_OK) + return err; + } + + + if (filename==NULL) + filename="-"; + + if (comment==NULL) + size_comment = 0; + else + size_comment = (uInt)strlen(comment); + + size_filename = (uInt)strlen(filename); + + if (zipfi == NULL) + zi->ci.dosDate = 0; + else + { + if (zipfi->dosDate != 0) + zi->ci.dosDate = zipfi->dosDate; + else zi->ci.dosDate = ziplocal_TmzDateToDosDate(&zipfi->tmz_date,zipfi->dosDate); + } + + zi->ci.flag = 0; + if ((level==8) || (level==9)) + zi->ci.flag |= 2; + if (level==2) + zi->ci.flag |= 4; + if (level==1) + zi->ci.flag |= 6; + if (password != NULL) + zi->ci.flag |= 1; + + zi->ci.crc32 = 0; + zi->ci.method = method; + zi->ci.encrypt = 0; + zi->ci.stream_initialised = 0; + zi->ci.pos_in_buffered_data = 0; + zi->ci.raw = raw; + zi->ci.pos_local_header = ZTELL(zi->z_filefunc,zi->filestream) ; + zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + + size_extrafield_global + size_comment; + zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader); + + ziplocal_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4); + /* version info */ + ziplocal_putValue_inmemory(zi->ci.central_header+4,(uLong)VERSIONMADEBY,2); + ziplocal_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2); + ziplocal_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2); + ziplocal_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2); + ziplocal_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4); + ziplocal_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/ + ziplocal_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/ + ziplocal_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/ + ziplocal_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2); + ziplocal_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2); + ziplocal_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2); + ziplocal_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/ + + if (zipfi==NULL) + ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2); + else + ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2); + + if (zipfi==NULL) + ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4); + else + ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4); + + ziplocal_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header- zi->add_position_when_writting_offset,4); + + for (i=0;i<size_filename;i++) + *(zi->ci.central_header+SIZECENTRALHEADER+i) = *(filename+i); + + for (i=0;i<size_extrafield_global;i++) + *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+i) = + *(((const char*)extrafield_global)+i); + + for (i=0;i<size_comment;i++) + *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+ + size_extrafield_global+i) = *(comment+i); + if (zi->ci.central_header == NULL) + return ZIP_INTERNALERROR; + + /* write the local header */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC,4); + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */ + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2); + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2); + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4); + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */ + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */ + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */ + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2); + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield_local,2); + + if ((err==ZIP_OK) && (size_filename>0)) + if (ZWRITE(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename) + err = ZIP_ERRNO; + + if ((err==ZIP_OK) && (size_extrafield_local>0)) + if (ZWRITE(zi->z_filefunc,zi->filestream,extrafield_local,size_extrafield_local) + !=size_extrafield_local) + err = ZIP_ERRNO; + + zi->ci.stream.avail_in = (uInt)0; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + zi->ci.stream.total_in = 0; + zi->ci.stream.total_out = 0; + + if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + zi->ci.stream.zalloc = (alloc_func)0; + zi->ci.stream.zfree = (free_func)0; + zi->ci.stream.opaque = (voidpf)0; + + if (windowBits>0) + windowBits = -windowBits; + + err = deflateInit2(&zi->ci.stream, level, + Z_DEFLATED, windowBits, memLevel, strategy); + + if (err==Z_OK) + zi->ci.stream_initialised = 1; + } +# ifndef NOCRYPT + zi->ci.crypt_header_size = 0; + if ((err==Z_OK) && (password != NULL)) + { + unsigned char bufHead[RAND_HEAD_LEN]; + unsigned int sizeHead; + zi->ci.encrypt = 1; + zi->ci.pcrc_32_tab = get_crc_table(); + /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/ + + sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); + zi->ci.crypt_header_size = sizeHead; + + if (ZWRITE(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead) + err = ZIP_ERRNO; + } +# endif + + if (err==Z_OK) + zi->in_opened_file_inzip = 1; + return err; +} + +extern int ZEXPORT zipOpenNewFileInZip2(file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw) + zipFile file; + const char* filename; + const zip_fileinfo* zipfi; + const void* extrafield_local; + uInt size_extrafield_local; + const void* extrafield_global; + uInt size_extrafield_global; + const char* comment; + int method; + int level; + int raw; +{ + return zipOpenNewFileInZip3 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0); +} + +extern int ZEXPORT zipOpenNewFileInZip (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level) + zipFile file; + const char* filename; + const zip_fileinfo* zipfi; + const void* extrafield_local; + uInt size_extrafield_local; + const void* extrafield_global; + uInt size_extrafield_global; + const char* comment; + int method; + int level; +{ + return zipOpenNewFileInZip2 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, 0); +} + +local int zipFlushWriteBuffer(zi) + zip_internal* zi; +{ + int err=ZIP_OK; + + if (zi->ci.encrypt != 0) + { +#ifndef NOCRYPT + uInt i; + int t; + for (i=0;i<zi->ci.pos_in_buffered_data;i++) + zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, + zi->ci.buffered_data[i],t); +#endif + } + if (ZWRITE(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) + !=zi->ci.pos_in_buffered_data) + err = ZIP_ERRNO; + zi->ci.pos_in_buffered_data = 0; + return err; +} + +extern int ZEXPORT zipWriteInFileInZip (file, buf, len) + zipFile file; + const void* buf; + unsigned len; +{ + zip_internal* zi; + int err=ZIP_OK; + + if (file == NULL) + return ZIP_PARAMERROR; + zi = (zip_internal*)file; + + if (zi->in_opened_file_inzip == 0) + return ZIP_PARAMERROR; + + zi->ci.stream.next_in = (void*)buf; + zi->ci.stream.avail_in = len; + zi->ci.crc32 = crc32(zi->ci.crc32,buf,len); + + while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) + { + if (zi->ci.stream.avail_out == 0) + { + if (zipFlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + } + + + if(err != ZIP_OK) + break; + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + uLong uTotalOutBefore = zi->ci.stream.total_out; + err=deflate(&zi->ci.stream, Z_NO_FLUSH); + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + + } + else + { + uInt copy_this,i; + if (zi->ci.stream.avail_in < zi->ci.stream.avail_out) + copy_this = zi->ci.stream.avail_in; + else + copy_this = zi->ci.stream.avail_out; + for (i=0;i<copy_this;i++) + *(((char*)zi->ci.stream.next_out)+i) = + *(((const char*)zi->ci.stream.next_in)+i); + { + zi->ci.stream.avail_in -= copy_this; + zi->ci.stream.avail_out-= copy_this; + zi->ci.stream.next_in+= copy_this; + zi->ci.stream.next_out+= copy_this; + zi->ci.stream.total_in+= copy_this; + zi->ci.stream.total_out+= copy_this; + zi->ci.pos_in_buffered_data += copy_this; + } + } + } + + return err; +} + +extern int ZEXPORT zipCloseFileInZipRaw (file, uncompressed_size, crc32) + zipFile file; + uLong uncompressed_size; + uLong crc32; +{ + zip_internal* zi; + uLong compressed_size; + int err=ZIP_OK; + + if (file == NULL) + return ZIP_PARAMERROR; + zi = (zip_internal*)file; + + if (zi->in_opened_file_inzip == 0) + return ZIP_PARAMERROR; + zi->ci.stream.avail_in = 0; + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + while (err==ZIP_OK) + { + uLong uTotalOutBefore; + if (zi->ci.stream.avail_out == 0) + { + if (zipFlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + } + uTotalOutBefore = zi->ci.stream.total_out; + err=deflate(&zi->ci.stream, Z_FINISH); + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + } + + if (err==Z_STREAM_END) + err=ZIP_OK; /* this is normal */ + + if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK)) + if (zipFlushWriteBuffer(zi)==ZIP_ERRNO) + err = ZIP_ERRNO; + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + err=deflateEnd(&zi->ci.stream); + zi->ci.stream_initialised = 0; + } + + if (!zi->ci.raw) + { + crc32 = (uLong)zi->ci.crc32; + uncompressed_size = (uLong)zi->ci.stream.total_in; + } + compressed_size = (uLong)zi->ci.stream.total_out; +# ifndef NOCRYPT + compressed_size += zi->ci.crypt_header_size; +# endif + + ziplocal_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/ + ziplocal_putValue_inmemory(zi->ci.central_header+20, + compressed_size,4); /*compr size*/ + if (zi->ci.stream.data_type == Z_ASCII) + ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2); + ziplocal_putValue_inmemory(zi->ci.central_header+24, + uncompressed_size,4); /*uncompr size*/ + + if (err==ZIP_OK) + err = add_data_in_datablock(&zi->central_dir,zi->ci.central_header, + (uLong)zi->ci.size_centralheader); + free(zi->ci.central_header); + + if (err==ZIP_OK) + { + long cur_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream); + if (ZSEEK(zi->z_filefunc,zi->filestream, + zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */ + + if (err==ZIP_OK) /* compressed size, unknown */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4); + + if (err==ZIP_OK) /* uncompressed size, unknown */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4); + + if (ZSEEK(zi->z_filefunc,zi->filestream, + cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + } + + zi->number_entry ++; + zi->in_opened_file_inzip = 0; + + return err; +} + +extern int ZEXPORT zipCloseFileInZip (file) + zipFile file; +{ + return zipCloseFileInZipRaw (file,0,0); +} + +extern int ZEXPORT zipClose (file, global_comment) + zipFile file; + const char* global_comment; +{ + zip_internal* zi; + int err = 0; + uLong size_centraldir = 0; + uLong centraldir_pos_inzip; + uInt size_global_comment; + if (file == NULL) + return ZIP_PARAMERROR; + zi = (zip_internal*)file; + + if (zi->in_opened_file_inzip == 1) + { + err = zipCloseFileInZip (file); + } + +#ifndef NO_ADDFILEINEXISTINGZIP + if (global_comment==NULL) + global_comment = zi->globalcomment; +#endif + if (global_comment==NULL) + size_global_comment = 0; + else + size_global_comment = (uInt)strlen(global_comment); + + centraldir_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream); + if (err==ZIP_OK) + { + linkedlist_datablock_internal* ldi = zi->central_dir.first_block ; + while (ldi!=NULL) + { + if ((err==ZIP_OK) && (ldi->filled_in_this_block>0)) + if (ZWRITE(zi->z_filefunc,zi->filestream, + ldi->data,ldi->filled_in_this_block) + !=ldi->filled_in_this_block ) + err = ZIP_ERRNO; + + size_centraldir += ldi->filled_in_this_block; + ldi = ldi->next_datablock; + } + } + free_datablock(zi->central_dir.first_block); + + if (err==ZIP_OK) /* Magic End */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4); + + if (err==ZIP_OK) /* number of this disk */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); + + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); + + if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + + if (err==ZIP_OK) /* total number of entries in the central dir */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + + if (err==ZIP_OK) /* size of the central directory */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4); + + if (err==ZIP_OK) /* offset of start of central directory with respect to the + starting disk number */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream, + (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4); + + if (err==ZIP_OK) /* zipfile comment length */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2); + + if ((err==ZIP_OK) && (size_global_comment>0)) + if (ZWRITE(zi->z_filefunc,zi->filestream, + global_comment,size_global_comment) != size_global_comment) + err = ZIP_ERRNO; + + if (ZCLOSE(zi->z_filefunc,zi->filestream) != 0) + if (err == ZIP_OK) + err = ZIP_ERRNO; + +#ifndef NO_ADDFILEINEXISTINGZIP + TRYFREE(zi->globalcomment); +#endif + TRYFREE(zi); + + return err; +} diff --git a/src/core/zip/MiniZip/zip.h b/src/core/zip/MiniZip/zip.h new file mode 100644 index 00000000..acacce83 --- /dev/null +++ b/src/core/zip/MiniZip/zip.h @@ -0,0 +1,235 @@ +/* zip.h -- IO for compress .zip files using zlib + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant + + This unzip package allow creates .ZIP file, compatible with PKZip 2.04g + WinZip, InfoZip tools and compatible. + Multi volume ZipFile (span) are not supported. + Encryption compatible with pkzip 2.04g only supported + Old compressions used by old PKZip 1.x are not supported + + For uncompress .zip file, look at unzip.h + + + I WAIT FEEDBACK at mail info@winimage.com + Visit also http://www.winimage.com/zLibDll/unzip.html for evolution + + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + +*/ + +/* for more info about .ZIP format, see + http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip + http://www.info-zip.org/pub/infozip/doc/ + PkWare has also a specification at : + ftp://ftp.pkware.com/probdesc.zip +*/ + +#ifndef _zip_H +#define _zip_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#ifndef _ZLIBIOAPI_H +#include "ioapi.h" +#endif + +#if defined(STRICTZIP) || defined(STRICTZIPUNZIP) +/* like the STRICT of WIN32, we define a pointer that cannot be converted + from (void*) without cast */ +typedef struct TagzipFile__ { int unused; } zipFile__; +typedef zipFile__ *zipFile; +#else +typedef voidp zipFile; +#endif + +#define ZIP_OK (0) +#define ZIP_EOF (0) +#define ZIP_ERRNO (Z_ERRNO) +#define ZIP_PARAMERROR (-102) +#define ZIP_BADZIPFILE (-103) +#define ZIP_INTERNALERROR (-104) + +#ifndef DEF_MEM_LEVEL +# if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +# else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +# endif +#endif +/* default memLevel */ + +/* tm_zip contain date/time info */ +typedef struct tm_zip_s +{ + uInt tm_sec; /* seconds after the minute - [0,59] */ + uInt tm_min; /* minutes after the hour - [0,59] */ + uInt tm_hour; /* hours since midnight - [0,23] */ + uInt tm_mday; /* day of the month - [1,31] */ + uInt tm_mon; /* months since January - [0,11] */ + uInt tm_year; /* years - [1980..2044] */ +} tm_zip; + +typedef struct +{ + tm_zip tmz_date; /* date in understandable format */ + uLong dosDate; /* if dos_date == 0, tmu_date is used */ +/* uLong flag; */ /* general purpose bit flag 2 bytes */ + + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ +} zip_fileinfo; + +typedef const char* zipcharpc; + + +#define APPEND_STATUS_CREATE (0) +#define APPEND_STATUS_CREATEAFTER (1) +#define APPEND_STATUS_ADDINZIP (2) + +extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); +/* + Create a zipfile. + pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on + an Unix computer "zlib/zlib113.zip". + if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip + will be created at the end of the file. + (useful if the file contain a self extractor code) + if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will + add files in existing zip (be sure you don't add file that doesn't exist) + If the zipfile cannot be opened, the return value is NULL. + Else, the return value is a zipFile Handle, usable with other function + of this zip package. +*/ + +/* Note : there is no delete function into a zipfile. + If you want delete file into a zipfile, you must open a zipfile, and create another + Of couse, you can use RAW reading and writing to copy the file you did not want delte +*/ + +extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, + int append, + zipcharpc* globalcomment, + zlib_filefunc_def* pzlib_filefunc_def)); + +extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level)); +/* + Open a file in the ZIP for writing. + filename : the filename in zip (if NULL, '-' without quote will be used + *zipfi contain supplemental information + if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local + contains the extrafield data the the local header + if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global + contains the extrafield data the the local header + if comment != NULL, comment contain the comment string + method contain the compression method (0 for store, Z_DEFLATED for deflate) + level contain the level of compression (can be Z_DEFAULT_COMPRESSION) +*/ + + +extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw)); + +/* + Same than zipOpenNewFileInZip, except if raw=1, we write raw file + */ + +extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCtypting)); + +/* + Same than zipOpenNewFileInZip2, except + windowBits,memLevel,,strategy : see parameter strategy in deflateInit2 + password : crypting password (NULL for no crypting) + crcForCtypting : crc of file to compress (needed for crypting) + */ + + +extern int ZEXPORT zipWriteInFileInZip OF((zipFile file, + const void* buf, + unsigned len)); +/* + Write data in the zipfile +*/ + +extern int ZEXPORT zipCloseFileInZip OF((zipFile file)); +/* + Close the current file in the zipfile +*/ + +extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file, + uLong uncompressed_size, + uLong crc32)); +/* + Close the current file in the zipfile, for fiel opened with + parameter raw=1 in zipOpenNewFileInZip2 + uncompressed_size and crc32 are value for the uncompressed size +*/ + +extern int ZEXPORT zipClose OF((zipFile file, + const char* global_comment)); +/* + Close the zipfile +*/ + +#ifdef __cplusplus +} +#endif + +#endif /* _zip_H */ diff --git a/src/objc/abstract/MCOConstants.h b/src/objc/abstract/MCOConstants.h index 58239811..ef1a8002 100644 --- a/src/objc/abstract/MCOConstants.h +++ b/src/objc/abstract/MCOConstants.h @@ -140,6 +140,8 @@ typedef enum { MCOIMAPMessagesRequestKindGmailMessageID = 1 << 7, /** Gmail Thread ID.*/ MCOIMAPMessagesRequestKindGmailThreadID = 1 << 8, + /** Extra Headers.*/ + MCOIMAPMessagesRequestKindExtraHeaders = 1 << 9, } MCOIMAPMessagesRequestKind; /** It defines the behavior of the STORE flags request.*/ @@ -246,6 +248,8 @@ typedef enum { MCOIMAPCapabilityAuthSKey, /** AUTH=SRP Capability.*/ MCOIMAPCapabilityAuthSRP, + /** AUTH=XOAUTH2 Capability.*/ + MCOIMAPCapabilityXOAuth2 } MCOIMAPCapability; /** Error domain for mailcore.*/ diff --git a/src/objc/abstract/MCOMessageHeader.h b/src/objc/abstract/MCOMessageHeader.h index 6e8eb9bf..4be57af4 100644 --- a/src/objc/abstract/MCOMessageHeader.h +++ b/src/objc/abstract/MCOMessageHeader.h @@ -57,6 +57,18 @@ /** User-Agent.*/ @property (nonatomic, copy) NSString * userAgent; +/** Adds a custom header.*/ +- (void)addHeaderValue:(NSString *)value forName:(NSString *)name; + +/** Remove a given custom header.*/ +- (void)removeHeaderForName:(NSString *)name; + +/** Returns the value of a given custom header.*/ +- (NSString *)headerValueForName:(NSString *)name; + +/** Returns an array with the names of all custom headers.*/ +- (NSArray * /* NSString */)allHeadersNames; + /** Extracted subject (also remove square brackets).*/ - (NSString *) extractedSubject; diff --git a/src/objc/abstract/MCOMessageHeader.mm b/src/objc/abstract/MCOMessageHeader.mm index 427131b0..9374614f 100644 --- a/src/objc/abstract/MCOMessageHeader.mm +++ b/src/objc/abstract/MCOMessageHeader.mm @@ -100,6 +100,21 @@ MCO_OBJC_SYNTHESIZE_ARRAY(setReplyTo, replyTo) MCO_OBJC_SYNTHESIZE_STRING(setSubject, subject) MCO_OBJC_SYNTHESIZE_STRING(setUserAgent, userAgent) +- (void)addHeaderValue:(NSString *)value forName:(NSString *)name { + _nativeHeader->addHeader(MCO_FROM_OBJC(mailcore::String, name), MCO_FROM_OBJC(mailcore::String, value)); +} + +- (NSString *)headerValueForName:(NSString *)name { + return MCO_TO_OBJC(_nativeHeader->headerValueForName((MCO_FROM_OBJC(mailcore::String, name)))); +} +- (void)removeHeaderForName:(NSString *)name { + _nativeHeader->removeHeader(MCO_FROM_OBJC(mailcore::String, name)); +} + +- (NSArray * /* NSString */)allHeadersNames { + return MCO_TO_OBJC(_nativeHeader->allExtraHeadersNames()); +} + - (NSString *) extractedSubject { return MCO_OBJC_BRIDGE_GET(extractedSubject); diff --git a/src/objc/imap/MCOIMAP.h b/src/objc/imap/MCOIMAP.h index a6c1ff0c..f0994042 100644 --- a/src/objc/imap/MCOIMAP.h +++ b/src/objc/imap/MCOIMAP.h @@ -37,5 +37,6 @@ #import <MailCore/MCOIMAPIdentityOperation.h> #import <MailCore/MCOIMAPCapabilityOperation.h> #import <MailCore/MCOIMAPSearchExpression.h> +#import <MailCore/MCOIMAPMessageRenderingOperation.h> #endif diff --git a/src/objc/imap/MCOIMAPFetchMessagesOperation.h b/src/objc/imap/MCOIMAPFetchMessagesOperation.h index 659d9bca..c232764d 100644 --- a/src/objc/imap/MCOIMAPFetchMessagesOperation.h +++ b/src/objc/imap/MCOIMAPFetchMessagesOperation.h @@ -22,6 +22,9 @@ /** This block will be called each time a new message is downloaded. */ @property (nonatomic, copy) MCOIMAPBaseOperationItemProgressBlock progress; +/** Extra headers to request. Must set requestKind | IMAPMessagesRequestKindExtraHeaders */ +@property (nonatomic, copy) NSArray * extraHeaders; + /** Starts the asynchronous fetch operation. diff --git a/src/objc/imap/MCOIMAPFetchMessagesOperation.mm b/src/objc/imap/MCOIMAPFetchMessagesOperation.mm index 6892ab1b..5ae4cfe7 100644 --- a/src/objc/imap/MCOIMAPFetchMessagesOperation.mm +++ b/src/objc/imap/MCOIMAPFetchMessagesOperation.mm @@ -64,4 +64,12 @@ typedef void (^CompletionType)(NSError *error, NSArray * messages, MCOIndexSet * } } +- (void)setExtraHeaders:(NSArray *)extraHeaders { + MCO_NATIVE_INSTANCE->setExtraHeaders(MCO_FROM_OBJC(mailcore::Array, extraHeaders)); +} + +- (NSArray *)extraHeaders { + return MCO_TO_OBJC(MCO_NATIVE_INSTANCE->extraHeaders()); +} + @end diff --git a/src/objc/imap/MCOIMAPMessageRenderingOperation.h b/src/objc/imap/MCOIMAPMessageRenderingOperation.h new file mode 100644 index 00000000..c22909a2 --- /dev/null +++ b/src/objc/imap/MCOIMAPMessageRenderingOperation.h @@ -0,0 +1,35 @@ +// +// MCOIMAPMessageRenderingOperation.h +// mailcore2 +// +// Created by Paul Young on 07/07/2013. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef __MAILCORE_MCOIMAPMESSAGERENDERINGOPERATION_H_ + +#define __MAILCORE_MCOIMAPMESSAGERENDERINGOPERATION_H_ + +#import <MailCore/MCOIMAPBaseOperation.h> + +/** + The class is used to get the HTML string of a message. + */ + +@interface MCOIMAPMessageRenderingOperation : MCOIMAPBaseOperation + +/** + Starts the asynchronous operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `htmlString` will contain the message + + - On failure, `error` will be set and `htmlString` will be nil + */ + +- (void) start:(void (^)(NSString * htmlString, NSError * error))completionBlock; + +@end + +#endif diff --git a/src/objc/imap/MCOIMAPMessageRenderingOperation.mm b/src/objc/imap/MCOIMAPMessageRenderingOperation.mm new file mode 100644 index 00000000..983b6cac --- /dev/null +++ b/src/objc/imap/MCOIMAPMessageRenderingOperation.mm @@ -0,0 +1,61 @@ +// +// MCOIMAPMessageRenderingOperation.mm +// mailcore2 +// +// Created by Paul Young on 07/07/2013. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#import "MCOIMAPMessageRenderingOperation.h" + +#include "MCAsyncIMAP.h" +#include "MCIMAPMessageRenderingOperation.h" + +#import "MCOOperation+Private.h" +#import "MCOUtils.h" + +typedef void (^CompletionType)(NSString * htmlString, NSError * error); + +@implementation MCOIMAPMessageRenderingOperation { + CompletionType _completionBlock; +} + +#define nativeType mailcore::IMAPMessageRenderingOperation + ++ (void) load +{ + MCORegisterClass(self, &typeid(nativeType)); +} + ++ (NSObject *) mco_objectWithMCObject:(mailcore::Object *)object +{ + nativeType * op = (nativeType *) object; + return [[[self alloc] initWithMCOperation:op] autorelease]; +} + +- (void) dealloc +{ + [_completionBlock release]; + [super dealloc]; +} + +- (void)start:(void (^)(NSString * htmlString, NSError * error))completionBlock { + _completionBlock = [completionBlock copy]; + [self start]; +} + +- (void)operationCompleted { + if (_completionBlock == NULL) + return; + + nativeType *op = MCO_NATIVE_INSTANCE; + if (op->error() == mailcore::ErrorNone) { + _completionBlock([NSString mco_stringWithMCString:op->result()], nil); + } else { + _completionBlock(nil, [NSError mco_errorWithErrorCode:op->error()]); + } + [_completionBlock release]; + _completionBlock = nil; +} + +@end diff --git a/src/objc/imap/MCOIMAPSearchExpression.mm b/src/objc/imap/MCOIMAPSearchExpression.mm index dc2e027a..f1bc3046 100644 --- a/src/objc/imap/MCOIMAPSearchExpression.mm +++ b/src/objc/imap/MCOIMAPSearchExpression.mm @@ -84,7 +84,7 @@ + (MCOIMAPSearchExpression *) searchAnd:(MCOIMAPSearchExpression *)expression other:(MCOIMAPSearchExpression *)other { - mailcore::IMAPSearchExpression * result = mailcore::IMAPSearchExpression::searchOr(expression->_nativeExpr, other->_nativeExpr); + mailcore::IMAPSearchExpression * result = mailcore::IMAPSearchExpression::searchAnd(expression->_nativeExpr, other->_nativeExpr); return MCO_TO_OBJC(result); } diff --git a/src/objc/imap/MCOIMAPSession.h b/src/objc/imap/MCOIMAPSession.h index 3a6cbc6f..5db608f7 100644 --- a/src/objc/imap/MCOIMAPSession.h +++ b/src/objc/imap/MCOIMAPSession.h @@ -29,6 +29,8 @@ @class MCOIMAPSearchExpression; @class MCOIMAPIdentityOperation; @class MCOIMAPCapabilityOperation; +@class MCOIMAPMessageRenderingOperation; +@class MCOIMAPMessage; /** This is the main IMAP class from which all operations are created @@ -71,7 +73,7 @@ @property (nonatomic, assign) NSTimeInterval timeout; /** When set to YES, the connection will fail if the certificate is incorrect. */ -@property (nonatomic, assign) BOOL checkCertificateEnabled; +@property (nonatomic, assign, getter=isCheckCertificateEnabled) BOOL checkCertificateEnabled; /** When set to YES, VoIP capability will be enabled on the IMAP connection on iOS */ @property (nonatomic, assign, getter=isVoIPEnabled) BOOL voIPEnabled; @@ -534,6 +536,62 @@ - (MCOIMAPSearchOperation *) searchExpressionOperationWithFolder:(NSString *)folder expression:(MCOIMAPSearchExpression *)expression; +/** @name Rendering Operations */ + +/** + Returns an operation to render the HTML version of a message to be displayed in a web view. + + MCOIMAPMessageRenderingOperation * op = [session htmlRenderingOperationWithMessage:msg + folder:@"INBOX"]; + + [op start:^(NSString * htmlString, NSError * error) { + ... + }]; +*/ +- (MCOIMAPMessageRenderingOperation *) htmlRenderingOperationWithMessage:(MCOIMAPMessage *)message + folder:(NSString *)folder; + +/** + Returns an operation to render the HTML body of a message to be displayed in a web view. + + MCOIMAPMessageRenderingOperation * op = [session htmlBodyRenderingOperationWithMessage:msg + folder:@"INBOX"]; + + [op start:^(NSString * htmlString, NSError * error) { + ... + }]; + */ +- (MCOIMAPMessageRenderingOperation *) htmlBodyRenderingOperationWithMessage:(MCOIMAPMessage *)message + folder:(NSString *)folder; + +/** + Returns an operation to render the plain text version of a message. + + MCOIMAPMessageRenderingOperation * op = [session plainTextRenderingOperationWithMessage:msg + folder:@"INBOX"]; + + [op start:^(NSString * htmlString, NSError * error) { + ... + }]; + */ +- (MCOIMAPMessageRenderingOperation *) plainTextRenderingOperationWithMessage:(MCOIMAPMessage *)message + folder:(NSString *)folder; + +/** + Returns an operation to render the plain text body of a message. + All end of line will be removed and white spaces cleaned up. + This method can be used to generate the summary of the message. + + MCOIMAPMessageRenderingOperation * op = [session plainTextBodyRenderingOperationWithMessage:msg + folder:@"INBOX"]; + + [op start:^(NSString * htmlString, NSError * error) { + ... + }]; + */ +- (MCOIMAPMessageRenderingOperation *) plainTextBodyRenderingOperationWithMessage:(MCOIMAPMessage *)message + folder:(NSString *)folder; + @end #endif diff --git a/src/objc/imap/MCOIMAPSession.mm b/src/objc/imap/MCOIMAPSession.mm index 1dff0f1f..2546e612 100644 --- a/src/objc/imap/MCOIMAPSession.mm +++ b/src/objc/imap/MCOIMAPSession.mm @@ -14,11 +14,14 @@ #import "MCOIMAPOperation.h" #import "MCOIMAPFetchFoldersOperation.h" #import "MCOIMAPBaseOperation+Private.h" +#import "MCOIMAPMessageRenderingOperation.h" #import "MCOUtils.h" #import <MailCore/MCAsync.h> +#include "MCIMAPMessageRenderingOperation.h" + using namespace mailcore; @@ -87,6 +90,16 @@ MCO_OBJC_SYNTHESIZE_SCALAR(char, char, setDelimiter, delimiter) MCO_OBJC_SYNTHESIZE_SCALAR(BOOL, BOOL, setAllowsFolderConcurrentAccessEnabled, allowsFolderConcurrentAccessEnabled) MCO_OBJC_SYNTHESIZE_SCALAR(unsigned int, unsigned int, setMaximumConnections, maximumConnections) +- (void) setDefaultNamespace:(MCOIMAPNamespace *)defaultNamespace +{ + _session->setDefaultNamespace(MCO_FROM_OBJC(IMAPNamespace, defaultNamespace)); +} + +- (MCOIMAPNamespace *) defaultNamespace +{ + return MCO_TO_OBJC(_session->defaultNamespace()); +} + - (void) setConnectionLogger:(MCOConnectionLogger)connectionLogger { [_connectionLogger release]; @@ -354,4 +367,32 @@ MCO_OBJC_SYNTHESIZE_SCALAR(unsigned int, unsigned int, setMaximumConnections, ma _connectionLogger(sender, logType, data); } +- (MCOIMAPMessageRenderingOperation *) htmlRenderingOperationWithMessage:(MCOIMAPMessage *)message + folder:(NSString *)folder +{ + IMAPMessageRenderingOperation * coreOp = MCO_NATIVE_INSTANCE->htmlRenderingOperation(MCO_FROM_OBJC(IMAPMessage, message), [folder mco_mcString]); + return MCO_TO_OBJC_OP(coreOp); +} + +- (MCOIMAPMessageRenderingOperation *) htmlBodyRenderingOperationWithMessage:(MCOIMAPMessage *)message + folder:(NSString *)folder +{ + IMAPMessageRenderingOperation * coreOp = MCO_NATIVE_INSTANCE->htmlBodyRenderingOperation(MCO_FROM_OBJC(IMAPMessage, message), [folder mco_mcString]); + return MCO_TO_OBJC_OP(coreOp); +} + +- (MCOIMAPMessageRenderingOperation *) plainTextRenderingOperationWithMessage:(MCOIMAPMessage *)message + folder:(NSString *)folder +{ + IMAPMessageRenderingOperation * coreOp = MCO_NATIVE_INSTANCE->plainTextRenderingOperation(MCO_FROM_OBJC(IMAPMessage, message), [folder mco_mcString]); + return MCO_TO_OBJC_OP(coreOp); +} + +- (MCOIMAPMessageRenderingOperation *) plainTextBodyRenderingOperationWithMessage:(MCOIMAPMessage *)message + folder:(NSString *)folder +{ + IMAPMessageRenderingOperation * coreOp = MCO_NATIVE_INSTANCE->plainTextBodyRenderingOperation(MCO_FROM_OBJC(IMAPMessage, message), [folder mco_mcString]); + return MCO_TO_OBJC_OP(coreOp); +} + @end diff --git a/tests/test-all.mm b/tests/test-all.mm index c58e5888..552ffe8e 100644 --- a/tests/test-all.mm +++ b/tests/test-all.mm @@ -55,6 +55,8 @@ static mailcore::Data * testMessageBuilder() msg->header()->setBcc(bcc); to->release(); bcc->release(); + MCAssert(msg->header()->allExtraHeadersNames()->count() == 0); + msg->header()->addHeader(MCSTR("X-Custom-Header"), MCSTR("Custom Header Value")); msg->header()->setSubject(MCSTR("Mon projet d'été")); msg->setHTMLBody(MCSTR("<div>Hello <img src=\"cid:1234\"></div>")); msg->addAttachment(mailcore::Attachment::attachmentWithContentsOfFile(MCSTR("first-filename"))); |