diff --git a/.smalltalk.ston b/.smalltalk.ston index e8d96d2a..16c3b2c7 100644 --- a/.smalltalk.ston +++ b/.smalltalk.ston @@ -6,5 +6,10 @@ SmalltalkCISpec { #load : 'Tests', #platforms : [ #squeak ] } - ] + ], + #testing : { + #coverage : { + #packages : [ 'IMAPClient-Core', 'IMAPClient-Protocol' ] + } +} } diff --git a/.squot b/.squot index e56b826e..1815126d 100644 --- a/.squot +++ b/.squot @@ -2,5 +2,6 @@ OrderedDictionary { 'packages\/BaselineOfIMAPClient.package' : #SquotCypressCodeSerializer, 'packages\/IMAPClient-Core.package' : #SquotCypressCodeSerializer, 'packages\/IMAPClient-Tests.package' : #SquotCypressCodeSerializer, - 'packages\/IMAPClient-UI.package' : #SquotCypressCodeSerializer + 'packages\/IMAPClient-UI.package' : #SquotCypressCodeSerializer, + 'packages\/IMAPClient-Protocol.package' : #SquotCypressCodeSerializer } \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 2ca1acad..2506e1af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,9 @@ sudo: false smalltalk: - Squeak-5.1 + - Squeak-5.2 - Squeak-trunk matrix: allow_failures: + - smalltalk: Squeak-trunk diff --git a/README.md b/README.md index ab522c6b..f27635e6 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ We proudly present our IMAP Client for Smalltalk Squeak, which we developed and improved during the summer term 2018 of the Software Engineering course. ## Installation -1. Get [Squeak 5.1 or later](http://www.squeak.org) +1. Get [Squeak 5.2 or later](http://www.squeak.org) 2. Load [Metacello](https://github.com/metacello/metacello) 3. Finally, load the package with the following command: @@ -14,29 +14,11 @@ Metacello new load. ``` -4. Afterwards load additional changes from Squeak-trunk: +4. Now you can setup a Menu Entry under "Apps" using `ICFolderDialog install`. -We needed to use some Squeak Methods, which werent available in Squeak-5.1, so we had to update them manually. -Please follow the following steps: - -1. Open Monticello Browser - -![](screenshots/40866916-aaf887fc-6600-11e8-9dc8-847775df210c.png) - -2. Select `http://source.squeak.org/trunk` on the right and press `open` - -![](screenshots/40867006-45090ee8-6601-11e8-8e89-9d9f6a536792.png) - -3. In the new window search for `Network`, select the newest commit and click `Load` - -![](screenshots/40867029-7fddabc8-6601-11e8-9247-7df69755c6e9.png) - -4. Do the Same for `Collections` - -![](screenshots/40867038-95f11300-6601-11e8-9ce6-70933baae984.png) ## Open -You can open the tool with the command `ICLoginDialog open: ICFolderDialog new` +You can open the tool with the command `ICFolderDialog new` or using a Menu Entry. ## Configuration You can customize the number of mails, which are fetched on the initial update process, and the number of mails which are loaded if you press the `Load older Mails` Button. Default are 100 and 10. Change `ICFolder>>numbersOfHeadersToFetch{AtLoaderOlderMail | AtTheBeginning}` @@ -61,7 +43,7 @@ You can open the tool with the command `ICLoginDialog open: ICFolderDialog new` - Display emails correctly (parse different encodings) ## Usage -Start the IMAP Client with `ICFolderDialog open`. Add new Accounts with the `+` Button. We tested the functionality with the HPI OWA Accounts. But other accounts should work fine. +Start the IMAP Client with `ICFolderDialog new`. Add new Accounts with the `+` Button. We tested the functionality with the HPI OWA Accounts. But other accounts should work fine. ``` Server: owa.hpi.de Port: 993 @@ -70,16 +52,12 @@ Password: xxxxxxx Use SSL: True ``` -## Safety -You don't have to be worried about your passwords, of course we won't save them. After closing the IMAP-Client and reopening it your are welcomed by a password prompt to re-enter your credentials. - -## Issue -There are some open issues left (we wanted to give you a good starting point ;-)) - just kidding, we didn't had enough time to fix all of these, so we left some in the Issues section. +## Security +Your password isn't stored on disk, but visible to your Squeak environment. After closing the IMAP-Client and reopening it your are welcomed by a password prompt to re-enter your credentials. -## Architecture - - ![](screenshots/architecture.png) +## Documentation +Hava a look at the GitHub Project Wiki to find more insights into the project. ## History 2016: Johannes Schneider, Maximilian Söchting, Julian Weise, Alexander Riese, Alexander Loeser @@ -88,6 +66,8 @@ There are some open issues left (we wanted to give you a good starting point ;-) 2018: Claudia Grabowski, Leonard Von Merzljak, Marius Walter, David Hennemann +2019: Paul Methfessel, Martin Taraz, Otto Kissig, Tim Garrels, Felix Rindt + ## Questions If you have any question, feel free to drop us a line :-) diff --git a/packages/BaselineOfIMAPClient.package/.squot-contents b/packages/BaselineOfIMAPClient.package/.squot-contents index 460ade30..4ad0c330 100644 --- a/packages/BaselineOfIMAPClient.package/.squot-contents +++ b/packages/BaselineOfIMAPClient.package/.squot-contents @@ -1,4 +1,4 @@ SquotTrackedObjectMetadata { #objectClassName : #PackageInfo, #serializer : #SquotCypressCodeSerializer -} +} \ No newline at end of file diff --git a/packages/BaselineOfIMAPClient.package/BaselineOfIMAPClient.class/instance/baseline..st b/packages/BaselineOfIMAPClient.package/BaselineOfIMAPClient.class/instance/baseline..st index b0fa26e0..264a13dc 100644 --- a/packages/BaselineOfIMAPClient.package/BaselineOfIMAPClient.class/instance/baseline..st +++ b/packages/BaselineOfIMAPClient.package/BaselineOfIMAPClient.class/instance/baseline..st @@ -8,8 +8,9 @@ baseline: spec package: 'JSON' with: [ spec file: 'JSON-ul.35'; repository: 'http://www.squeaksource.com/JSON' ]; package: 'IMAPClient-Core'; package: 'IMAPClient-UI'; + package: 'IMAPClient-Protocol'; package: 'IMAPClient-Tests' with: [ spec requires: #('default' 'libaries')]. spec - group: 'default' with: #('IMAPClient-UI' 'IMAPClient-Core'); + group: 'default' with: #('IMAPClient-UI' 'IMAPClient-Core' 'IMAPClient-Protocol'); group: 'Tests' with: #('IMAPClient-Tests'); group: 'libaries' with: #('JSON')] \ No newline at end of file diff --git a/packages/BaselineOfIMAPClient.package/BaselineOfIMAPClient.class/methodProperties.json b/packages/BaselineOfIMAPClient.package/BaselineOfIMAPClient.class/methodProperties.json index ce5a1867..8ad73731 100644 --- a/packages/BaselineOfIMAPClient.package/BaselineOfIMAPClient.class/methodProperties.json +++ b/packages/BaselineOfIMAPClient.package/BaselineOfIMAPClient.class/methodProperties.json @@ -2,4 +2,4 @@ "class" : { }, "instance" : { - "baseline:" : "C.G. 7/25/2018 18:25" } } + "baseline:" : "pm 7/12/2019 20:46" } } diff --git a/packages/IMAPClient-Core.package/.squot-contents b/packages/IMAPClient-Core.package/.squot-contents index 460ade30..4ad0c330 100644 --- a/packages/IMAPClient-Core.package/.squot-contents +++ b/packages/IMAPClient-Core.package/.squot-contents @@ -1,4 +1,4 @@ SquotTrackedObjectMetadata { #objectClassName : #PackageInfo, #serializer : #SquotCypressCodeSerializer -} +} \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/README.md b/packages/IMAPClient-Core.package/ICAccountInfo.class/README.md new file mode 100644 index 00000000..4e432a13 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/README.md @@ -0,0 +1 @@ +An ICAccountInfo is a dataobject holding information needed to connect to a server such as server address and user credentials. It also ensures basic IMAP datatype validity. diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/initialUsername.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/initialAccountName.st similarity index 57% rename from packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/initialUsername.st rename to packages/IMAPClient-Core.package/ICAccountInfo.class/class/initialAccountName.st index 82ada6d7..06951f14 100644 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/initialUsername.st +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/initialAccountName.st @@ -1,4 +1,4 @@ constants -initialUsername +initialAccountName ^ String empty \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/class/initialSsl.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/initialSsl.st new file mode 100644 index 00000000..2026b034 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/initialSsl.st @@ -0,0 +1,4 @@ +constants +initialSsl + + ^ true \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/initialPassword.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/invalidHost.st similarity index 61% rename from packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/initialPassword.st rename to packages/IMAPClient-Core.package/ICAccountInfo.class/class/invalidHost.st index 3db644a7..5d3dc878 100644 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/initialPassword.st +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/invalidHost.st @@ -1,4 +1,4 @@ constants -initialPassword +invalidHost ^ String empty \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/defaultPassword.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/invalidPassword.st similarity index 61% rename from packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/defaultPassword.st rename to packages/IMAPClient-Core.package/ICAccountInfo.class/class/invalidPassword.st index 41bafa15..9aa41440 100644 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/defaultPassword.st +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/invalidPassword.st @@ -1,4 +1,4 @@ constants -defaultPassword +invalidPassword ^ String empty \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/class/invalidPort.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/invalidPort.st new file mode 100644 index 00000000..00a17519 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/invalidPort.st @@ -0,0 +1,4 @@ +constants +invalidPort + + ^ -1 \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/defaultUsername.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/invalidUsername.st similarity index 61% rename from packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/defaultUsername.st rename to packages/IMAPClient-Core.package/ICAccountInfo.class/class/invalidUsername.st index 7cd0d2e8..d22aaf19 100644 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/defaultUsername.st +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/invalidUsername.st @@ -1,4 +1,4 @@ constants -defaultUsername +invalidUsername ^ String empty \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/class/newWith..st b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/newWith..st new file mode 100644 index 00000000..ed2fecbd --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/class/newWith..st @@ -0,0 +1,10 @@ +instance creation +newWith: aDataDictionary + + ^ self new + accountName: (aDataDictionary at: 'accountName'); + host: (aDataDictionary at: 'address'); + port: ((aDataDictionary at: 'port') asNumber); + username: (aDataDictionary at: 'username'); + password: (aDataDictionary at: 'password'); + ssl: (aDataDictionary at: 'ssl') \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/accountName..st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/accountName..st new file mode 100644 index 00000000..788db416 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/accountName..st @@ -0,0 +1,4 @@ +accessing +accountName: aString + + accountName := aString \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/accountName.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/accountName.st new file mode 100644 index 00000000..8ce4335f --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/accountName.st @@ -0,0 +1,4 @@ +accessing +accountName + + ^ accountName ifNil: [accountName := self class initialAccountName] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/asDictionary.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/asDictionary.st new file mode 100644 index 00000000..96e81de2 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/asDictionary.st @@ -0,0 +1,14 @@ +accessing +asDictionary + + | dict | + dict := Dictionary new. + dict at: 'ssl' put: self ssl; + at: 'accountName' put: self accountName; + at: 'address' put: self host; + at: 'port' put: self port; + at: 'username' put: self username; + at: 'password' put: self password. + + ^ dict + \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/canConvert..st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/canConvert..st new file mode 100644 index 00000000..3d581a1b --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/canConvert..st @@ -0,0 +1,4 @@ +validation +canConvert: aString + + ^ ('"|\\' asRegex matchesIn: aString) isEmpty \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/hasValidServerInfo.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/hasValidServerInfo.st new file mode 100644 index 00000000..3bf1654c --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/hasValidServerInfo.st @@ -0,0 +1,5 @@ +validation +hasValidServerInfo + + ^ self host ~= self class invalidHost + and: [self port ~= self class invalidPort] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/hasValidUserInfo.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/hasValidUserInfo.st new file mode 100644 index 00000000..0f587741 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/hasValidUserInfo.st @@ -0,0 +1,5 @@ +validation +hasValidUserInfo + + ^ self username ~= self class invalidUsername + and: [self password ~= self class invalidPassword] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/host..st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/host..st new file mode 100644 index 00000000..8e89907c --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/host..st @@ -0,0 +1,4 @@ +accessing +host: aString + + host := aString \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/host.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/host.st new file mode 100644 index 00000000..d37f42d0 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/host.st @@ -0,0 +1,4 @@ +accessing +host + + ^ host ifNil: [host := self class invalidHost] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/isValid.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/isValid.st new file mode 100644 index 00000000..04d5e66f --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/isValid.st @@ -0,0 +1,4 @@ +validation +isValid + + ^ self hasValidServerInfo and: [self hasValidUserInfo] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/password..st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/password..st new file mode 100644 index 00000000..70c69d7f --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/password..st @@ -0,0 +1,5 @@ +accessing +password: aString + + (self canConvert: aString) ifFalse: [self error: (aString, ' is not IMAP convertable')]. + password := aString \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/password.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/password.st new file mode 100644 index 00000000..395fe90d --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/password.st @@ -0,0 +1,4 @@ +accessing +password + + ^ password ifNil: [password := self class invalidPassword] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/passwordAsIMAPString.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/passwordAsIMAPString.st new file mode 100644 index 00000000..b31f189a --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/passwordAsIMAPString.st @@ -0,0 +1,4 @@ +accessing +passwordAsIMAPString + + ^ '"', self password, '"' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/port..st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/port..st new file mode 100644 index 00000000..776415e4 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/port..st @@ -0,0 +1,4 @@ +accessing +port: aNumber + + port := aNumber \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/port.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/port.st new file mode 100644 index 00000000..1cc2b951 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/port.st @@ -0,0 +1,4 @@ +accessing +port + + ^ port ifNil: [port := self class invalidPort] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/printOn..st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/printOn..st new file mode 100644 index 00000000..1ef3c8d5 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/printOn..st @@ -0,0 +1,11 @@ +printing +printOn: aStream + + aStream nextPut: ({ + self accountName. + self host. + self port. + self username. + self password. + self ssl + } joinSeparatedBy: ' ') \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/ssl..st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/ssl..st new file mode 100644 index 00000000..1e08ecbc --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/ssl..st @@ -0,0 +1,4 @@ +accessing +ssl: aBool + + ssl := aBool \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/ssl.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/ssl.st new file mode 100644 index 00000000..cf557743 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/ssl.st @@ -0,0 +1,4 @@ +accessing +ssl + + ^ ssl ifNil: [ssl := self class initialSsl] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/username..st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/username..st new file mode 100644 index 00000000..2d2a64ef --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/username..st @@ -0,0 +1,5 @@ +accessing +username: aString + + (self canConvert: aString) ifFalse: [self error: (aString, ' is not IMAP convertable')]. + username := aString \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/username.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/username.st new file mode 100644 index 00000000..e179e2a8 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/username.st @@ -0,0 +1,4 @@ +accessing +username + + ^ username ifNil: [username := self class invalidUsername] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/usernameAsIMAPString.st b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/usernameAsIMAPString.st new file mode 100644 index 00000000..a15b58c9 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/instance/usernameAsIMAPString.st @@ -0,0 +1,4 @@ +accessing +usernameAsIMAPString + + ^ '"', self username, '"' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAccountInfo.class/methodProperties.json b/packages/IMAPClient-Core.package/ICAccountInfo.class/methodProperties.json new file mode 100644 index 00000000..0d775579 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/methodProperties.json @@ -0,0 +1,30 @@ +{ + "class" : { + "initialAccountName" : "tg 7/10/2019 17:43", + "initialSsl" : "tg 7/10/2019 17:43", + "invalidHost" : "tg 7/10/2019 20:08", + "invalidPassword" : "tg 7/10/2019 20:10", + "invalidPort" : "tg 7/10/2019 20:09", + "invalidUsername" : "tg 7/10/2019 20:10", + "newWith:" : "mt 7/26/2019 15:19" }, + "instance" : { + "accountName" : "tg 7/10/2019 20:20", + "accountName:" : "tg 7/10/2019 17:35", + "asDictionary" : "tg 7/18/2019 23:07", + "canConvert:" : "fr 7/26/2019 15:37", + "hasValidServerInfo" : "tg 7/15/2019 12:08", + "hasValidUserInfo" : "tg 7/15/2019 12:08", + "host" : "tg 7/10/2019 20:06", + "host:" : "tg 7/10/2019 17:11", + "isValid" : "fr 7/26/2019 15:57", + "password" : "tg 7/15/2019 12:11", + "password:" : "tg 7/10/2019 17:18", + "passwordAsIMAPString" : "tg 7/10/2019 17:18", + "port" : "tg 7/10/2019 20:09", + "port:" : "tg 7/10/2019 17:11", + "printOn:" : "fr 7/26/2019 16:52", + "ssl" : "tg 7/10/2019 20:21", + "ssl:" : "tg 7/10/2019 17:34", + "username" : "fr 7/26/2019 15:37", + "username:" : "tg 7/10/2019 17:18", + "usernameAsIMAPString" : "tg 7/10/2019 17:18" } } diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/properties.json b/packages/IMAPClient-Core.package/ICAccountInfo.class/properties.json similarity index 57% rename from packages/IMAPClient-Core.package/ICAuthenticationInfo.class/properties.json rename to packages/IMAPClient-Core.package/ICAccountInfo.class/properties.json index 5f11aa74..f193f3d7 100644 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/properties.json +++ b/packages/IMAPClient-Core.package/ICAccountInfo.class/properties.json @@ -4,11 +4,15 @@ ], "classvars" : [ ], - "commentStamp" : "ms 7/28/2016 11:38", + "commentStamp" : "tg 7/15/2019 12:14", "instvars" : [ + "accountName", + "host", + "port", "username", - "password" ], - "name" : "ICAuthenticationInfo", + "password", + "ssl" ], + "name" : "ICAccountInfo", "pools" : [ ], "super" : "Object", diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/README.md b/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/README.md deleted file mode 100644 index 17717e67..00000000 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/README.md +++ /dev/null @@ -1 +0,0 @@ -An ICAuthenticationInfo is a wrapper for a username-password-combination. \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/for.using..st b/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/for.using..st deleted file mode 100644 index c4d14481..00000000 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/for.using..st +++ /dev/null @@ -1,6 +0,0 @@ -instance creation -for: username using: password - - ^ self new - username: username; - password: password \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/initialize.st b/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/initialize.st deleted file mode 100644 index 1464d999..00000000 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/initialize.st +++ /dev/null @@ -1,5 +0,0 @@ -initialization -initialize - - self username: self class initialUsername. - self password: self class initialPassword \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/isValid.st b/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/isValid.st deleted file mode 100644 index 527a02a9..00000000 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/isValid.st +++ /dev/null @@ -1,4 +0,0 @@ -validation -isValid - - ^ self username ~= self class initialUsername and: [self password ~= self class initialPassword] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/password..st b/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/password..st deleted file mode 100644 index 5e5867f8..00000000 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/password..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -password: anObject - - password := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/password.st b/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/password.st deleted file mode 100644 index 8cd21fde..00000000 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/password.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -password - - ^ password \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/username..st b/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/username..st deleted file mode 100644 index 91b4ea30..00000000 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/username..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -username: anObject - - username := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/username.st b/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/username.st deleted file mode 100644 index 12b3e01f..00000000 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/username.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -username - - ^ username \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/methodProperties.json b/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/methodProperties.json deleted file mode 100644 index 6c5270a1..00000000 --- a/packages/IMAPClient-Core.package/ICAuthenticationInfo.class/methodProperties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "class" : { - "defaultPassword" : "ms 5/17/2016 09:34", - "defaultUsername" : "ms 5/17/2016 09:34", - "for:using:" : "js 5/15/2016 16:38", - "initialPassword" : "jwe 6/15/2016 15:47", - "initialUsername" : "jwe 6/15/2016 15:47" }, - "instance" : { - "initialize" : "jwe 6/15/2016 15:48", - "isValid" : "C.G. 7/25/2018 13:46", - "password" : "js 5/15/2016 16:03", - "password:" : "js 5/15/2016 16:03", - "username" : "js 5/15/2016 16:03", - "username:" : "js 5/15/2016 16:03" } } diff --git a/packages/IMAPClient-Core.package/ICEmail.class/README.md b/packages/IMAPClient-Core.package/ICEmail.class/README.md index 4ae02963..2ed70cc3 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/README.md +++ b/packages/IMAPClient-Core.package/ICEmail.class/README.md @@ -4,4 +4,5 @@ Instance Variables body: The body of the ICEmail. ICEmail>>retrieveBody needs to be called to fill the body. folder: The ICFolder this ICEmail resides in. header: The header of the ICEmail. This gets parsed into the instance variables date, from, to and subject. + date: https://tools.ietf.org/html/rfc2822#page-14, date represents the local time and the zone is the timezone information. \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/asString.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/asString.st index 2a7a6dfa..111c86ac 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/asString.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/asString.st @@ -1,4 +1,4 @@ -print +converting asString ^ self headerAsString, String cr, String cr, self bodyAsString, String cr \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/body..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/body..st index 8291323d..05251127 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/body..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/body..st @@ -1,4 +1,4 @@ accessing -body: anObject +body: aString - body := anObject \ No newline at end of file + body := aString \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/body.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/body.st index d7691e1e..9bac17a8 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/body.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/body.st @@ -1,4 +1,4 @@ accessing body - ^ body \ No newline at end of file + ^ body ifNil: [body := String empty] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/contentTransferEncoding..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/contentTransferEncoding..st index f645b75a..10b2baa5 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/contentTransferEncoding..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/contentTransferEncoding..st @@ -1,4 +1,4 @@ -accessing +accessing-header contentTransferEncoding: aContentTransferEncoding self header at: #contentTransferEncoding put: aContentTransferEncoding \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/contentTransferEncoding.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/contentTransferEncoding.st index 43e32ef7..c3041af7 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/contentTransferEncoding.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/contentTransferEncoding.st @@ -1,4 +1,4 @@ -accessing +accessing-header contentTransferEncoding ^ self header at: #contentTransferEncoding ifAbsent: String empty \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/contentType..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/contentType..st index d66deccd..16c6b2e7 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/contentType..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/contentType..st @@ -1,4 +1,4 @@ -accessing +accessing-header contentType: aContentType self header at: #contentType put: aContentType \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/contentType.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/contentType.st index daacfc96..963be2a1 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/contentType.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/contentType.st @@ -1,4 +1,4 @@ -accessing +accessing-header contentType ^ self header at: #contentType ifAbsent: String empty \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/date..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/date..st index 2a870116..ed9f9c10 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/date..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/date..st @@ -1,4 +1,4 @@ -accessing +accessing-header date: aDate self header at: #date put: aDate \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/date.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/date.st index ca080c15..5c167a0f 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/date.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/date.st @@ -1,4 +1,4 @@ -accessing +accessing-header date ^ self header at: #date ifAbsent: String empty \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/getDateFormatted.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/dateFormatted.st similarity index 55% rename from packages/IMAPClient-Core.package/ICEmail.class/instance/getDateFormatted.st rename to packages/IMAPClient-Core.package/ICEmail.class/instance/dateFormatted.st index eb650d25..2a3fc494 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/getDateFormatted.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/dateFormatted.st @@ -1,15 +1,9 @@ accessing -getDateFormatted - - "Use date in header and convert it into seconds with MailMessage timeFrom Method. - Add localOffset to keep it in LocalTime. - Need to add 1.1.1980 because DateAndTime starts there." +dateFormatted | date formatted | - - self date = '' ifTrue: [^'']. - - date := DateAndTime fromSeconds: self getDateInSeconds. + + date := DateAndTime fromSeconds: self dateInSecondsSinceSqueakEpoch + DateAndTime localOffset asSeconds. formatted := ((date dayOfMonth asString padded: #left to: 2 with: $0) ,'.', (date month asString padded: #left to: 2 with: $0), '.', diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/dateInSecondsSince1980.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/dateInSecondsSince1980.st new file mode 100644 index 00000000..78318af8 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/dateInSecondsSince1980.st @@ -0,0 +1,4 @@ +accessing +dateInSecondsSince1980 + + ^ MailMessage new timeFrom: self date diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/dateInSecondsSinceSqueakEpoch.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/dateInSecondsSinceSqueakEpoch.st new file mode 100644 index 00000000..45d81001 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/dateInSecondsSinceSqueakEpoch.st @@ -0,0 +1,4 @@ +accessing +dateInSecondsSinceSqueakEpoch + + ^ self dateInSecondsSince1980 + (DateAndTime year: 1980 day: 1) asSeconds diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/deleteEmail.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/deleteEmail.st index 4adeb124..64725985 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/deleteEmail.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/deleteEmail.st @@ -1,8 +1,8 @@ -action +endpoint interaction deleteEmail | anICEndPoint | - anICEndPoint := folder endpoint select: self folder path. + anICEndPoint := self folder endpoint select: self folder path. self deleteEmailFromDisk. anICEndPoint deleteEmail: self \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/deleteEmailFromDisk.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/deleteEmailFromDisk.st index 38bd4f1a..a9b94f2f 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/deleteEmailFromDisk.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/deleteEmailFromDisk.st @@ -1,5 +1,5 @@ action deleteEmailFromDisk - folder emails remove: self. - FileDirectory default deleteFileNamed: (self maildirFileName, FileDirectory slash, self uid) \ No newline at end of file + self folder removeMail: self. + FileDirectory default deleteFileNamed: (self maildirFileName, FileDirectory slash, self uniqueID) \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/deleted..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/deleted..st index 2c9cb4a5..52f4a605 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/deleted..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/deleted..st @@ -1,4 +1,4 @@ -accessing +accessing-header deleted: aFlag self header at: #deleted put: aFlag \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/deleted.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/deleted.st index 5978965f..5bffe32f 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/deleted.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/deleted.st @@ -1,4 +1,4 @@ -accessing +accessing-header deleted ^ self header at: #deleted ifAbsent: [false] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/expungeEmails.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/expungeEmails.st index 282b19ed..681989ea 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/expungeEmails.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/expungeEmails.st @@ -1,8 +1,8 @@ -action +endpoint interaction expungeEmails | anICEndPoint | - anICEndPoint := folder endpoint select: self folder path. + anICEndPoint := self folder endpoint select: self folder path. anICEndPoint expungeEmail. self deleteEmailFromDisk \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/flagged..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/flagged..st index c876b3ac..56b1fe75 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/flagged..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/flagged..st @@ -1,4 +1,4 @@ -accessing +accessing-header flagged: aFlag self header at: #flagged put: aFlag \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/flagged.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/flagged.st index 29a4e613..cf3e8a2b 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/flagged.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/flagged.st @@ -1,4 +1,4 @@ -accessing +accessing-header flagged ^ self header at: #flagged ifAbsent: false \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/folder..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/folder..st index 2cf1fce1..fb6cc2a9 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/folder..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/folder..st @@ -1,4 +1,4 @@ accessing -folder: anObject +folder: anICFolder - folder := anObject \ No newline at end of file + folder := anICFolder \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/from..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/from..st index 6a54ae0a..6344ff62 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/from..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/from..st @@ -1,4 +1,4 @@ -accessing +accessing-header from: aSender self header at: #from put: aSender \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/from.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/from.st index b079ccf2..eb78106d 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/from.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/from.st @@ -1,4 +1,4 @@ -accessing +accessing-header from ^ self header at: #from ifAbsent: String empty \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/getDateInSeconds.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/getDateInSeconds.st deleted file mode 100644 index ae7428b2..00000000 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/getDateInSeconds.st +++ /dev/null @@ -1,12 +0,0 @@ -accessing -getDateInSeconds - - "Use date in header and convert it into seconds with MailMessage timeFrom Method. - Add localOffset to keep it in LocalTime. - Need to add 1.1.1980 because DateAndTime starts there." - - self date = '' ifTrue: [^0]. - - ^ (MailMessage new timeFrom: self date) - + (DateAndTime localOffset asSeconds) - + ((Date newDay: 1 year: 1980) asSeconds) \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/header..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/header..st index c46e447e..a1ed9246 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/header..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/header..st @@ -1,4 +1,4 @@ accessing -header: anObject +header: aDictionary - header := anObject \ No newline at end of file + header := aDictionary \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/header.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/header.st index 51873713..73611b42 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/header.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/header.st @@ -1,4 +1,4 @@ accessing header - ^ header \ No newline at end of file + ^ header ifNil: [header := Dictionary new] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/initialize.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/initialize.st deleted file mode 100644 index 75867500..00000000 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/initialize.st +++ /dev/null @@ -1,6 +0,0 @@ -initialization -initialize - - self - header: Dictionary new; - body: String empty \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/isFlaggable.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/isFlaggable.st deleted file mode 100644 index 2f8b96d1..00000000 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/isFlaggable.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -isFlaggable - - ^ true \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/messageID..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/messageID..st index bb160df8..5758a428 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/messageID..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/messageID..st @@ -1,4 +1,4 @@ accessing -messageID: anObject +messageID: aNumber - messageID := anObject \ No newline at end of file + messageID := aNumber \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/modifyFlag..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/modifyFlag..st index 8df7cb40..3e75c10f 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/modifyFlag..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/modifyFlag..st @@ -1,4 +1,4 @@ -fetch body +endpoint interaction modifyFlag: aFlag | anICEndPoint | diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/moveEmail..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/moveEmail..st index 4099fbcb..860deeaf 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/moveEmail..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/moveEmail..st @@ -1,8 +1,8 @@ -action +endpoint interaction moveEmail: aFolder | anICEndPoint | - anICEndPoint := folder endpoint select: self folder path. + anICEndPoint := self folder endpoint select: self folder path. self deleteEmailFromDisk. anICEndPoint moveEmail: self to: aFolder \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/retrieveBody.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/retrieveBody.st index 252b20aa..f57526a0 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/retrieveBody.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/retrieveBody.st @@ -1,16 +1,10 @@ -fetch body +endpoint interaction retrieveBody - | mailbody | - self folder endpoint select: self folder path; fillBodyFor: self. - - "add the Content-Type to mail body --> necessary for correct parsing" - - mailbody := 'Content-Type: ', (self contentType), Character cr, + + ^'Content-Type: ', (self contentType), Character cr, 'Content-Transfer-Encoding: ', self contentTransferEncoding, - Character cr, Character cr, self body. - - ^ mailbody \ No newline at end of file + Character cr, Character cr, self body \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/retrieveFlags.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/retrieveFlags.st index e69a5a3f..2941a06f 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/retrieveFlags.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/retrieveFlags.st @@ -1,4 +1,4 @@ -fetch body +endpoint interaction retrieveFlags - self folder retrieveFlagsFrom: self uid to: self uid \ No newline at end of file + self folder retrieveFlagsFrom: self uniqueID to: self uniqueID \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/saveInMaildir.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/saveInMaildir.st index a5912988..4caafcc5 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/saveInMaildir.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/saveInMaildir.st @@ -4,4 +4,4 @@ saveInMaildir ^ ICFileReadWriter new write: self in: self maildirFileName - as: self uid \ No newline at end of file + as: self uniqueID \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/seen..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/seen..st index 8fcc4300..c9e0215e 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/seen..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/seen..st @@ -1,4 +1,4 @@ -accessing +accessing-header seen: aFlag self header at: #seen put: aFlag \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/seen.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/seen.st index 6d78c663..39577f5c 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/seen.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/seen.st @@ -1,4 +1,4 @@ -accessing +accessing-header seen ^ self header at: #seen ifAbsent: true \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/subject..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/subject..st index 43fac537..423b57c6 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/subject..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/subject..st @@ -1,4 +1,4 @@ -accessing +accessing-header subject: aSubject self header at: #subject put: aSubject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/subject.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/subject.st index b844d34b..7257746c 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/subject.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/subject.st @@ -1,4 +1,4 @@ -accessing +accessing-header subject - ^ self header at: #subject ifAbsent: self defaultSubject \ No newline at end of file + ^ self header at: #subject ifAbsent: String empty \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/to..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/to..st index 29c75489..7774415f 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/to..st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/to..st @@ -1,4 +1,4 @@ -accessing +accessing-header to: aReceiver self header at: #to put: aReceiver \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/to.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/to.st index 1b7bce9f..fae238b0 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/to.st +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/to.st @@ -1,4 +1,4 @@ -accessing +accessing-header to ^ self header at: #to ifAbsent: String empty \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/uid..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/uid..st deleted file mode 100644 index aae87864..00000000 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/uid..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -uid: aString - - uid := aString \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/uid.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/uid.st deleted file mode 100644 index f4afeb61..00000000 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/uid.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -uid - - ^ uid ifNil: [uid := 0] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/uniqueID..st b/packages/IMAPClient-Core.package/ICEmail.class/instance/uniqueID..st new file mode 100644 index 00000000..06ed7317 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/uniqueID..st @@ -0,0 +1,4 @@ +accessing +uniqueID: aString + + uniqueID := aString \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/uniqueID.st b/packages/IMAPClient-Core.package/ICEmail.class/instance/uniqueID.st new file mode 100644 index 00000000..266fee0d --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEmail.class/instance/uniqueID.st @@ -0,0 +1,4 @@ +accessing +uniqueID + + ^ uniqueID ifNil: [uniqueID := 0] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/methodProperties.json b/packages/IMAPClient-Core.package/ICEmail.class/methodProperties.json index 4a177548..0cf78523 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/methodProperties.json +++ b/packages/IMAPClient-Core.package/ICEmail.class/methodProperties.json @@ -3,8 +3,8 @@ }, "instance" : { "asString" : "AR 7/28/2016 14:06", - "body" : "js 6/14/2016 10:37", - "body:" : "js 6/14/2016 10:37", + "body" : "pm 6/3/2019 21:27", + "body:" : "pm 6/9/2019 16:34", "bodyAsString" : "AR 7/28/2016 13:58", "contentTransferEncoding" : "C.G. 7/25/2018 13:46", "contentTransferEncoding:" : "C.G. 7/25/2018 13:46", @@ -12,40 +12,38 @@ "contentType:" : "C.G. 7/25/2018 13:46", "date" : "C.G. 7/25/2018 13:46", "date:" : "C.G. 7/25/2018 13:46", - "defaultSubject" : "ms 6/28/2016 10:08", - "deleteEmail" : "C.G. 7/12/2018 08:07", - "deleteEmailFromDisk" : "C.G. 7/25/2018 13:46", + "dateFormatted" : "tg 7/19/2019 11:31", + "dateInSecondsSince1980" : "tg 7/26/2019 21:04", + "dateInSecondsSinceSqueakEpoch" : "tg 7/19/2019 10:35", + "deleteEmail" : "fr 7/26/2019 15:41", + "deleteEmailFromDisk" : "tg 7/26/2019 21:59", "deleted" : "DH 7/19/2018 21:58", "deleted:" : "DH 7/19/2018 19:43", - "expungeEmails" : "C.G. 7/25/2018 13:47", + "expungeEmails" : "tg 7/26/2019 13:57", "flagged" : "C.G. 7/25/2018 13:47", "flagged:" : "C.G. 7/25/2018 13:47", "folder" : "ms 7/10/2016 13:31", - "folder:" : "ms 7/10/2016 13:31", + "folder:" : "pm 6/14/2019 14:44", "from" : "C.G. 7/25/2018 13:47", "from:" : "C.G. 7/25/2018 13:47", - "getDateFormatted" : "C.G. 7/12/2018 08:08", - "getDateInSeconds" : "C.G. 7/12/2018 08:08", - "header" : "js 6/14/2016 10:39", - "header:" : "js 6/14/2016 10:39", + "header" : "pm 6/3/2019 21:28", + "header:" : "pm 6/9/2019 16:37", "headerAsString" : "C.G. 7/25/2018 13:47", - "initialize" : "mw 5/25/2018 21:46", - "isFlaggable" : "lvm 5/23/2018 13:14", "maildirFileName" : "C.G. 7/25/2018 13:48", "messageID" : "ms 7/10/2016 13:59", - "messageID:" : "ms 7/10/2016 13:59", + "messageID:" : "pm 6/9/2019 16:41", "minimalHeaderAsString" : "DH 6/9/2018 15:31", "modifyFlag:" : "C.G. 7/25/2018 13:48", - "moveEmail:" : "C.G. 7/25/2018 13:48", + "moveEmail:" : "fr 7/26/2019 15:41", "open" : "lvm 5/20/2018 20:10", - "retrieveBody" : "C.G. 7/25/2018 13:48", - "retrieveFlags" : "C.G. 7/25/2018 13:49", - "saveInMaildir" : "C.G. 7/25/2018 13:49", + "retrieveBody" : "ok 7/26/2019 21:07", + "retrieveFlags" : "pm 6/2/2019 15:58", + "saveInMaildir" : "pm 6/2/2019 15:58", "seen" : "C.G. 7/25/2018 13:49", "seen:" : "C.G. 7/25/2018 13:49", - "subject" : "ms 6/28/2016 10:08", + "subject" : "tg 7/19/2019 11:45", "subject:" : "C.G. 7/25/2018 13:49", "to" : "C.G. 7/25/2018 13:49", "to:" : "C.G. 7/25/2018 13:49", - "uid" : "lvm 7/4/2018 11:17", - "uid:" : "C.G. 7/25/2018 13:49" } } + "uniqueID" : "pm 6/2/2019 15:58", + "uniqueID:" : "pm 6/2/2019 15:58" } } diff --git a/packages/IMAPClient-Core.package/ICEmail.class/properties.json b/packages/IMAPClient-Core.package/ICEmail.class/properties.json index c91e5b1f..1c89ec08 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/properties.json +++ b/packages/IMAPClient-Core.package/ICEmail.class/properties.json @@ -4,13 +4,13 @@ ], "classvars" : [ ], - "commentStamp" : "ms 7/28/2016 11:29", + "commentStamp" : "tg 7/19/2019 10:33", "instvars" : [ "body", "header", "folder", "messageID", - "uid" ], + "uniqueID" ], "name" : "ICEmail", "pools" : [ ], diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/accountFolderHashRelevantCharacters.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/accountFolderHashRelevantCharacters.st new file mode 100644 index 00000000..36e94b9e --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/class/accountFolderHashRelevantCharacters.st @@ -0,0 +1,4 @@ +constants +accountFolderHashRelevantCharacters + + ^ 10 \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/addConfiguration..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/addConfiguration..st new file mode 100644 index 00000000..e38e9195 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/class/addConfiguration..st @@ -0,0 +1,5 @@ +storage +addConfiguration: aDictionary + + (self checkValidConfiguration: aDictionary) ifFalse: [self error: 'Not a valid dataDictionary']. + self basicConnectionConfigurations add: aDictionary \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/asProtocolQuote..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/asProtocolQuote..st deleted file mode 100644 index 1ff30f1b..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/asProtocolQuote..st +++ /dev/null @@ -1,4 +0,0 @@ -commands -asProtocolQuote: message - - ^ self protocolQuote, message, self protocolQuote \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/basicConnectionConfigurations.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/basicConnectionConfigurations.st new file mode 100644 index 00000000..af1d215e --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/class/basicConnectionConfigurations.st @@ -0,0 +1,4 @@ +storage +basicConnectionConfigurations + + ^ ConnectionConfigurations ifNil: [ConnectionConfigurations := OrderedCollection new] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/checkValidConfiguration..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/checkValidConfiguration..st new file mode 100644 index 00000000..05cbcc23 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/class/checkValidConfiguration..st @@ -0,0 +1,8 @@ +storage +checkValidConfiguration: aDataDictionary + + ^ (aDataDictionary includesKey: 'username') and: + (aDataDictionary includesKey: 'port') and: + (aDataDictionary includesKey: 'address') and: + (aDataDictionary includesKey: 'accountName') and: + (aDataDictionary includesKey: 'ssl') \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/clearConfigurations.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/clearConfigurations.st new file mode 100644 index 00000000..f8a9c85c --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/class/clearConfigurations.st @@ -0,0 +1,4 @@ +storage +clearConfigurations + + self connectionConfigurations: nil \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/commandFailed.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/commandFailed.st deleted file mode 100644 index 7bef7901..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/commandFailed.st +++ /dev/null @@ -1,4 +0,0 @@ -responses -commandFailed - - ^ {self protocolCommandStart . 'NO'} joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/commandSucceeded.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/commandSucceeded.st deleted file mode 100644 index d57123f9..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/commandSucceeded.st +++ /dev/null @@ -1,4 +0,0 @@ -responses -commandSucceeded - - ^ {self protocolCommandStart . 'OK'} joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/connectionConfigurations..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/connectionConfigurations..st new file mode 100644 index 00000000..6b13ac97 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/class/connectionConfigurations..st @@ -0,0 +1,4 @@ +storage +connectionConfigurations: anOrderedCollection + + ConnectionConfigurations := anOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/connectionConfigurations.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/connectionConfigurations.st new file mode 100644 index 00000000..5c83a0df --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/class/connectionConfigurations.st @@ -0,0 +1,4 @@ +storage +connectionConfigurations + + ^ self basicConnectionConfigurations copy \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/defaultStreamClass.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/defaultStreamClass.st new file mode 100644 index 00000000..42afc49a --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/class/defaultStreamClass.st @@ -0,0 +1,4 @@ +constants +defaultStreamClass + + ^ SocketStream \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/deleteEmail..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/deleteEmail..st deleted file mode 100644 index 153c95b2..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/deleteEmail..st +++ /dev/null @@ -1,4 +0,0 @@ -commands -deleteEmail: messageId - - ^ {self protocolCommandStart . 'STORE' . messageId . '+FLAGS \Deleted'} joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorBadParameter.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorBadParameter.st deleted file mode 100644 index f793a1d0..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorBadParameter.st +++ /dev/null @@ -1,4 +0,0 @@ -errors -errorBadParameter - - ^ 'provided parameter not understood' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorInvalidAuthenticationConfiguration.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorInvalidAuthenticationConfiguration.st deleted file mode 100644 index 241a1d12..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorInvalidAuthenticationConfiguration.st +++ /dev/null @@ -1,4 +0,0 @@ -errors -errorInvalidAuthenticationConfiguration - - ^ 'the provided authentication information is not valid' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorLoginFailed.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorLoginFailed.st deleted file mode 100644 index 92d1b855..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorLoginFailed.st +++ /dev/null @@ -1,4 +0,0 @@ -errors -errorLoginFailed - - ^ 'authentication failed' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorNoConnection.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorNoConnection.st deleted file mode 100644 index 715d80fb..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorNoConnection.st +++ /dev/null @@ -1,4 +0,0 @@ -errors -errorNoConnection - - ^ 'connection not established' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorNoPasswordSet.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorNoPasswordSet.st deleted file mode 100644 index baffc26e..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorNoPasswordSet.st +++ /dev/null @@ -1,4 +0,0 @@ -errors -errorNoPasswordSet - - ^ 'no password set' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorNoUsernameSet.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorNoUsernameSet.st deleted file mode 100644 index 03790ee7..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/errorNoUsernameSet.st +++ /dev/null @@ -1,4 +0,0 @@ -errors -errorNoUsernameSet - - ^ 'username not set' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/expungeEmail.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/expungeEmail.st deleted file mode 100644 index 347c6c2b..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/expungeEmail.st +++ /dev/null @@ -1,4 +0,0 @@ -commands -expungeEmail - - ^ {self protocolCommandStart . 'EXPUNGE'} joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/fetchBodyCommand..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/fetchBodyCommand..st deleted file mode 100644 index e97f27b9..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/fetchBodyCommand..st +++ /dev/null @@ -1,4 +0,0 @@ -commands -fetchBodyCommand: messageId - - ^ {self protocolCommandStart . 'FETCH' . messageId . 'body[TEXT]'} joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/fetchFlagsWithUIDRange.to..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/fetchFlagsWithUIDRange.to..st deleted file mode 100644 index 3ba017d5..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/fetchFlagsWithUIDRange.to..st +++ /dev/null @@ -1,5 +0,0 @@ -commands -fetchFlagsWithUIDRange: aBeginUID to: anEndUID - - ^ {self protocolCommandStart . 'UID FETCH' . (aBeginUID asString, ':', anEndUID asString) . '(FLAGS)'} - joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/fetchHeadersWithUIDRange.to..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/fetchHeadersWithUIDRange.to..st deleted file mode 100644 index a5a3645f..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/fetchHeadersWithUIDRange.to..st +++ /dev/null @@ -1,7 +0,0 @@ -commands -fetchHeadersWithUIDRange: aBeginId to: anEndId - - ^ {self protocolCommandStart . 'UID FETCH' . - (aBeginId asString, ':', anEndId asString) . - '(FLAGS BODY.PEEK[HEADER.FIELDS (from to subject date content-type content-transfer-encoding)])'} - joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/getAllUIDs.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/getAllUIDs.st deleted file mode 100644 index 638abf8e..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/getAllUIDs.st +++ /dev/null @@ -1,4 +0,0 @@ -commands -getAllUIDs - - ^ {self protocolCommandStart . 'UID SEARCH ALL'} joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/lastHeaderLine.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/lastHeaderLine.st deleted file mode 100644 index 81ee30e7..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/lastHeaderLine.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -lastHeaderLine - - ^ ')' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/listCommand.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/listCommand.st deleted file mode 100644 index d8c17b73..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/listCommand.st +++ /dev/null @@ -1,4 +0,0 @@ -commands -listCommand - - ^ {self protocolCommandStart . 'LIST'} joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/loginCommand.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/loginCommand.st deleted file mode 100644 index 331b5a37..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/loginCommand.st +++ /dev/null @@ -1,4 +0,0 @@ -commands -loginCommand - - ^ {self protocolCommandStart . 'LOGIN'} joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/logoutCommand.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/logoutCommand.st deleted file mode 100644 index 83f7ace2..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/logoutCommand.st +++ /dev/null @@ -1,4 +0,0 @@ -commands -logoutCommand - - ^ {self protocolCommandStart . 'LOGOUT'} joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/moveEmail.to..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/moveEmail.to..st deleted file mode 100644 index dbb5a520..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/moveEmail.to..st +++ /dev/null @@ -1,5 +0,0 @@ -commands -moveEmail: messageId to: aFolder - - ^ {self protocolCommandStart . 'MOVE' . messageId . aFolder} joinSeparatedBy: self protocolBlank - diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/noopCommand.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/noopCommand.st deleted file mode 100644 index 737086cd..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/noopCommand.st +++ /dev/null @@ -1,4 +0,0 @@ -commands -noopCommand - - ^ {self protocolCommandStart . 'NOOP'} joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/protocolError.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/protocolError.st deleted file mode 100644 index 611d864c..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/protocolError.st +++ /dev/null @@ -1,4 +0,0 @@ -responses -protocolError - - ^ {self protocolCommandStart . 'BAD'} joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/refreshConnectionIntervalInSeconds.st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/refreshConnectionIntervalInSeconds.st new file mode 100644 index 00000000..8a4ec765 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/class/refreshConnectionIntervalInSeconds.st @@ -0,0 +1,4 @@ +constants +refreshConnectionIntervalInSeconds + + ^ 60 * 10 \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/removeConfiguration..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/removeConfiguration..st new file mode 100644 index 00000000..31ea5484 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/class/removeConfiguration..st @@ -0,0 +1,4 @@ +storage +removeConfiguration: aDictionary + + ^ self basicConnectionConfigurations remove: aDictionary \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/resetFlagFlagged..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/resetFlagFlagged..st deleted file mode 100644 index 8a93e181..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/resetFlagFlagged..st +++ /dev/null @@ -1,5 +0,0 @@ -commands -resetFlagFlagged: messageId - - ^ {self protocolCommandStart . 'STORE' . messageId . '-FLAGS \Flagged'} - joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/resetFlagSeen..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/resetFlagSeen..st deleted file mode 100644 index 4e227e30..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/resetFlagSeen..st +++ /dev/null @@ -1,5 +0,0 @@ -commands -resetFlagSeen: messageId - - ^ {self protocolCommandStart . 'STORE' . messageId . '-FLAGS \Seen'} - joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/selectCommand..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/selectCommand..st deleted file mode 100644 index 80f32bda..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/selectCommand..st +++ /dev/null @@ -1,5 +0,0 @@ -commands -selectCommand: aFolder - - ^ {self protocolCommandStart . 'SELECT' . aFolder} joinSeparatedBy: self protocolBlank - \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/setFlagFlagged..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/setFlagFlagged..st deleted file mode 100644 index 85c11ec8..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/setFlagFlagged..st +++ /dev/null @@ -1,5 +0,0 @@ -commands -setFlagFlagged: messageId - - ^ {self protocolCommandStart . 'STORE' . messageId . '+FLAGS \Flagged'} - joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/setFlagSeen..st b/packages/IMAPClient-Core.package/ICEndPoint.class/class/setFlagSeen..st deleted file mode 100644 index a47a3638..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/setFlagSeen..st +++ /dev/null @@ -1,5 +0,0 @@ -commands -setFlagSeen: messageId - - ^ {self protocolCommandStart . 'STORE' . messageId . '+FLAGS \Seen'} - joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/accountInfo..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/accountInfo..st new file mode 100644 index 00000000..a39c49ab --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/accountInfo..st @@ -0,0 +1,4 @@ +accessing +accountInfo: anICAccountInfo + + accountInfo := anICAccountInfo \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/accountInfo.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/accountInfo.st new file mode 100644 index 00000000..732e13c9 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/accountInfo.st @@ -0,0 +1,4 @@ +accessing +accountInfo + + ^ accountInfo ifNil: [accountInfo := ICAccountInfo new] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/asAccountInfoDictionary.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/asAccountInfoDictionary.st new file mode 100644 index 00000000..13336518 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/asAccountInfoDictionary.st @@ -0,0 +1,4 @@ +accessing +asAccountInfoDictionary + + ^ self accountInfo asDictionary \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/asDictionary.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/asDictionary.st deleted file mode 100644 index 9bd83ad9..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/asDictionary.st +++ /dev/null @@ -1,17 +0,0 @@ -accessing -asDictionary - - "returns endpoint data as dictionary" - - | dataDictionary | - - dataDictionary := Dictionary new. - - dataDictionary at: 'ssl' put: (self ssl). - dataDictionary at: 'name:' put: (self name). - dataDictionary at: 'address' put: (self serverInfo host). - dataDictionary at: 'port' put: (self serverInfo port). - dataDictionary at: 'username' put: (self authenticationInfo username). - dataDictionary at: 'password' put: (self authenticationInfo password). - - ^ dataDictionary \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/authenticationInfo..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/authenticationInfo..st deleted file mode 100644 index a5fa38e8..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/authenticationInfo..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -authenticationInfo: anObject - - authenticationInfo := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/authenticationInfo.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/authenticationInfo.st deleted file mode 100644 index e6496680..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/authenticationInfo.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -authenticationInfo - - ^ authenticationInfo \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkConnected.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkConnected.st index fac8fdbe..3cadb894 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkConnected.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkConnected.st @@ -1,6 +1,6 @@ error handling checkConnected - + (self fatalErrorOccured) ifTrue: [^ false]. diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkForBadRequest.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkForBadRequest.st index 313c98e5..70bd2bda 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkForBadRequest.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkForBadRequest.st @@ -4,7 +4,7 @@ checkForBadRequest (self fatalErrorOccured) ifTrue: [^ false]. - self responseIsError ifTrue: [ + (ICParser responseIsError: self stream lastResponse) ifTrue: [ self fatalErrorOccured: true. ^ Error signal: self class errorBadProtocol]. diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkForParameterError.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkForParameterError.st index 7895a720..05990c8b 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkForParameterError.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkForParameterError.st @@ -1,12 +1,12 @@ -connection +error handling checkForParameterError (self fatalErrorOccured) ifTrue: [^ false]. - self responseIsParameterError ifTrue: [ + (ICParser responseIsParameterError: self stream lastResponse) ifTrue: [ self fatalErrorOccured: true. - UIManager default inform: 'Wrong username or password'. + self inform: 'Wrong username or password'. ^ true]. ^ false \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkLoggedIn.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkLoggedIn.st index 763cc8ef..1cd60beb 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkLoggedIn.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkLoggedIn.st @@ -4,7 +4,7 @@ checkLoggedIn (self fatalErrorOccured) ifTrue: [^ false]. - self isLoggedIn ifFalse: [ + self loggedIn ifFalse: [ self fatalErrorOccured: true. ^ false]. diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/close.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/close.st index a90093ec..3ddbc858 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/close.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/close.st @@ -1,4 +1,4 @@ -login +connection close self stream close. diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/commandSucceeded.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/commandSucceeded.st deleted file mode 100644 index 305e221d..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/commandSucceeded.st +++ /dev/null @@ -1,4 +0,0 @@ -protocol parse -commandSucceeded - - ^ self stream lastResponse beginsWith: self class commandSucceeded \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connect.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connect.st new file mode 100644 index 00000000..c82e12a5 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connect.st @@ -0,0 +1,4 @@ +connection +connect + + self connectWith: self class defaultStreamClass \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectAndLoginWith..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectAndLoginWith..st new file mode 100644 index 00000000..2ff6dfa8 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectAndLoginWith..st @@ -0,0 +1,14 @@ +connection +connectAndLoginWith: anICAccountInfo + + self accountInfo: anICAccountInfo. + + [self + connect; + login] + valueWithin: 2 seconds + onTimeout: [ + (self fatalErrorOccured) + ifFalse: [ + self inform: 'Connection could not be established'. + self fatalErrorOccured: true]] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectTo.on..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectTo.on..st deleted file mode 100644 index 80f45b3d..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectTo.on..st +++ /dev/null @@ -1,4 +0,0 @@ -connection -connectTo: host on: port - - self connectTo: (ICServerInfo for: host using: port) with: SocketStream \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectTo.on.with..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectTo.on.with..st deleted file mode 100644 index 439fd4f5..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectTo.on.with..st +++ /dev/null @@ -1,4 +0,0 @@ -connection -connectTo: aHost on: aPort with: aStreamClass - - self connectTo: (ICServerInfo for: aHost using: aPort) with: aStreamClass \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectTo.with..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectTo.with..st deleted file mode 100644 index 7f0f4e7b..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectTo.with..st +++ /dev/null @@ -1,12 +0,0 @@ -connection -connectTo: serverInfo with: aStreamClass - - serverInfo isValid ifFalse: [^ Error signal: self class errorInvalidConnectionConfiguration]. - - self serverInfo: serverInfo. - [self stream - ssl: self useSSL; - connectTo: self serverInfo host on: self serverInfo port with: aStreamClass; - nextResponse "skip server greetings"] - on: Error - do: [self fatalErrorOccured: true] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectWith..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectWith..st new file mode 100644 index 00000000..a729d3ad --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectWith..st @@ -0,0 +1,11 @@ +connection +connectWith: aStreamClass + + self accountInfo isValid ifFalse: [^ Error signal: self class errorInvalidConnectionConfiguration]. + + [self stream + ssl: self accountInfo ssl; + connectTo: self accountInfo host on: self accountInfo port with: aStreamClass; + nextResponse "skip server greetings"] + on: Error + do: [self fatalErrorOccured: true] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/createEmailsWith.andName.and..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/createEmailsWith.andName.and..st index 29974bc5..91c085a0 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/createEmailsWith.andName.and..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/createEmailsWith.andName.and..st @@ -1,25 +1,20 @@ -connection +storage createEmailsWith: maildirDirectory andName: directoryName and: relativeRootFolder - "this loads mails from storage and create ICFolder with ICMails in it." - - | serverDirectory filereader email folder | + | serverDirectory filereader folder | serverDirectory := maildirDirectory directoryNamed: directoryName. filereader := ICFileReadWriter new. - "for each directory create Folder" - (serverDirectory directoryNames) do: [:foldername | + serverDirectory directoryNames do: [:foldername | folder := (ICFolder new) - name: foldername; + folderName: foldername; endpoint: self; yourself. - relativeRootFolder addFolder: folder. self createEmailsWith: serverDirectory andName: foldername and: folder]. - "add mails in a directory to parent folder" - (serverDirectory) fileNames do: [:filename | - email := (filereader get: filename in: (maildirDirectory fullPathFor: directoryName)). - email folder: relativeRootFolder. - relativeRootFolder emails add: email] \ No newline at end of file + relativeRootFolder addMails: (serverDirectory fileNames collect: [:filename | + (filereader get: filename in: (maildirDirectory fullPathFor: directoryName)) + folder: relativeRootFolder; + yourself ]). diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/currentUIDs.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/currentUIDs.st new file mode 100644 index 00000000..099790d6 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/currentUIDs.st @@ -0,0 +1,12 @@ +fetching +currentUIDs + + self + sendCommand: ICCommand allUIDs; + fetchNextResponse. + + self + uids: ((self lastResponse first subStrings: ' ') asOrderedCollection + removeFirst; + removeFirst; + yourself) \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/currentUIDsFor..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/currentUIDsFor..st new file mode 100644 index 00000000..e09ca2c1 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/currentUIDsFor..st @@ -0,0 +1,23 @@ +fetching +currentUIDsFor: anICFolder + + | isEmpty | + + self select: anICFolder path. + isEmpty := true. + + self lastResponse do: + [:line | (line findString: 'EXISTS') positive + ifTrue: [isEmpty := false]]. + + isEmpty + ifFalse: [ + self + sendCommand: ICCommand allUIDs; + fetchNextResponse. + self + uids: ((self lastResponse first subStrings: ' ') asOrderedCollection + removeFirst; + removeFirst; + yourself)] + ifTrue: [^ OrderedCollection new] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/deleteEmail..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/deleteEmail..st index f10f3a53..e3bdd6fd 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/deleteEmail..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/deleteEmail..st @@ -1,6 +1,6 @@ delete deleteEmail: anEmail - - self sendCommand: (self class deleteEmail: anEmail messageID). + + self sendCommand: (ICCommand deleteEmail: anEmail messageID). self fetchNextResponse. self moveEmail: anEmail to: self folderNameOfTrash \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/expungeEmail.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/expungeEmail.st index a6940ac7..563f64b9 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/expungeEmail.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/expungeEmail.st @@ -1,5 +1,5 @@ delete expungeEmail - self sendCommand: (self class expungeEmail). + self sendCommand: ICCommand expungeEmail. self fetchNextResponse diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fatalErrorOccured..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fatalErrorOccured..st index 3886392f..15c1305f 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fatalErrorOccured..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fatalErrorOccured..st @@ -1,7 +1,4 @@ -as yet unclassified +accessing fatalErrorOccured: aBoolean - "If an error occured, that makes it impossible for a connection to be established, - set this variable to true, so other checks do not have to be passed" - fatalErrorOccured := aBoolean \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fatalErrorOccured.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fatalErrorOccured.st index e066e336..56f7775b 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fatalErrorOccured.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fatalErrorOccured.st @@ -1,7 +1,4 @@ -as yet unclassified +accessing fatalErrorOccured - - "If an error occured, that makes it impossible for a connection to be established, - set this variable to true, so other checks do not have to be passed" - ^ fatalErrorOccured \ No newline at end of file + ^ fatalErrorOccured ifNil: [fatalErrorOccured := false] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fetchMailsBeginningAt.number..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fetchMailsBeginningAt.number..st index a9a438e2..9bf0b407 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fetchMailsBeginningAt.number..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fetchMailsBeginningAt.number..st @@ -8,7 +8,7 @@ fetchMailsBeginningAt: aBeginUID number: numberOfMessages numberToFetch := numberOfMessages. - self getCurrentUIDs. + self currentUIDs. possibleUID := self uids select: [:uid | uid asNumber < aBeginUID]. possibleUID size < numberToFetch ifTrue: [numberToFetch := possibleUID size]. diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fetchNextResponse.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fetchNextResponse.st index 08fd6831..327143a6 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fetchNextResponse.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fetchNextResponse.st @@ -9,7 +9,7 @@ fetchNextResponse checkForBadRequest; checkForParameterError. - [(self stream lastResponse beginsWith: self class commandSucceeded)] + [ICParser commandSucceeded: self stream lastResponse] whileFalse: [ multiLineResponse add: self stream lastResponse. self stream nextResponse]. diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fillBodyFor..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fillBodyFor..st index 9ea911ce..cea02782 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fillBodyFor..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fillBodyFor..st @@ -1,7 +1,7 @@ -connection +login fillBodyFor: anEmail self - sendCommand: (self class fetchBodyCommand: anEmail messageID); + sendCommand: (ICCommand fetchBody: anEmail messageID); fetchNextResponse. - anEmail body: self parseFetchBody \ No newline at end of file + anEmail body: (ICParser parseFetchBody: self lastResponse) \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderFromResponse..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderFromResponse..st index 7ea4e4cf..b52fa55d 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderFromResponse..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderFromResponse..st @@ -1,9 +1,16 @@ protocol parse folderFromResponse: responseLine - | folderPath parent | + | folder folderPath parent namePart| - folderPath := self folderPathFrom: responseLine. + + namePart := (responseLine copyAfter: ICCommand protocolQuote asCharacter). + + folder := ICParser parseFolderPathFrom: namePart. + self hierarchyDelimiter: folder hierarchyDelimiter. + folderPath := folder pathAsArray. + + (responseLine includesSubstring: '\Trash') ifTrue: [self folderNameOfTrash: folderPath first]. parent := self rootFolder childFolderNamed: folderPath first ifAbsent: [ICFolder named: folderPath first in: self rootFolder with: self]. diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderNameOfTrash..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderNameOfTrash..st new file mode 100644 index 00000000..5f4cf9af --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderNameOfTrash..st @@ -0,0 +1,4 @@ +accessing +folderNameOfTrash: aNameString + + folderNameOfTrash := aNameString \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderNameOfTrash.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderNameOfTrash.st index 80a899f3..1fd6d3ee 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderNameOfTrash.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderNameOfTrash.st @@ -1,4 +1,4 @@ accessing folderNameOfTrash - ^ 'Trash' \ No newline at end of file + ^ folderNameOfTrash \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderPathFrom..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderPathFrom..st deleted file mode 100644 index 40989c2c..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/folderPathFrom..st +++ /dev/null @@ -1,11 +0,0 @@ -protocol parse -folderPathFrom: responseLine - - | response splittedResponse folderName | - - response := responseLine copyReplaceAll: self class protocolQuote with: String empty. - splittedResponse := response subStrings: self class protocolBlank. - self hierarchyDelimiter: splittedResponse first. - folderName := splittedResponse allButFirst joinSeparatedBy: ' '. - - ^ folderName subStrings: self hierarchyDelimiter \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fromDictionary..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fromDictionary..st deleted file mode 100644 index 61550d38..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/fromDictionary..st +++ /dev/null @@ -1,14 +0,0 @@ -accessing -fromDictionary: configData - - [self - ssl: (configData at: 'ssl'); - name: (configData at: 'name'); - connectTo: (configData at: 'address') on: ((configData at: 'port') asNumber); - login: (configData at: 'username') using: (configData at: 'password')] - valueWithin: 2 seconds - onTimeout: [ - (self fatalErrorOccured) - ifFalse: [ - UIManager default inform: 'Connection could not be established'. - self fatalErrorOccured: true]] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/getCurrentUIDs.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/getCurrentUIDs.st deleted file mode 100644 index 5b32adbd..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/getCurrentUIDs.st +++ /dev/null @@ -1,12 +0,0 @@ -fetching -getCurrentUIDs - - self - sendCommand: self class getAllUIDs; - fetchNextResponse. - - self - uids: (((self lastResponse at: 1) subStrings: ' ') asOrderedCollection - removeFirst; - removeFirst; - yourself) \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/getCurrentUIDsFor..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/getCurrentUIDsFor..st deleted file mode 100644 index 3fd499e2..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/getCurrentUIDsFor..st +++ /dev/null @@ -1,25 +0,0 @@ -fetching -getCurrentUIDsFor: anICFolder - - | isEmpty | - - self select: anICFolder path. - isEmpty := true. - - (self lastResponse do: - [:line | (line findString: 'EXISTS') > 0 - ifTrue: [isEmpty := false]]). - - isEmpty - ifFalse: [ - self - sendCommand: self class getAllUIDs; - fetchNextResponse. - self - uids: (((self lastResponse at: 1) subStrings: ' ') asOrderedCollection - removeFirst; - removeFirst; - yourself)] - ifTrue: [ - Transcript show: (anICFolder name), ' is an empty folder!'. - ^ OrderedCollection new] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/getRootFolderName.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/getRootFolderName.st deleted file mode 100644 index ec07b47c..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/getRootFolderName.st +++ /dev/null @@ -1,7 +0,0 @@ -accessing -getRootFolderName - - "this accounts are saved with a hashed name, because we could otherwise get problems with - special tokens like @ or spaces in server-host or username" - - ^ ICHelper getHashNameForAccount: (self serverInfo host) and: (self authenticationInfo username) \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/host.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/host.st new file mode 100644 index 00000000..0dfb37ae --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/host.st @@ -0,0 +1,4 @@ +accessing +host + + ^ self accountInfo host \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/initialize.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/initialize.st deleted file mode 100644 index 0a10750e..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/initialize.st +++ /dev/null @@ -1,15 +0,0 @@ -initialization -initialize - - super initialize. - - self - loggedIn: false; - serverInfo: ICServerInfo new; - ssl: false; - name: ''; - authenticationInfo: ICAuthenticationInfo new; - stream: ICStreamWrapper new; - rootFolder: (ICFolder newRootFolderWith: self); - lastResponse: OrderedCollection new; - fatalErrorOccured: false \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/isConnected.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/isConnected.st index 4bfa714b..65478afe 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/isConnected.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/isConnected.st @@ -1,4 +1,4 @@ -login +connection isConnected ^ self stream isConnected \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/isLoggedIn.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/isLoggedIn.st deleted file mode 100644 index db9a45a7..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/isLoggedIn.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -isLoggedIn - - ^ self loggedIn \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/lastResponse..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/lastResponse..st index 73671fc0..21c35674 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/lastResponse..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/lastResponse..st @@ -1,4 +1,4 @@ accessing -lastResponse: anObject +lastResponse: anOrderedCollection - lastResponse := anObject \ No newline at end of file + lastResponse := anOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/lastResponse.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/lastResponse.st index 2c95b3a7..5364b267 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/lastResponse.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/lastResponse.st @@ -1,4 +1,4 @@ accessing lastResponse - ^ lastResponse \ No newline at end of file + ^ lastResponse ifNil: [lastResponse := OrderedCollection new] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/listFoldersIn.using..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/listFoldersIn.using..st index 32bf456d..21f8a6cc 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/listFoldersIn.using..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/listFoldersIn.using..st @@ -5,10 +5,6 @@ listFoldersIn: root using: filter checkConnected; checkLoggedIn. - self sendCommand: ( - {self class listCommand. - self class asProtocolQuote: root. - self class asProtocolQuote: filter} - joinSeparatedBy: self class protocolBlank). + self sendCommand: (ICCommand listSubfoldersOf: root filterBy: filter). ^ self parseListResponse \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loadEmailsFromMaildir.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loadEmailsFromMaildir.st index 89b7afef..ad376970 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loadEmailsFromMaildir.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loadEmailsFromMaildir.st @@ -1,4 +1,4 @@ -login +storage loadEmailsFromMaildir | directory directoryName | @@ -8,11 +8,9 @@ loadEmailsFromMaildir ifFalse: [directory createDirectory: 'Maildir']. directory := directory directoryNamed: 'Maildir'. - directoryName := self getRootFolderName. + directoryName := self rootFolderName. (directory directoryExists: directoryName) - ifFalse: [ - Transcript show: 'Maildir doesnt exist'. - ^ (OrderedCollection new)]. + ifFalse: [^ (OrderedCollection new)]. ^ self createEmailsWith: directory andName: directoryName and: (self rootFolder) \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loggedIn..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loggedIn..st index a525277b..2d7074b5 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loggedIn..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loggedIn..st @@ -1,4 +1,4 @@ accessing -loggedIn: anObject +loggedIn: aBool - loggedIn := anObject \ No newline at end of file + loggedIn := aBool \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loggedIn.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loggedIn.st index 6dd72b26..a1b50bb5 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loggedIn.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loggedIn.st @@ -1,4 +1,4 @@ accessing loggedIn - ^ loggedIn \ No newline at end of file + ^ loggedIn ifNil: [loggedIn := false] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/login.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/login.st index 5f92dadd..90e280e5 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/login.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/login.st @@ -1,22 +1,18 @@ login login - + (self checkConnected) ifFalse: [ self fatalErrorOccured: true. - UIManager default inform: 'Cant connect to the server'. + self inform: 'Cant connect to the server'. ^ false]. - (self authenticationInfo isValid) ifFalse: [ + (self accountInfo isValid) ifFalse: [ self fatalErrorOccured: true. ^ false]. - self sendCommand: ( - { self class loginCommand. - self authenticationInfo username. - self authenticationInfo password } - joinSeparatedBy: self class protocolBlank); + self sendCommand: (ICCommand loginWith: self accountInfo); fetchNextResponse; - loggedIn: self commandSucceeded. + loggedIn: (ICParser commandSucceeded: self stream lastResponse). (self checkLoggedIn) ifFalse: [ self fatalErrorOccured: true. diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/login.using..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/login.using..st deleted file mode 100644 index e5fccdec..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/login.using..st +++ /dev/null @@ -1,5 +0,0 @@ -login -login: username using: password - - ^ self loginUsing: (ICAuthenticationInfo for: username using: password) - \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loginUsing..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loginUsing..st deleted file mode 100644 index 6281fbe3..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/loginUsing..st +++ /dev/null @@ -1,6 +0,0 @@ -login -loginUsing: autheticationInfo - - ^ self - authenticationInfo: autheticationInfo; - login \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/logout.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/logout.st index aba66699..2565a516 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/logout.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/logout.st @@ -2,7 +2,7 @@ login logout self checkConnected. - self stream sendCommand: self class logoutCommand. + self sendCommand: ICCommand logout. self fetchNextResponse; close. diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/maildirDiffFetchHeadersFrom..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/maildirDiffFetchHeadersFrom..st index 304f9fd6..2c41f3c3 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/maildirDiffFetchHeadersFrom..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/maildirDiffFetchHeadersFrom..st @@ -1,10 +1,7 @@ -connection +fetching maildirDiffFetchHeadersFrom: anUID - "fetch headers in range (anUID, self uids last(" - - self uids ifEmpty: [ ^ OrderedCollection new]. - self uids + ifEmpty: [ ^ OrderedCollection new]; ifNil: [^ OrderedCollection new] ifNotNil: [^ self maildirDiffFetchHeadersFrom: (anUID + 1) to: (self uids last + 1)] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/maildirDiffFetchHeadersFrom.to..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/maildirDiffFetchHeadersFrom.to..st index 896a97e7..450fea09 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/maildirDiffFetchHeadersFrom.to..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/maildirDiffFetchHeadersFrom.to..st @@ -1,19 +1,18 @@ -connection +fetching maildirDiffFetchHeadersFrom: start to: end | searchBegin searchEnd mailFolder | - + (FileDirectory default directoryExists: (FileDirectory default fullPathFor: self maildirFileName)) ifTrue: [ mailFolder := FileDirectory default on: self maildirFileName. searchBegin := mailFolder fileNamesMatching: (end asString). searchEnd := mailFolder fileNamesMatching: (start asString). - searchBegin size > 0 & (searchEnd size > 0) ifTrue: [ - Transcript show: 'Do nothing. Newest Mailrange already loaded'. - ^ OrderedCollection new]]. - + (searchBegin notEmpty and: [searchEnd notEmpty]) + ifTrue: [^ OrderedCollection new]]. + ^ self - sendCommand: (self class fetchHeadersWithUIDRange: start to: end); + sendCommand: (ICCommand fetchHeadersForUIDsFrom: start to: end); fetchNextResponse; parseFetchHeaders: self lastResponse \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/maildirFileName.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/maildirFileName.st index e518fe2d..001bb3df 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/maildirFileName.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/maildirFileName.st @@ -1,10 +1,8 @@ -connection +storage maildirFileName - "replace hierarchyDelimiter with FileSystem slash" - ^ 'Maildir', FileDirectory slash, - self getRootFolderName, + self rootFolderName, FileDirectory slash, - currentFolderName copyReplaceAll: (self hierarchyDelimiter) with: (FileDirectory slash) \ No newline at end of file + self currentFolderName copyReplaceAll: (self hierarchyDelimiter) with: (FileDirectory slash) \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/moveEmail.to..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/moveEmail.to..st index 53d8648f..5ed67a2f 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/moveEmail.to..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/moveEmail.to..st @@ -1,6 +1,6 @@ delete moveEmail: anEmail to: aFolder - self sendCommand: (self class moveEmail: anEmail messageID to: ('"', aFolder, '"')). + self sendCommand: (ICCommand moveEmail: anEmail messageID to: aFolder). self fetchNextResponse. (self rootFolder childFolderNamed: aFolder with: (self hierarchyDelimiter)) update \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/name..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/name..st deleted file mode 100644 index 63b0e25f..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/name..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -name: anObject - - name := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/name.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/name.st deleted file mode 100644 index 4b7f3504..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/name.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -name - - ^ name \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchBody.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchBody.st deleted file mode 100644 index 852b641c..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchBody.st +++ /dev/null @@ -1,4 +0,0 @@ -protocol parse -parseFetchBody - - ^ ((self lastResponse copyFrom: 2 to: (self lastResponse size - 1)) joinSeparatedBy: Character cr) \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchFlagsOnly..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchFlagsOnly..st deleted file mode 100644 index dfd89c37..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchFlagsOnly..st +++ /dev/null @@ -1,23 +0,0 @@ -protocol parse -parseFetchFlagsOnly: aFolder - - "method to parse a flags-only response" - (self lastResponse isEmpty) - ifTrue: [^ '']. - - "iterate through lastResponse and find flags for every uid" - lastResponse do: [:line | - | uidPart uid email | - uidPart := (line allRegexMatches: 'UID \d*') ifEmpty: [ ^ '']. - uid := (uidPart first allRegexMatches: '[\d]+') ifEmpty: [ ^ '']. - uid := uid first. - email := aFolder emails detect: [:mail | mail uid asString = uid] ifNone: [^ '']. - - "only update maildir file, it something changes, this improves performance drastically" - ((email seen ~= (line includesSubString: '\Seen')) or: - (email flagged ~= (line includesSubString: '\Flagged')) or: - (email deleted ~= (line includesSubString: '\Deleted'))) ifTrue: [ - email seen: (line includesSubString: '\Seen'). - email flagged: (line includesSubString: '\Flagged'). - email deleted: (line includesSubString: '\Deleted'). - email saveInMaildir]] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeader.withId..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeader.withId..st deleted file mode 100644 index de549afd..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeader.withId..st +++ /dev/null @@ -1,25 +0,0 @@ -protocol parse -parseFetchHeader: headerLines withId: id - - | email headerData headerChunk | - - email := ICEmail new. - email messageID: id. - - headerData := (headerLines subStrings: {Character cr}). - headerChunk := OrderedCollection new. - - "this is necassery because one header field could contains multiple lines" - headerData do: [:line | - (line includesSubString: 'UID') - ifTrue: [email uid: ((line subStrings: ' ') second)] - ifFalse: [ - ((self startsNewHeaderChunk: line) & (headerChunk notEmpty)) - ifTrue: [ - self parseHeaderChunk: headerChunk for: email. - headerChunk removeAll]. - headerChunk add: line]]. - - self parseHeaderChunk: headerChunk for: email. - - ^ email \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderContentTransferEncoding.for..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderContentTransferEncoding.for..st deleted file mode 100644 index 037b6bbd..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderContentTransferEncoding.for..st +++ /dev/null @@ -1,7 +0,0 @@ -protocol parse -parseFetchHeaderContentTransferEncoding: aHeaderChunk for: anEmail - - | answer | - - answer := ((aHeaderChunk joinSeparatedBy: ' ') subStrings: ' ') allButFirst joinSeparatedBy: ' '. - anEmail contentTransferEncoding: answer \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderContentType.for..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderContentType.for..st deleted file mode 100644 index c1a67e89..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderContentType.for..st +++ /dev/null @@ -1,8 +0,0 @@ -protocol parse -parseFetchHeaderContentType: aHeaderChunk for: anEmail - - | answer | - - "notice that joinSeperatedBy: ' ' and subStrings: ' ' are not inverse operation" - answer := ((aHeaderChunk joinSeparatedBy: ' ') subStrings: ' ') allButFirst joinSeparatedBy: ' '. - anEmail contentType: answer \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderDate.for..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderDate.for..st deleted file mode 100644 index 066fa19f..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderDate.for..st +++ /dev/null @@ -1,4 +0,0 @@ -protocol parse -parseFetchHeaderDate: aHeaderChunk for: anEmail - - anEmail date: ((aHeaderChunk first subStrings: ' ') allButFirst joinSeparatedBy: ' ') \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderFlags.for..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderFlags.for..st deleted file mode 100644 index b435df0e..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderFlags.for..st +++ /dev/null @@ -1,6 +0,0 @@ -protocol parse -parseFetchHeaderFlags: aHeaderChunk for: anEmail - - anEmail seen: ((aHeaderChunk at: 1) includesSubString: '\Seen'). - anEmail flagged: ((aHeaderChunk at: 1) includesSubString: '\Flagged'). - anEmail deleted: ((aHeaderChunk at: 1) includesSubString: '\Deleted') \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderReceiver.for..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderReceiver.for..st deleted file mode 100644 index 72b4e7c4..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderReceiver.for..st +++ /dev/null @@ -1,4 +0,0 @@ -protocol parse -parseFetchHeaderReceiver: aHeaderChunk for: anEmail - - anEmail to: (aHeaderChunk collect: [:receiverLine | (receiverLine subStrings: ' ') last ]) \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderSender.for..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderSender.for..st deleted file mode 100644 index 15036edd..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderSender.for..st +++ /dev/null @@ -1,8 +0,0 @@ -protocol parse -parseFetchHeaderSender: aHeaderChunk for: anEmail - - | sender | - - sender := ((aHeaderChunk collect: [ :each | each withBlanksTrimmed]) joinSeparatedBy: ' '). - sender := (sender subStrings: ':') allButFirst joinSeparatedBy: ':'. - anEmail from: sender withBlanksTrimmed \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderSubject.for..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderSubject.for..st deleted file mode 100644 index 97d0441d..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaderSubject.for..st +++ /dev/null @@ -1,8 +0,0 @@ -protocol parse -parseFetchHeaderSubject: aHeaderChunk for: anEmail - - | list | - - list := ((aHeaderChunk joinSeparatedBy: ' ') subStrings: ((Character tab) asString)). - list := ((list joinSeparatedBy: ' ') subStrings: ' '). - anEmail subject: (list allButFirst joinSeparatedBy: ' ') decodeMimeHeader \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaders..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaders..st index e37b3fa2..99a6175c 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaders..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchHeaders..st @@ -1,13 +1,12 @@ protocol parse parseFetchHeaders: headerLines - | parser folder parseResult mailCollection | + | folder parseResult mailCollection | - (headerLines size = 0) ifTrue: [^ OrderedCollection new]. - + headerLines ifEmpty: [^ OrderedCollection new]. + mailCollection := OrderedCollection new. - parser := ICFetchResponseParser new. - parseResult := parser parse: (ReadStream on: (headerLines joinSeparatedBy: Character cr)). + parseResult := ICParser parseFetchMailStream: (ReadStream on: (headerLines joinSeparatedBy: Character cr)). folder := self rootFolder childFolderNamed: (self currentFolderName) with: (self hierarchyDelimiter). @@ -15,7 +14,7 @@ parseFetchHeaders: headerLines parseResult keysAndValuesDo: [:id :message | | mail | "parse the message and ID into a ICMail" - mail := self parseFetchHeader: message withId: id. + mail := ICParser parseFetchHeader: message withId: id. mailCollection add: mail. "store the ICMail in the appropriate folder and write it on the disk" mail folder: folder; saveInMaildir]. diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchedFlagsAndPopulate..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchedFlagsAndPopulate..st new file mode 100644 index 00000000..331ad3a0 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseFetchedFlagsAndPopulate..st @@ -0,0 +1,16 @@ +protocol parse +parseFetchedFlagsAndPopulate: aFolder + + | flagsPerUID | + + flagsPerUID := ICParser parseFetchedFlagsAndPopulate: self lastResponse. + + aFolder emails do: [:email | + flagsPerUID at: email uniqueID asString ifPresent: [:flags | + ((email seen ~= (flags includes: '\Seen')) or: + (email flagged ~= (flags includes: '\Flagged')) or: + (email deleted ~= (flags includes: '\Deleted'))) ifTrue: [ + email seen: (flags includes: '\Seen'). + email flagged: (flags includes: '\Flagged'). + email deleted: (flags includes: '\Deleted'). + email saveInMaildir]]]. \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseHeaderChunk.for..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseHeaderChunk.for..st deleted file mode 100644 index e40e01d4..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseHeaderChunk.for..st +++ /dev/null @@ -1,12 +0,0 @@ -protocol parse -parseHeaderChunk: aHeaderChunk for: anEmail - - | headerField method | - - headerField := (aHeaderChunk first subStrings: ' ') first. - (headerField includesSubString: ':') ifTrue: [headerField := headerField allButLast]. - - method := (self parseMethods at: headerField ifAbsent: nil). - method isNil - ifTrue: [Transcript show: 'WARNING: No method for parsing Header field:', headerField; cr] - ifFalse: [method value: aHeaderChunk value: anEmail] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseListResponse.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseListResponse.st index 69a01be7..d5d29793 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseListResponse.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseListResponse.st @@ -2,4 +2,4 @@ protocol parse parseListResponse self fetchNextResponse. - self lastResponse do: [:each | self folderFromResponse: (each copyAfter: self class protocolQuote asCharacter)] \ No newline at end of file + self lastResponse do: [:each | self folderFromResponse: each] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseMethods.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseMethods.st deleted file mode 100644 index 8d923452..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/parseMethods.st +++ /dev/null @@ -1,12 +0,0 @@ -protocol parse -parseMethods - - ^ Dictionary newFrom: { - 'To' -> [:headerChunk :email | self parseFetchHeaderReceiver: headerChunk for: email]. - 'From' -> [:headerChunk :email | self parseFetchHeaderSender: headerChunk for: email]. - 'Subject' -> [:headerChunk :email | self parseFetchHeaderSubject: headerChunk for: email]. - 'Date' -> [:headerChunk :email | self parseFetchHeaderDate: headerChunk for: email]. - 'FLAGS' -> [:headerChunk :email | self parseFetchHeaderFlags: headerChunk for: email]. - 'Content-Type' -> [:headerChunk :email | self parseFetchHeaderContentType: headerChunk for: email]. - 'Content-Transfer-Encoding' -> [:headerChunk :email | - self parseFetchHeaderContentTransferEncoding: headerChunk for: email]} \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/ping.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/ping.st index 29886a05..344c14e5 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/ping.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/ping.st @@ -2,6 +2,6 @@ message handling ping self checkConnected. - self sendCommand: self class noopCommand. + self sendCommand: ICCommand noop. self fetchNextResponse. ^ true \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/refreshConnectionProcess.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/refreshConnectionProcess.st index 7d91c9c4..30c44b37 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/refreshConnectionProcess.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/refreshConnectionProcess.st @@ -1,13 +1,8 @@ connection refreshConnectionProcess - | delayTime | - - delayTime := 60 * 10. "Wait for 10 minutes." - - [self isConnected and: [self isLoggedIn]] + [self isConnected and: [self loggedIn]] whileTrue: [ - self sendCommand: self class noopCommand. + self sendCommand: ICCommand noop. self fetchNextResponse. - Transcript show: 'Prevent timeout'. - (Delay forSeconds: delayTime) wait] \ No newline at end of file + (Delay forSeconds: self class refreshConnectionIntervalInSeconds) wait] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/resetFlag.and..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/resetFlag.and..st index 70b5c6f1..a2bbd870 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/resetFlag.and..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/resetFlag.and..st @@ -1,6 +1,5 @@ fetching resetFlag: anEmail and: aFlag - - (aFlag == #flagged) ifTrue: [self sendCommand: (self class resetFlagFlagged: anEmail messageID)]. - (aFlag == #seen) ifTrue: [self sendCommand: (self class resetFlagSeen: anEmail messageID)]. + + self sendCommand: (ICCommand resetFlag: aFlag asString for: anEmail messageID). self fetchNextResponse \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/responseIsError.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/responseIsError.st deleted file mode 100644 index 880b91a5..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/responseIsError.st +++ /dev/null @@ -1,4 +0,0 @@ -error handling -responseIsError - - ^ self stream lastResponse beginsWith: self class protocolError \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/responseIsParameterError.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/responseIsParameterError.st deleted file mode 100644 index 02200769..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/responseIsParameterError.st +++ /dev/null @@ -1,6 +0,0 @@ -error handling -responseIsParameterError - - ^ self class protocolParameterError = - ((self stream lastResponse subStrings: self class protocolBlank) - at: self class parameterErrorPosition) \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/responseIsWarning.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/responseIsWarning.st deleted file mode 100644 index a2ae4944..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/responseIsWarning.st +++ /dev/null @@ -1,4 +0,0 @@ -error handling -responseIsWarning - - ^ false \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/retrieveFlagsFrom.to.in..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/retrieveFlagsFrom.to.in..st index 473377a1..b1a66f51 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/retrieveFlagsFrom.to.in..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/retrieveFlagsFrom.to.in..st @@ -2,7 +2,7 @@ fetching retrieveFlagsFrom: anUID to: anotherUID in: aFolder self - sendCommand: (self class fetchFlagsWithUIDRange: anUID to: anotherUID); + sendCommand: (ICCommand fetchFlagsForUIDsFrom: anUID to: anotherUID); fetchNextResponse. - self parseFetchFlagsOnly: aFolder \ No newline at end of file + self parseFetchedFlagsAndPopulate: aFolder \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/rootFolder..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/rootFolder..st index 39b879e0..b5caae36 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/rootFolder..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/rootFolder..st @@ -1,4 +1,4 @@ accessing -rootFolder: anObject +rootFolder: anICFolder - rootFolder := anObject \ No newline at end of file + rootFolder := anICFolder \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/rootFolder.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/rootFolder.st index c739077f..aa77b224 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/rootFolder.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/rootFolder.st @@ -1,4 +1,4 @@ accessing rootFolder - ^ rootFolder \ No newline at end of file + ^ rootFolder ifNil: [rootFolder := ICFolder newRootFolderWith: self] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/rootFolderName.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/rootFolderName.st new file mode 100644 index 00000000..bee1dab9 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/rootFolderName.st @@ -0,0 +1,6 @@ +accessing +rootFolderName + + ^ (SecureHashAlgorithm new + hashMessage: self host, self username) + asString first: self class accountFolderHashRelevantCharacters \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/select..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/select..st index 6f367f85..8faf6ffd 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/select..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/select..st @@ -1,7 +1,6 @@ message handling select: aFolderName - self - currentFolderName: aFolderName; - sendCommand: (self class selectCommand: ('"' , aFolderName, '"')); + self currentFolderName: aFolderName; + sendCommand: (ICCommand select: aFolderName); fetchNextResponse \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/serverInfo..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/serverInfo..st deleted file mode 100644 index 34060511..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/serverInfo..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -serverInfo: anObject - - serverInfo := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/serverInfo.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/serverInfo.st deleted file mode 100644 index fadbc722..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/serverInfo.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -serverInfo - - ^ serverInfo \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/setFlag.and..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/setFlag.and..st index 3e84d86b..75098c56 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/setFlag.and..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/setFlag.and..st @@ -1,6 +1,5 @@ fetching setFlag: anEmail and: aFlag - (aFlag == #flagged) ifTrue: [self sendCommand: (self class setFlagFlagged: anEmail messageID)]. - (aFlag == #seen) ifTrue: [self sendCommand: (self class setFlagSeen: anEmail messageID)]. + self sendCommand: (ICCommand setFlag: aFlag asString for: anEmail messageID). self fetchNextResponse \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/ssl..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/ssl..st deleted file mode 100644 index b1be2292..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/ssl..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -ssl: anObject - - ssl := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/ssl.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/ssl.st deleted file mode 100644 index 36952b3d..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/ssl.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -ssl - - ^ ssl \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/stream..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/stream..st index b355bd09..8f22cb2b 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/stream..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/stream..st @@ -1,4 +1,4 @@ accessing -stream: anObject +stream: anICStreamWrapper - stream := anObject \ No newline at end of file + stream := anICStreamWrapper \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/stream.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/stream.st index 80c70fdb..157c9446 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/stream.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/stream.st @@ -1,4 +1,4 @@ accessing stream - ^ stream \ No newline at end of file + ^ stream ifNil: [stream := ICStreamWrapper new] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/testAccountWith..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/testAccountWith..st index 2f6b7691..c6ea917d 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/testAccountWith..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/testAccountWith..st @@ -1,6 +1,6 @@ -as yet unclassified -testAccountWith: dataDictionary +login +testAccountWith: anAccountInfo - self fromDictionary: dataDictionary. + self connectAndLoginWith: anAccountInfo. ^ self fatalErrorOccured not \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/uids..st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/uids..st index 7cc03a56..a29dc85b 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/uids..st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/uids..st @@ -1,4 +1,4 @@ -connection -uids: anObject +accessing +uids: anOrderedCollection - uids := anObject \ No newline at end of file + uids := anOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/uids.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/uids.st index d0e79b32..fd9707fd 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/uids.st +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/uids.st @@ -1,4 +1,4 @@ -connection +accessing uids ^ uids \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/useSSL.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/useSSL.st deleted file mode 100644 index f36f1779..00000000 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/useSSL.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -useSSL - - ^ self ssl \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/username.st b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/username.st new file mode 100644 index 00000000..ba316f4d --- /dev/null +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/instance/username.st @@ -0,0 +1,4 @@ +accessing +username + + ^ self accountInfo username \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/methodProperties.json b/packages/IMAPClient-Core.package/ICEndPoint.class/methodProperties.json index 53d849df..1eef467a 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/methodProperties.json +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/methodProperties.json @@ -1,126 +1,78 @@ { "class" : { - "asProtocolQuote:" : "C.G. 7/25/2018 14:10", - "commandFailed" : "C.G. 7/25/2018 14:10", - "commandSucceeded" : "C.G. 7/25/2018 14:10", - "deleteEmail:" : "C.G. 7/25/2018 14:10", - "errorBadParameter" : "jwe 7/28/2016 11:12", + "accountFolderHashRelevantCharacters" : "ok 7/26/2019 19:11", + "addConfiguration:" : "tg 7/8/2019 15:12", + "basicConnectionConfigurations" : "tg 7/8/2019 15:14", + "checkValidConfiguration:" : "tg 7/18/2019 23:06", + "clearConfigurations" : "pm 6/19/2019 13:17", + "connectionConfigurations" : "tg 7/8/2019 15:14", + "connectionConfigurations:" : "pm 6/19/2019 14:49", + "defaultStreamClass" : "tg 7/15/2019 13:26", "errorBadProtocol" : "js 5/15/2016 13:55", - "errorInvalidAuthenticationConfiguration" : "js 5/15/2016 16:16", "errorInvalidConnectionConfiguration" : "js 5/15/2016 16:15", - "errorLoginFailed" : "js 5/15/2016 14:57", - "errorNoConnection" : "js 5/15/2016 13:50", - "errorNoPasswordSet" : "js 5/15/2016 13:51", - "errorNoUsernameSet" : "js 5/15/2016 13:51", - "expungeEmail" : "C.G. 7/25/2018 14:10", - "fetchBodyCommand:" : "lvm 5/8/2018 11:09", - "fetchFlagsWithUIDRange:to:" : "C.G. 7/25/2018 14:10", - "fetchHeadersWithUIDRange:to:" : "C.G. 7/25/2018 14:11", - "getAllUIDs" : "C.G. 7/25/2018 14:11", - "lastHeaderLine" : "jwe 7/14/2016 09:19", - "listCommand" : "js 6/8/2016 15:36", - "loginCommand" : "js 6/7/2016 09:55", - "logoutCommand" : "js 6/7/2016 09:55", - "moveEmail:to:" : "DH 7/9/2018 21:29", - "noopCommand" : "js 6/7/2016 09:55", - "parameterErrorPosition" : "jwe 7/28/2016 11:38", - "protocolBlank" : "js 5/15/2016 13:37", - "protocolCommandStart" : "AR 5/29/2016 22:19", - "protocolError" : "C.G. 7/25/2018 14:11", - "protocolParameterError" : "jwe 7/19/2016 10:47", - "protocolQuote" : "js 6/8/2016 15:41", - "resetFlagFlagged:" : "C.G. 7/25/2018 14:12", - "resetFlagSeen:" : "C.G. 7/25/2018 14:12", - "selectCommand:" : "AR 6/26/2016 11:44", - "setFlagFlagged:" : "C.G. 7/25/2018 14:12", - "setFlagSeen:" : "C.G. 7/25/2018 14:12" }, + "refreshConnectionIntervalInSeconds" : "ok 7/26/2019 21:04", + "removeConfiguration:" : "tg 7/8/2019 15:12" }, "instance" : { - "asDictionary" : "C.G. 6/21/2018 09:56", - "authenticationInfo" : "ms 5/17/2016 09:31", - "authenticationInfo:" : "ms 5/17/2016 09:31", - "checkConnected" : "C.G. 7/25/2018 12:29", - "checkForBadRequest" : "C.G. 7/25/2018 12:30", - "checkForParameterError" : "DH 7/25/2018 17:29", - "checkLoggedIn" : "C.G. 7/25/2018 12:42", + "accountInfo" : "tg 7/10/2019 17:23", + "accountInfo:" : "tg 7/10/2019 17:24", + "asAccountInfoDictionary" : "tg 7/15/2019 12:20", + "checkConnected" : "tg 7/10/2019 19:29", + "checkForBadRequest" : "pm 7/25/2019 17:59", + "checkForParameterError" : "tg 7/26/2019 11:43", + "checkLoggedIn" : "tg 7/15/2019 12:44", "close" : "AR 5/31/2016 11:12", - "commandSucceeded" : "AR 6/14/2016 08:46", - "connectTo:on:" : "jwe 7/28/2016 14:02", - "connectTo:on:with:" : "jwe 7/28/2016 14:10", - "connectTo:with:" : "C.G. 7/25/2018 13:50", - "createEmailsWith:andName:and:" : "C.G. 6/26/2018 10:51", + "connect" : "tg 7/15/2019 13:27", + "connectAndLoginWith:" : "tg 7/26/2019 11:43", + "connectWith:" : "tg 7/18/2019 23:00", + "createEmailsWith:andName:and:" : "tg 7/26/2019 22:01", "currentFolderName" : "C.G. 7/25/2018 13:50", "currentFolderName:" : "C.G. 7/25/2018 13:50", - "deleteEmail:" : "C.G. 7/4/2018 14:21", - "expungeEmail" : "mw 6/22/2018 23:00", - "fatalErrorOccured" : "C.G. 7/25/2018 12:33", - "fatalErrorOccured:" : "C.G. 7/25/2018 12:33", - "fetchMailsBeginningAt:number:" : "C.G. 7/25/2018 13:50", - "fetchNextResponse" : "C.G. 7/25/2018 13:51", - "fillBodyFor:" : "ms 7/10/2016 14:09", - "folderFromResponse:" : "C.G. 7/25/2018 13:51", - "folderNameOfTrash" : "mw 6/23/2018 12:08", - "folderPathFrom:" : "DH 7/4/2018 13:14", - "fromDictionary:" : "DH 7/25/2018 17:26", - "getCurrentUIDs" : "C.G. 7/25/2018 13:52", - "getCurrentUIDsFor:" : "C.G. 7/25/2018 13:53", - "getRootFolderName" : "C.G. 7/25/2018 13:53", + "currentUIDs" : "fr 7/26/2019 15:48", + "currentUIDsFor:" : "ok 7/26/2019 21:01", + "deleteEmail:" : "tg 7/26/2019 14:12", + "expungeEmail" : "pm 7/23/2019 15:07", + "fatalErrorOccured" : "tg 7/26/2019 21:05", + "fatalErrorOccured:" : "tg 7/26/2019 21:05", + "fetchMailsBeginningAt:number:" : "pm 7/15/2019 20:28", + "fetchNextResponse" : "pm 7/15/2019 20:37", + "fillBodyFor:" : "pm 7/15/2019 20:42", + "folderFromResponse:" : "ok 7/26/2019 17:45", + "folderNameOfTrash" : "tg 7/26/2019 14:12", + "folderNameOfTrash:" : "tg 7/26/2019 14:13", "hierarchyDelimiter" : "mw 5/11/2018 10:37", "hierarchyDelimiter:" : "mw 5/11/2018 10:37", - "initialize" : "C.G. 7/25/2018 12:40", + "host" : "ok 7/26/2019 19:09", "isConnected" : "js 6/7/2016 10:13", - "isLoggedIn" : "js 5/15/2016 13:09", - "lastResponse" : "js 6/14/2016 10:38", + "lastResponse" : "pm 6/9/2019 13:10", "lastResponse:" : "lvm 5/24/2018 10:16", "listAllFolders" : "js 6/14/2016 12:31", - "listFoldersIn:using:" : "C.G. 7/25/2018 13:53", - "loadEmailsFromMaildir" : "C.G. 7/25/2018 13:54", - "loggedIn" : "js 5/15/2016 13:09", + "listFoldersIn:using:" : "pm 7/23/2019 14:51", + "loadEmailsFromMaildir" : "ok 7/26/2019 21:02", + "loggedIn" : "pm 6/9/2019 13:07", "loggedIn:" : "js 5/15/2016 13:09", - "login" : "DH 7/25/2018 17:29", - "login:using:" : "js 5/15/2016 16:33", - "loginUsing:" : "C.G. 7/25/2018 12:36", - "logout" : "js 6/14/2016 16:59", - "maildirDiffFetchHeadersFrom:" : "DH 7/25/2018 00:35", - "maildirDiffFetchHeadersFrom:to:" : "C.G. 7/25/2018 13:54", - "maildirFileName" : "C.G. 6/26/2018 10:55", - "moveEmail:to:" : "DH 7/9/2018 21:29", - "name" : "C.G. 7/4/2018 12:47", - "name:" : "C.G. 7/4/2018 12:47", - "parseFetchBody" : "C.G. 7/25/2018 13:54", - "parseFetchFlagsOnly:" : "C.G. 7/25/2018 13:55", - "parseFetchHeader:withId:" : "C.G. 7/25/2018 13:55", - "parseFetchHeaderContentTransferEncoding:for:" : "C.G. 7/25/2018 13:55", - "parseFetchHeaderContentType:for:" : "C.G. 7/25/2018 13:56", - "parseFetchHeaderDate:for:" : "DH 5/30/2018 02:12", - "parseFetchHeaderFlags:for:" : "C.G. 7/25/2018 13:56", - "parseFetchHeaderReceiver:for:" : "C.G. 7/25/2018 13:56", - "parseFetchHeaderSender:for:" : "C.G. 7/25/2018 13:56", - "parseFetchHeaderSubject:for:" : "C.G. 7/25/2018 13:56", - "parseFetchHeaders:" : "C.G. 7/25/2018 13:56", - "parseHeaderChunk:for:" : "C.G. 6/26/2018 10:57", - "parseListResponse" : "C.G. 7/25/2018 13:57", - "parseMethods" : "C.G. 7/25/2018 13:57", - "ping" : "AR 6/26/2016 15:04", + "login" : "tg 7/26/2019 11:43", + "logout" : "tg 7/25/2019 12:42", + "maildirDiffFetchHeadersFrom:" : "tg 7/15/2019 13:31", + "maildirDiffFetchHeadersFrom:to:" : "ok 7/26/2019 21:02", + "maildirFileName" : "tg 7/26/2019 21:05", + "moveEmail:to:" : "pm 7/23/2019 14:58", + "parseFetchHeaders:" : "fr 7/26/2019 15:53", + "parseFetchedFlagsAndPopulate:" : "pm 7/25/2019 17:45", + "parseListResponse" : "tg 7/26/2019 14:20", + "ping" : "pm 7/23/2019 15:09", "preventTimeout" : "lvm 7/23/2018 23:33", - "refreshConnectionProcess" : "C.G. 7/25/2018 13:58", - "resetFlag:and:" : "mw 5/17/2018 20:49", - "responseIsError" : "js 6/7/2016 10:16", - "responseIsParameterError" : "js 8/4/2017 22:25", - "responseIsWarning" : "AR 6/30/2016 07:54", - "retrieveFlagsFrom:to:in:" : "C.G. 7/25/2018 13:58", - "rootFolder" : "js 6/10/2016 15:09", + "refreshConnectionProcess" : "ok 7/26/2019 21:04", + "resetFlag:and:" : "tg 7/26/2019 13:44", + "retrieveFlagsFrom:to:in:" : "pm 7/25/2019 17:45", + "rootFolder" : "pm 6/9/2019 13:09", "rootFolder:" : "js 6/10/2016 15:09", - "select:" : "C.G. 6/28/2018 10:30", + "rootFolderName" : "tg 7/26/2019 21:05", + "select:" : "fr 7/26/2019 15:45", "sendCommand:" : "DH 6/26/2018 20:21", - "serverInfo" : "js 5/15/2016 16:45", - "serverInfo:" : "js 5/15/2016 16:45", - "setFlag:and:" : "C.G. 7/25/2018 13:58", - "ssl" : "ms 7/12/2016 10:35", - "ssl:" : "ms 7/12/2016 10:35", - "startsNewHeaderChunk:" : "C.G. 7/25/2018 13:58", - "stream" : "js 6/7/2016 10:17", + "setFlag:and:" : "tg 7/26/2019 13:44", + "stream" : "pm 6/9/2019 13:08", "stream:" : "js 6/7/2016 10:17", - "testAccountWith:" : "C.G. 7/25/2018 12:23", + "testAccountWith:" : "tg 7/26/2019 22:12", "uids" : "C.G. 7/25/2018 13:59", - "uids:" : "C.G. 7/25/2018 13:59", - "useSSL" : "ms 7/12/2016 10:35" } } + "uids:" : "pm 6/9/2019 16:52", + "username" : "ok 7/26/2019 19:09" } } diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/properties.json b/packages/IMAPClient-Core.package/ICEndPoint.class/properties.json index 3f0af72e..96e353df 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/properties.json +++ b/packages/IMAPClient-Core.package/ICEndPoint.class/properties.json @@ -3,21 +3,20 @@ "classinstvars" : [ ], "classvars" : [ - ], + "ConnectionConfigurations" ], "commentStamp" : "ms 7/28/2016 11:48", "instvars" : [ "stream", - "serverInfo", + "accountInfo", "loggedIn", - "authenticationInfo", "rootFolder", "lastResponse", "ssl", "uids", "hierarchyDelimiter", "currentFolderName", - "name", - "fatalErrorOccured" ], + "fatalErrorOccured", + "folderNameOfTrash" ], "name" : "ICEndPoint", "pools" : [ ], diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/currentID..st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/currentID..st deleted file mode 100644 index 7ed7cc31..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/currentID..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -currentID: anObject - - currentID := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/currentID.st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/currentID.st deleted file mode 100644 index ce629a57..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/currentID.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -currentID - - ^ currentID \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/currentMail..st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/currentMail..st deleted file mode 100644 index 1cfb80f3..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/currentMail..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -currentMail: anObject - - currentMail := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/currentMail.st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/currentMail.st deleted file mode 100644 index 0b7edb25..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/currentMail.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -currentMail - - ^ currentMail \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/emails..st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/emails..st deleted file mode 100644 index d818fb91..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/emails..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -emails: anObject - - emails := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/emails.st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/emails.st deleted file mode 100644 index dbee1693..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/emails.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -emails - - ^ emails \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/initialize.st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/initialize.st deleted file mode 100644 index a91c305c..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/initialize.st +++ /dev/null @@ -1,6 +0,0 @@ -initialization -initialize - - self emails: Dictionary new. - self currentMail: ''. - self currentID: '' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parse..st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parse..st deleted file mode 100644 index ba5ec4e3..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parse..st +++ /dev/null @@ -1,10 +0,0 @@ -parser managment -parse: aStream - - [self reader: aStream. - "try to parse one mail after another" - - [reader atEnd] whileFalse: [self parseMail]. - ^ self emails] - on: Error - do: [:parsingError | self inform: parsingError asString] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parseFetchCommand.st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parseFetchCommand.st deleted file mode 100644 index b15df179..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parseFetchCommand.st +++ /dev/null @@ -1,9 +0,0 @@ -states -parseFetchCommand - - "parse the stream until we received the Fetch Command. Format: FETCH SP (. SP denotes Space Character" - - "received FETCH (" - ((self reader next: 7) = 'FETCH (') - ifFalse: [self throwError: 'parseFetchCommand'] - ifTrue: [self parseFetchContent] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parseFetchContent.st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parseFetchContent.st deleted file mode 100644 index 6c1eef1a..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parseFetchContent.st +++ /dev/null @@ -1,39 +0,0 @@ -states -parseFetchContent - - "parse the stream until we parsed the fetch content" - - | octetSize | - - "parse just the command, we gave the server (the part before the data comes)" - self currentMail: self currentMail, (self reader nextDelimited: ${). - - "as stated in RFC3501 the response can contain all kind of 8-bit ASCII characters, so - we can't parse this string by searching for e.g. parenthesis. A string literal is prefix-quoted - with the octet count, surrounded by { }, which helps to determine the relevant body part " - - octetSize := (self reader nextDelimited: $}). - - (octetSize isAllDigits) - ifFalse: [self throwError: 'parseFetchContent'] - ifTrue: [ - | counter | - counter := octetSize asNumber. - - "parse the string literal by using octetSize" - [counter > 0] - whileTrue: [ - | currentChar | - currentChar := (self reader next:1). - self currentMail: self currentMail, currentChar. - counter := counter -1. - (currentChar = Character cr asString) - "RFC3501 requires mails to be seperated by CRLF, which - counts as two bytes. So we need to count CR double" - ifTrue: [counter := counter -1]]. - - "now follows a SP and the UID. So we can skip until the closing bracket of the fetch" - self currentMail: self currentMail, (self reader nextDelimited: $)). - - "sklp the CR, at the end of the response" - self reader next: 1] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parseID.st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parseID.st deleted file mode 100644 index 03ab41a5..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parseID.st +++ /dev/null @@ -1,12 +0,0 @@ -states -parseID - - "parse the stream until we received the message ID. Format: * SP id. SP denotes Space Character" - - "received *SP" - ((self reader next: 2) = '* ') - ifFalse: [self throwError: #parseID] - ifTrue: [ - "received *SP id" - self currentID: (self reader nextDelimited: (Character space)). - self parseFetchCommand] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parseMail.st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parseMail.st deleted file mode 100644 index 0101cc0d..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/parseMail.st +++ /dev/null @@ -1,13 +0,0 @@ -parser managment -parseMail - - "this method coordinates parsing of a SINGLE mail. After the method finished the Stream Position - is at the end of the stream, or at the beginning of a new mail" - - self parseID. - - "store mail and uid pair into dictionary" - self emails at: self currentID put: self currentMail. - - "reset variables for nextMail" - self reset \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/reader..st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/reader..st deleted file mode 100644 index b69cfc64..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/reader..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -reader: anObject - - reader := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/reader.st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/reader.st deleted file mode 100644 index bea6e52a..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/reader.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -reader - - ^ reader \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/reset.st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/reset.st deleted file mode 100644 index 1348f226..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/reset.st +++ /dev/null @@ -1,5 +0,0 @@ -initialization -reset - - self currentMail: ''. - self currentID: '' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/throwError..st b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/throwError..st deleted file mode 100644 index d52841b8..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/instance/throwError..st +++ /dev/null @@ -1,7 +0,0 @@ -parser managment -throwError: aState - - | msg | - - msg := 'Parsing Error in state ', aState. - self error: msg \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/methodProperties.json b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/methodProperties.json deleted file mode 100644 index c88164fe..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/methodProperties.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "currentID" : "C.G. 7/4/2018 13:24", - "currentID:" : "C.G. 7/4/2018 13:24", - "currentMail" : "C.G. 7/4/2018 13:24", - "currentMail:" : "C.G. 7/4/2018 13:24", - "emails" : "C.G. 7/4/2018 13:24", - "emails:" : "C.G. 7/4/2018 13:24", - "initialize" : "C.G. 7/4/2018 12:47", - "parse:" : "C.G. 7/25/2018 13:59", - "parseFetchCommand" : "C.G. 7/4/2018 12:50", - "parseFetchContent" : "C.G. 7/4/2018 13:13", - "parseID" : "C.G. 7/4/2018 13:04", - "parseMail" : "C.G. 7/4/2018 13:25", - "reader" : "C.G. 7/4/2018 13:04", - "reader:" : "C.G. 7/25/2018 14:00", - "reset" : "DH 7/4/2018 13:17", - "throwError:" : "C.G. 7/4/2018 13:06" } } diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/properties.json b/packages/IMAPClient-Core.package/ICFetchResponseParser.class/properties.json deleted file mode 100644 index 29684b4a..00000000 --- a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/properties.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "category" : "IMAPClient-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - "currentMail", - "emails", - "currentID", - "reader" ], - "name" : "ICFetchResponseParser", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } diff --git a/packages/IMAPClient-Core.package/ICFileReadWriter.class/README.md b/packages/IMAPClient-Core.package/ICFileReadWriter.class/README.md index e69de29b..6c497541 100644 --- a/packages/IMAPClient-Core.package/ICFileReadWriter.class/README.md +++ b/packages/IMAPClient-Core.package/ICFileReadWriter.class/README.md @@ -0,0 +1 @@ +An ICFileReadWriter is a JSON File Writer and Reader handling the file system storage of mails. \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/createHeaderFrom..st b/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/createHeaderFrom..st index 85373db4..4e6a1825 100644 --- a/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/createHeaderFrom..st +++ b/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/createHeaderFrom..st @@ -9,6 +9,6 @@ createHeaderFrom: aJsonObject #subject -> (aJsonObject at: 'subject'). #contentType -> (aJsonObject at: 'contentType'). #contentTransferEncoding -> (aJsonObject at: 'contentTransferEncoding'). - #to -> (self getRecipientsFrom: (aJsonObject at: 'to')). + #to -> (self recipientsFrom: (aJsonObject at: 'to')). #seen -> (aJsonObject at: 'seen'). #flagged -> (aJsonObject at: 'flagged')} \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/createPathRecursive.and..st b/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/createPathRecursive.and..st index 962143aa..57458308 100644 --- a/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/createPathRecursive.and..st +++ b/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/createPathRecursive.and..st @@ -5,13 +5,9 @@ createPathRecursive: aPath and: aFileWriter subDir := ((aPath subStrings: (FileDirectory slash))). - subDir size > 0 - ifTrue: [ + subDir ifNotEmpty: [ (aFileWriter directoryExists: subDir first) ifFalse: [ aFileWriter createDirectory: subDir first]. - "Transcript show: subDir first." self createPathRecursive: (subDir allButFirst joinSeparatedBy: (FileDirectory slash)) - and: (aFileWriter on: subDir first)]. - - ^ self \ No newline at end of file + and: (aFileWriter on: subDir first)]. \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/get.in..st b/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/get.in..st index db966c08..e0db6399 100644 --- a/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/get.in..st +++ b/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/get.in..st @@ -11,5 +11,5 @@ get: aFile in: aFolder header: (self createHeaderFrom: (jsonFile at: 'header')); body: (jsonFile at: 'body'); messageID: (jsonFile at: 'messageID'); - uid: (jsonFile at: 'uid'); + uniqueID: (jsonFile at: 'uid'); yourself \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/getRecipientsFrom..st b/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/getRecipientsFrom..st deleted file mode 100644 index a2bccfaf..00000000 --- a/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/getRecipientsFrom..st +++ /dev/null @@ -1,11 +0,0 @@ -read file -getRecipientsFrom: aJsonObject - - | recipients | - - aJsonObject ifNil: [^ nil]. - - recipients := OrderedCollection new. - aJsonObject do: [:eachRecipient | recipients add: eachRecipient]. - - ^ recipients \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/recipientsFrom..st b/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/recipientsFrom..st new file mode 100644 index 00000000..121b6dec --- /dev/null +++ b/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/recipientsFrom..st @@ -0,0 +1,6 @@ +read file +recipientsFrom: aJsonObject + + aJsonObject + ifNil: [^ nil] + ifNotNil: [^ aJsonObject asOrderedCollection] diff --git a/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/write.in.as..st b/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/write.in.as..st index 95458fba..7e2f1049 100644 --- a/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/write.in.as..st +++ b/packages/IMAPClient-Core.package/ICFileReadWriter.class/instance/write.in.as..st @@ -7,7 +7,7 @@ write: anICEmail in: aFolder as: aString 'header' -> (self createJsonHeaderFrom: anICEmail header). 'body' -> anICEmail body. 'messageID' -> anICEmail messageID. - 'uid' -> anICEmail uid}. + 'uid' -> anICEmail uniqueID}. fileDirectory := FileDirectory default. self createPathRecursive: aFolder and: fileDirectory. diff --git a/packages/IMAPClient-Core.package/ICFileReadWriter.class/methodProperties.json b/packages/IMAPClient-Core.package/ICFileReadWriter.class/methodProperties.json index e0a6131f..83beb9bb 100644 --- a/packages/IMAPClient-Core.package/ICFileReadWriter.class/methodProperties.json +++ b/packages/IMAPClient-Core.package/ICFileReadWriter.class/methodProperties.json @@ -2,9 +2,9 @@ "class" : { }, "instance" : { - "createHeaderFrom:" : "C.G. 7/25/2018 14:00", + "createHeaderFrom:" : "pm 6/3/2019 18:34", "createJsonHeaderFrom:" : "C.G. 7/25/2018 14:00", - "createPathRecursive:and:" : "C.G. 7/25/2018 14:01", - "get:in:" : "C.G. 7/25/2018 14:01", - "getRecipientsFrom:" : "C.G. 7/25/2018 14:01", - "write:in:as:" : "C.G. 7/25/2018 14:01" } } + "createPathRecursive:and:" : "tg 7/26/2019 21:50", + "get:in:" : "pm 6/2/2019 15:58", + "recipientsFrom:" : "fr 7/26/2019 15:34", + "write:in:as:" : "pm 6/2/2019 16:11" } } diff --git a/packages/IMAPClient-Core.package/ICFileReadWriter.class/properties.json b/packages/IMAPClient-Core.package/ICFileReadWriter.class/properties.json index feea3909..f64da6fd 100644 --- a/packages/IMAPClient-Core.package/ICFileReadWriter.class/properties.json +++ b/packages/IMAPClient-Core.package/ICFileReadWriter.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "ok 7/9/2019 21:00", "instvars" : [ ], "name" : "ICFileReadWriter", diff --git a/packages/IMAPClient-Core.package/ICFolder.class/class/named.in..st b/packages/IMAPClient-Core.package/ICFolder.class/class/named.in..st index 54834acd..44f3364b 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/class/named.in..st +++ b/packages/IMAPClient-Core.package/ICFolder.class/class/named.in..st @@ -4,7 +4,7 @@ named: name in: parent | newFolder | newFolder := self new. - newFolder name: name. + newFolder folderName: name. parent addFolder: newFolder. diff --git a/packages/IMAPClient-Core.package/ICFolder.class/class/named.in.with..st b/packages/IMAPClient-Core.package/ICFolder.class/class/named.in.with..st index e4f25e28..7ae142da 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/class/named.in.with..st +++ b/packages/IMAPClient-Core.package/ICFolder.class/class/named.in.with..st @@ -4,7 +4,7 @@ named: name in: parent with: endpoint | newFolder | newFolder := (self new) - name: name; + folderName: name; endpoint: endpoint. parent addFolder: newFolder. diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/accountName.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/accountName.st new file mode 100644 index 00000000..2b93e2c7 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/accountName.st @@ -0,0 +1,4 @@ +accessing +accountName + + ^ self endpoint accountInfo accountName \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/addMails..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/addMails..st new file mode 100644 index 00000000..9c3a9fc9 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/addMails..st @@ -0,0 +1,4 @@ +email access +addMails: aMailCollection + + self emails addAll: aMailCollection. \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/checkTopicality.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/checkTopicality.st index 3f32127b..18c655e6 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/checkTopicality.st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/checkTopicality.st @@ -4,16 +4,16 @@ checkTopicality | relevantUIDs localMails min max | " we cant access first and last of the sortedCollection because its sorted by date, not by UID " - min := self getLowestUID. - max := self getHighestUID. + min := self lowestUniqueID. + max := self highestUniqueID. - self endpoint getCurrentUIDs. + self endpoint currentUIDs. - relevantUIDs := self endpoint uids select: [ :uid | (uid asNumber <= max) and: (uid asNumber >=min)]. + relevantUIDs := self endpoint uids select: [ :uid | (uid asNumber <= max) and: [uid asNumber >=min]]. "search for uids, which are in storage, but not on the server --> they were moved" localMails := self emails copy. - relevantUIDs do: [ :uid | localMails removeAllSuchThat: [ :mail | mail uid = uid]]. + relevantUIDs do: [ :uid | localMails removeAllSuchThat: [ :mail | mail uniqueID = uid]]. "everything left in localMails has changed, and therefore can be removed" localMails do: [ :mail | mail deleteEmailFromDisk] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolderNamed.ifAbsent..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolderNamed.ifAbsent..st index 2ce0dc46..e5a29568 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolderNamed.ifAbsent..st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolderNamed.ifAbsent..st @@ -1,6 +1,6 @@ folder hierarchy -childFolderNamed: name ifAbsent: block +childFolderNamed: childFolderName ifAbsent: block ^ self childFolders - detect: [:child | child name = name] + detect: [:child | child folderName = childFolderName] ifNone: [block value] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolderNamed.with.ifAbsent..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolderNamed.with.ifAbsent..st index 883704c9..a025b299 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolderNamed.with.ifAbsent..st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolderNamed.with.ifAbsent..st @@ -1,16 +1,17 @@ folder hierarchy -childFolderNamed: name with: delimiter ifAbsent: block +childFolderNamed: childFolderName with: delimiter ifAbsent: block + + | rootPart childPart child parts | ^ self childFolders - detect: [:child | child name = name] + detect: [:subFolder | subFolder folderName = childFolderName] ifNone: [ - | rootPart childPart child parts | "splice at delimiter and ask child" - parts := name subStrings: delimiter. + parts := childFolderName subStrings: delimiter. (parts size > 1) ifTrue: [ rootPart := parts first. childPart := parts allButFirst joinSeparatedBy: delimiter. - child := self childFolders detect: [ :childFolder | childFolder name = rootPart]. + child := self childFolders detect: [ :childFolder | childFolder folderName = rootPart]. child ifNotNil: [^ child childFolderNamed: childPart with: delimiter ifAbsent: block]]. ^ block value] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolders..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolders..st index ae30edb0..94a53e2a 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolders..st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolders..st @@ -1,4 +1,4 @@ accessing -childFolders: anObject +childFolders: anOrderedCollection - childFolders := anObject \ No newline at end of file + childFolders := anOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolders.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolders.st index 1c7b89f2..81baf2b9 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolders.st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/childFolders.st @@ -1,4 +1,4 @@ accessing childFolders - ^ childFolders \ No newline at end of file + ^ childFolders ifNil: [childFolders := OrderedCollection new] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/emails..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/emails..st index d818fb91..b6e0ab79 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/emails..st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/emails..st @@ -1,4 +1,4 @@ accessing -emails: anObject +emails: aDictionary - emails := anObject \ No newline at end of file + emails := aDictionary \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/emails.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/emails.st index dbee1693..17e0eb29 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/emails.st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/emails.st @@ -1,4 +1,4 @@ accessing emails - - ^ emails \ No newline at end of file + ^ emails ifNil: [emails := (SortedCollection sortBlock: [:first :second | + first dateInSecondsSinceSqueakEpoch >= second dateInSecondsSinceSqueakEpoch])] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/endpoint..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/endpoint..st index b41cab06..8b0d2f22 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/endpoint..st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/endpoint..st @@ -1,4 +1,4 @@ accessing -endpoint: anObject +endpoint: anICEndpoint - endpoint := anObject \ No newline at end of file + endpoint := anICEndpoint \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/fetchHeadersFrom..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/fetchHeadersFrom..st index 956806b1..d226ec2a 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/fetchHeadersFrom..st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/fetchHeadersFrom..st @@ -1,19 +1,14 @@ updateEmails fetchHeadersFrom: anUID - - "loads mails, which are newer than anUID" self emails addAll: (self endpoint - getCurrentUIDsFor: self; + currentUIDsFor: self; maildirDiffFetchHeadersFrom: anUID). - self emails size = 0 ifTrue: [^ self]. + self emails ifEmpty: [^ self]. - " check if mails were moved on the server, so that we need to delete them" self checkTopicality. - " if checkTopicality deleted mails, the mails again could be empty " - self emails size = 0 ifTrue: [^ self]. - - "update existing flags of all mails in folder" - self retrieveFlagsFrom: self emails last uid to: self emails first uid \ No newline at end of file + self emails ifEmpty: [^ self]. + + self retrieveFlagsFrom: self emails last uniqueID to: self emails first uniqueID \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/folderName..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/folderName..st new file mode 100644 index 00000000..00a5b191 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/folderName..st @@ -0,0 +1,4 @@ +accessing +folderName: aString + + folderName := aString \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/folderName.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/folderName.st new file mode 100644 index 00000000..85a68045 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/folderName.st @@ -0,0 +1,4 @@ +accessing +folderName + + ^ folderName ifNil: [folderName := self class defaultName] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/getHighestUID.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/getHighestUID.st deleted file mode 100644 index 0c4f6145..00000000 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/getHighestUID.st +++ /dev/null @@ -1,6 +0,0 @@ -updateEmails -getHighestUID - - (self emails) ifEmpty: [^ nil]. - - ^ (self emails detectMax: [:mail | mail uid asNumber]) uid \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/getLatestEmails..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/getLatestEmails..st deleted file mode 100644 index f39e2ece..00000000 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/getLatestEmails..st +++ /dev/null @@ -1,12 +0,0 @@ -email access -getLatestEmails: count - - | startUID allUIDs | - - self endpoint getCurrentUIDsFor: self. - allUIDs := self endpoint uids. - allUIDs ifEmpty: [^ OrderedCollection new]. - (allUIDs size - count) <= 0 - ifTrue: [startUID := (allUIDs at: 1) - 1] - ifFalse: [startUID := allUIDs at: (allUIDs size - count)]. - self fetchHeadersFrom: startUID \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/getLowestUID.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/getLowestUID.st deleted file mode 100644 index 6845505e..00000000 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/getLowestUID.st +++ /dev/null @@ -1,6 +0,0 @@ -updateEmails -getLowestUID - - (self emails) ifEmpty: [^ nil]. - - ^ (self emails detectMin: [:mail | mail uid asNumber]) uid \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/hierarchyDelimiter.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/hierarchyDelimiter.st new file mode 100644 index 00000000..be244755 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/hierarchyDelimiter.st @@ -0,0 +1,4 @@ +accessing +hierarchyDelimiter + + ^ self endpoint hierarchyDelimiter \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/highestUniqueID.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/highestUniqueID.st new file mode 100644 index 00000000..747c1147 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/highestUniqueID.st @@ -0,0 +1,6 @@ +updateEmails +highestUniqueID + + (self emails) ifEmpty: [^ nil]. + + ^ (self emails detectMax: [:mail | mail uniqueID asNumber]) uniqueID \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/initialize.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/initialize.st deleted file mode 100644 index ad5dd80a..00000000 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/initialize.st +++ /dev/null @@ -1,8 +0,0 @@ -initialization -initialize - - self - parent: self; - childFolders: OrderedCollection new; - emails: (SortedCollection sortBlock: [:first :second | first getDateInSeconds >= second getDateInSeconds]); - name: self class defaultName \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/latestEmails..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/latestEmails..st new file mode 100644 index 00000000..f2facb45 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/latestEmails..st @@ -0,0 +1,12 @@ +email access +latestEmails: count + + | startUID allUIDs | + + self endpoint currentUIDsFor: self. + allUIDs := self endpoint uids. + allUIDs ifEmpty: [^ OrderedCollection new]. + (allUIDs size - count) strictlyPositive + ifTrue: [startUID := allUIDs at: (allUIDs size - count)] + ifFalse: [startUID := (allUIDs first) - 1]. + self fetchHeadersFrom: startUID \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/loadOlderMails.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/loadOlderMails.st index bac07f34..7b707cc7 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/loadOlderMails.st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/loadOlderMails.st @@ -1,9 +1,7 @@ email access loadOlderMails - "load #numberOfMails mails starting at lowest uid" - self emails addAll: (self endpoint - getCurrentUIDsFor: self; - fetchMailsBeginningAt: self getLowestUID number: self class numberOfHeadersToFetchAtLoadOlderMails) \ No newline at end of file + currentUIDsFor: self; + fetchMailsBeginningAt: self lowestUniqueID number: self class numberOfHeadersToFetchAtLoadOlderMails) \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/lowestUniqueID.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/lowestUniqueID.st new file mode 100644 index 00000000..258f0588 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/lowestUniqueID.st @@ -0,0 +1,6 @@ +updateEmails +lowestUniqueID + + (self emails) ifEmpty: [^ nil]. + + ^ (self emails detectMin: [:mail | mail uniqueID asNumber]) uniqueID \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/name..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/name..st deleted file mode 100644 index 63b0e25f..00000000 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/name..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -name: anObject - - name := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/name.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/name.st deleted file mode 100644 index 4b7f3504..00000000 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/name.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -name - - ^ name \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/parent..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/parent..st index 8a37352d..2a53b45f 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/parent..st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/parent..st @@ -1,4 +1,4 @@ accessing -parent: anObject +parent: anICFolder - parent := anObject \ No newline at end of file + parent := anICFolder \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/parentPath.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/parentPath.st new file mode 100644 index 00000000..93a65324 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/parentPath.st @@ -0,0 +1,4 @@ +accessing +parentPath + + ^ self parent path \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/path.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/path.st index a2e0ef69..5e1404a6 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/path.st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/path.st @@ -1,6 +1,6 @@ folder hierarchy path - ^ (self parent == self endpoint rootFolder) - ifTrue: [ self name ] - ifFalse: [ self parent path, self endpoint hierarchyDelimiter, self name] \ No newline at end of file + ^ (self parent == self rootFolder) + ifTrue: [ self folderName ] + ifFalse: [ self parentPath, self hierarchyDelimiter, self folderName] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/recursiveChildFolders.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/recursiveChildFolders.st new file mode 100644 index 00000000..2aa462bc --- /dev/null +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/recursiveChildFolders.st @@ -0,0 +1,4 @@ +accessing +recursiveChildFolders + + ^ {self childFolders collect: [:child | child recursiveChildFolders]. self childFolders} flatten asOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/removeMail..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/removeMail..st new file mode 100644 index 00000000..12d46e40 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/removeMail..st @@ -0,0 +1,4 @@ +email access +removeMail: anICEmail + + self emails remove: anICEmail. \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/retrieveFlagsFrom.to..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/retrieveFlagsFrom.to..st index 3a181b78..3286fc5f 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/retrieveFlagsFrom.to..st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/retrieveFlagsFrom.to..st @@ -1,8 +1,5 @@ updateEmails retrieveFlagsFrom: anUID to: anotherUID - - "fetch mails from [anUid; anotherUID]" - self endpoint select: self path; retrieveFlagsFrom: anUID to: anotherUID in: self \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/rootFolder.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/rootFolder.st new file mode 100644 index 00000000..d7460ae0 --- /dev/null +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/rootFolder.st @@ -0,0 +1,4 @@ +accessing +rootFolder + + ^ self endpoint rootFolder \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/startUpdateProcess..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/startUpdateProcess..st index faa20aa2..76e36ba9 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/startUpdateProcess..st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/startUpdateProcess..st @@ -1,10 +1,10 @@ updateEmails startUpdateProcess: anUID - (self name = 'root') ifTrue: [^self]. + (self folderName = 'root') ifTrue: [^self]. [anUID - ifNil: [self getLatestEmails: self class numberOfHeadersToFetchAtTheBeginning] + ifNil: [self latestEmails: self class numberOfHeadersToFetchAtTheBeginning] ifNotNil: [self fetchHeadersFrom: anUID]] - on: Error + on: Error do: [:e | self inform: e asString] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/update..st b/packages/IMAPClient-Core.package/ICFolder.class/instance/update..st index f36314a5..bc4edca7 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/update..st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/update..st @@ -3,7 +3,7 @@ update: aBlock ProgressNotification signal: (aBlock value) - extra: (self endpoint name, ' Mailbox. Folder: ', self name). + extra: (self accountName, ' Mailbox. Folder: ', self folderName). - self startUpdateProcess: self getHighestUID. + self startUpdateProcess: self highestUniqueID. self childFolders do: [:anICFolder | anICFolder update: aBlock] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/instance/update.st b/packages/IMAPClient-Core.package/ICFolder.class/instance/update.st index 2a4359cc..12e046dd 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/instance/update.st +++ b/packages/IMAPClient-Core.package/ICFolder.class/instance/update.st @@ -1,5 +1,5 @@ updateEmails update - self startUpdateProcess: self getHighestUID. + self startUpdateProcess: self highestUniqueID. self childFolders do: [:anICFolder | anICFolder update] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICFolder.class/methodProperties.json b/packages/IMAPClient-Core.package/ICFolder.class/methodProperties.json index ff82c6e8..5f21b25d 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/methodProperties.json +++ b/packages/IMAPClient-Core.package/ICFolder.class/methodProperties.json @@ -2,40 +2,46 @@ "class" : { "defaultName" : "js 6/7/2016 11:49", "errorChildDoesNotExist" : "js 6/14/2016 09:27", - "named:in:" : "C.G. 7/25/2018 14:12", - "named:in:with:" : "C.G. 7/4/2018 13:07", + "named:in:" : "tg 7/19/2019 09:27", + "named:in:with:" : "tg 7/19/2019 09:19", "newRootFolderWith:" : "C.G. 7/25/2018 14:12", "numberOfHeadersToFetchAtLoadOlderMails" : "DH 7/22/2018 22:37", "numberOfHeadersToFetchAtTheBeginning" : "DH 7/22/2018 22:37" }, "instance" : { + "accountName" : "ok 7/26/2019 19:06", "addFolder:" : "js 6/7/2016 13:09", - "checkTopicality" : "C.G. 7/25/2018 14:02", + "addMails:" : "tg 7/26/2019 22:00", + "checkTopicality" : "fr 7/26/2019 15:57", "childFolderNamed:" : "C.G. 7/25/2018 14:02", - "childFolderNamed:ifAbsent:" : "C.G. 6/26/2018 10:58", + "childFolderNamed:ifAbsent:" : "tg 7/19/2019 09:19", "childFolderNamed:with:" : "C.G. 6/26/2018 11:01", - "childFolderNamed:with:ifAbsent:" : "DH 7/9/2018 00:23", - "childFolders" : "js 6/7/2016 11:32", + "childFolderNamed:with:ifAbsent:" : "tg 7/26/2019 21:52", + "childFolders" : "pm 6/9/2019 13:12", "childFolders:" : "js 6/7/2016 11:32", "countFolders" : "C.G. 7/25/2018 14:02", - "emails" : "ms 6/28/2016 09:52", + "emails" : "fr 7/26/2019 15:19", "emails:" : "ms 6/28/2016 09:52", "endpoint" : "ms 7/10/2016 13:24", - "endpoint:" : "ms 7/10/2016 13:24", - "fetchHeadersFrom:" : "C.G. 7/25/2018 14:03", - "getHighestUID" : "C.G. 7/25/2018 14:03", - "getLatestEmails:" : "C.G. 7/12/2018 08:10", - "getLowestUID" : "C.G. 7/25/2018 14:03", - "initialize" : "DH 7/9/2018 11:22", - "loadOlderMails" : "C.G. 7/25/2018 14:03", - "name" : "js 6/7/2016 12:16", - "name:" : "js 6/7/2016 11:48", + "endpoint:" : "pm 6/9/2019 16:56", + "fetchHeadersFrom:" : "tg 7/26/2019 21:05", + "folderName" : "tg 7/19/2019 09:17", + "folderName:" : "tg 7/19/2019 09:17", + "hierarchyDelimiter" : "ok 7/26/2019 19:02", + "highestUniqueID" : "pm 6/3/2019 18:34", + "latestEmails:" : "fr 7/26/2019 15:55", + "loadOlderMails" : "tg 7/26/2019 21:05", + "lowestUniqueID" : "pm 6/3/2019 18:34", "numOfUnseenMails" : "C.G. 7/25/2018 14:03", - "parent" : "js 6/7/2016 11:32", + "parent" : "tg 6/25/2019 21:21", "parent:" : "js 6/7/2016 11:32", - "path" : "C.G. 7/25/2018 14:03", + "parentPath" : "ok 7/26/2019 19:08", + "path" : "ok 7/26/2019 19:08", + "recursiveChildFolders" : "tg 7/25/2019 12:56", "removeFolder:" : "C.G. 7/25/2018 14:03", "removeFolder:ifAbsent:" : "C.G. 7/25/2018 14:04", - "retrieveFlagsFrom:to:" : "C.G. 7/25/2018 14:04", - "startUpdateProcess:" : "DH 7/23/2018 00:00", - "update" : "DH 7/9/2018 00:49", - "update:" : "DH 7/19/2018 22:11" } } + "removeMail:" : "tg 7/26/2019 21:59", + "retrieveFlagsFrom:to:" : "fr 7/26/2019 15:37", + "rootFolder" : "ok 7/26/2019 19:05", + "startUpdateProcess:" : "tg 7/26/2019 20:33", + "update" : "pm 6/3/2019 18:34", + "update:" : "ok 7/26/2019 19:05" } } diff --git a/packages/IMAPClient-Core.package/ICFolder.class/properties.json b/packages/IMAPClient-Core.package/ICFolder.class/properties.json index c0a1657e..3ab0f024 100644 --- a/packages/IMAPClient-Core.package/ICFolder.class/properties.json +++ b/packages/IMAPClient-Core.package/ICFolder.class/properties.json @@ -8,7 +8,7 @@ "instvars" : [ "parent", "childFolders", - "name", + "folderName", "emails", "endpoint" ], "name" : "ICFolder", diff --git a/packages/IMAPClient-Core.package/ICHelper.class/README.md b/packages/IMAPClient-Core.package/ICHelper.class/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/IMAPClient-Core.package/ICHelper.class/class/accountDictionariesToEndpoints..st b/packages/IMAPClient-Core.package/ICHelper.class/class/accountDictionariesToEndpoints..st deleted file mode 100644 index dbb2c1c2..00000000 --- a/packages/IMAPClient-Core.package/ICHelper.class/class/accountDictionariesToEndpoints..st +++ /dev/null @@ -1,12 +0,0 @@ -helper methods -accountDictionariesToEndpoints: aCollection - - "this method takes a collection of dictionaries, which contain login information, and responds with a collection of - endpoints, which are created from the dictionary data" - - | endpointCollection | - - endpointCollection := OrderedCollection new. - aCollection do: [:configData | endpointCollection add: (ICEndPoint new fromDictionary: configData)]. - - ^ endpointCollection \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICHelper.class/class/deleteAccountFromEndpoint..st b/packages/IMAPClient-Core.package/ICHelper.class/class/deleteAccountFromEndpoint..st deleted file mode 100644 index 926ac8dd..00000000 --- a/packages/IMAPClient-Core.package/ICHelper.class/class/deleteAccountFromEndpoint..st +++ /dev/null @@ -1,30 +0,0 @@ -helper methods -deleteAccountFromEndpoint: aEndpoint - - "Takes an currently active endpoint and deletes the account." - - | directory configDirectory fileName mailDirectory | - - fileName := self getHashNameForAccount: (aEndpoint serverInfo host) and: (aEndpoint authenticationInfo username). - directory := FileDirectory default. - - (directory directoryExists: 'Maildir') - ifFalse: [^ self]. - - directory := directory directoryNamed: 'Maildir'. - - "delete config file" - (directory directoryExists: 'config') - ifFalse: [^ self]. - - configDirectory := directory directoryNamed: 'config'. - - (configDirectory fileOrDirectoryExists: fileName) - ifTrue: [configDirectory deleteFileNamed: fileName]. - - "delete mail folder" - (directory directoryExists: fileName) - ifFalse: [^ self]. - - mailDirectory := directory directoryNamed: fileName. - mailDirectory recursiveDelete \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICHelper.class/class/getAllFolders..st b/packages/IMAPClient-Core.package/ICHelper.class/class/getAllFolders..st deleted file mode 100644 index 338dfeff..00000000 --- a/packages/IMAPClient-Core.package/ICHelper.class/class/getAllFolders..st +++ /dev/null @@ -1,18 +0,0 @@ -helper methods -getAllFolders: initialCollection - - | folders stack | - - folders := OrderedCollection new. - - "depth first search" - stack := Stack new. - initialCollection do: [:each | stack push: each]. - - [stack isEmpty] whileFalse: [ - | topElement | - topElement := stack pop. - folders add: topElement. - topElement childFolders do: [ :folder | stack push: folder]]. - - ^ folders \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICHelper.class/class/getHashNameForAccount.and..st b/packages/IMAPClient-Core.package/ICHelper.class/class/getHashNameForAccount.and..st deleted file mode 100644 index 2a483bba..00000000 --- a/packages/IMAPClient-Core.package/ICHelper.class/class/getHashNameForAccount.and..st +++ /dev/null @@ -1,4 +0,0 @@ -helper methods -getHashNameForAccount: aMailServer and: aUsername - - ^ (SecureHashAlgorithm new hashMessage: aMailServer, aUsername) asString first: 10 \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICHelper.class/class/loadCredentialsIntoDictionaries.st b/packages/IMAPClient-Core.package/ICHelper.class/class/loadCredentialsIntoDictionaries.st deleted file mode 100644 index f63f2baf..00000000 --- a/packages/IMAPClient-Core.package/ICHelper.class/class/loadCredentialsIntoDictionaries.st +++ /dev/null @@ -1,42 +0,0 @@ -helper methods -loadCredentialsIntoDictionaries - - "this methods loads all credentials from within config folder, - and returns them in a collection of dictionaries, which contain the login information" - - | defaultDirectory maildirDirectory configDirectory configs configCollection | - - configCollection := OrderedCollection new. - defaultDirectory := FileDirectory default. - - (defaultDirectory directoryExists: 'Maildir') - ifTrue: [ - maildirDirectory := defaultDirectory directoryNamed: 'Maildir'. - (maildirDirectory directoryExists: 'config') - ifTrue: [ - configDirectory := maildirDirectory directoryNamed: 'config'. - configs := configDirectory fileNames. - configs do: [ :config | - | loginData dataDictionary | - loginData := OrderedCollection new. - dataDictionary := Dictionary new. - - "parse config file" - FileStream readOnlyFileNamed: (configDirectory fullPathFor: config) do: - [:stream | - [stream atEnd] - whileFalse: [ - | line | - line := stream nextLine. - loginData add: line]]. - - "create a dictionary for each config file" - dataDictionary at: 'name' put: (loginData at: 1). - dataDictionary at: 'ssl' put: (self parseStringToBool: (loginData at: 5)). - dataDictionary at: 'address' put: (loginData at: 2) . - dataDictionary at: 'port' put: ((loginData at: 3) asString). - dataDictionary at: 'username' put: (loginData at: 4). - - configCollection add: dataDictionary]]]. - - ^ configCollection \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICHelper.class/class/makeParameterCollection..st b/packages/IMAPClient-Core.package/ICHelper.class/class/makeParameterCollection..st deleted file mode 100644 index b2a4410e..00000000 --- a/packages/IMAPClient-Core.package/ICHelper.class/class/makeParameterCollection..st +++ /dev/null @@ -1,16 +0,0 @@ -as yet unclassified -makeParameterCollection: aCollection - - "This hardcoded function returns a Collection of the given keys in the Dictionary. - It is sorted by the order in which the data needs to be inserted in the ICLoginDialog" - - | sortedCollection | - - sortedCollection := OrderedCollection new. - (aCollection includes: 'password') ifTrue: [sortedCollection addFirst: 'password']. - (aCollection includes: 'username') ifTrue: [sortedCollection addFirst: 'username']. - (aCollection includes: 'port') ifTrue: [sortedCollection addFirst: 'server port']. - (aCollection includes: 'address') ifTrue: [sortedCollection addFirst: 'server address']. - (aCollection includes: 'name') ifTrue: [sortedCollection addFirst: 'account name']. - - ^ sortedCollection \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICHelper.class/class/parseStringToBool..st b/packages/IMAPClient-Core.package/ICHelper.class/class/parseStringToBool..st deleted file mode 100644 index 3c50dbf9..00000000 --- a/packages/IMAPClient-Core.package/ICHelper.class/class/parseStringToBool..st +++ /dev/null @@ -1,6 +0,0 @@ -helper methods -parseStringToBool: aString - - aString = 'true' - ifTrue: [^ true] - ifFalse: [ ^ false] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICHelper.class/class/resetMailData.st b/packages/IMAPClient-Core.package/ICHelper.class/class/resetMailData.st deleted file mode 100644 index e7bd5fa6..00000000 --- a/packages/IMAPClient-Core.package/ICHelper.class/class/resetMailData.st +++ /dev/null @@ -1,17 +0,0 @@ -helper methods -resetMailData - - | directory | - - "warning: this will delete whole Maildir Directory" - directory := FileDirectory default. - - (directory directoryExists: 'Maildir') - ifFalse: [^ 'No Maildir exists']. - - directory := directory directoryNamed: 'Maildir'. - directory recursiveDelete. - - ICLoadOlderMail instance: nil. - - ^ 'OK' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICHelper.class/class/saveCredentialsIntoFile..st b/packages/IMAPClient-Core.package/ICHelper.class/class/saveCredentialsIntoFile..st deleted file mode 100644 index 3c51b08e..00000000 --- a/packages/IMAPClient-Core.package/ICHelper.class/class/saveCredentialsIntoFile..st +++ /dev/null @@ -1,31 +0,0 @@ -helper methods -saveCredentialsIntoFile: aDataDictionary - - "Takes a dictionary and saves data in a config file. - aDataDictionary should have keys: [name, address, port, username, password, ssl]" - - | default_directory maildir_directory config_directory fileName | - - fileName := self getHashNameForAccount: (aDataDictionary at: 'address') and: (aDataDictionary at: 'username') . - - default_directory := FileDirectory default. - (default_directory directoryExists: 'Maildir') - ifFalse: [default_directory createDirectory: 'Maildir']. - maildir_directory := default_directory directoryNamed: 'Maildir'. - - (maildir_directory directoryExists: 'config') - ifFalse: [maildir_directory createDirectory: 'config']. - config_directory := maildir_directory directoryNamed: 'config'. - - (config_directory fileOrDirectoryExists: fileName) - ifTrue: [config_directory deleteFileNamed: fileName]. - - FileStream forceNewFileNamed: (config_directory fullPathFor: fileName) do: - [ :stream | stream - wantsLineEndConversion: false; - nextPutAll: (aDataDictionary at: 'name') asString; cr; - nextPutAll: (aDataDictionary at: 'address') asString; cr; - nextPutAll: (aDataDictionary at: 'port') asString; cr; - nextPutAll: (aDataDictionary at: 'username') asString; cr; - nextPutAll: (aDataDictionary at: 'ssl') asString; cr; - close] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICHelper.class/methodProperties.json b/packages/IMAPClient-Core.package/ICHelper.class/methodProperties.json deleted file mode 100644 index b026d901..00000000 --- a/packages/IMAPClient-Core.package/ICHelper.class/methodProperties.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "class" : { - "accountDictionariesToEndpoints:" : "C.G. 6/21/2018 10:43", - "deleteAccountFromEndpoint:" : "C.G. 7/25/2018 14:06", - "getAllFolders:" : "C.G. 7/12/2018 08:13", - "getHashNameForAccount:and:" : "C.G. 7/25/2018 14:06", - "loadCredentialsIntoDictionaries" : "C.G. 7/25/2018 14:06", - "makeParameterCollection:" : "C.G. 7/25/2018 12:20", - "parseStringToBool:" : "C.G. 7/25/2018 14:07", - "resetMailData" : "C.G. 7/4/2018 13:10", - "saveCredentialsIntoFile:" : "C.G. 7/25/2018 14:07" }, - "instance" : { - } } diff --git a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/README.md b/packages/IMAPClient-Core.package/ICLoadOlderMail.class/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/class/instance..st b/packages/IMAPClient-Core.package/ICLoadOlderMail.class/class/instance..st deleted file mode 100644 index c4ee7b16..00000000 --- a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/class/instance..st +++ /dev/null @@ -1,4 +0,0 @@ -instances -instance: anObject - - instance := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/class/instanceFor..st b/packages/IMAPClient-Core.package/ICLoadOlderMail.class/class/instanceFor..st deleted file mode 100644 index c589db90..00000000 --- a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/class/instanceFor..st +++ /dev/null @@ -1,17 +0,0 @@ -instances -instanceFor: anICFolderDialog - - instance ifNil: [instance := self new - header: (Dictionary newFrom: { - #date -> ''. - #from -> ''. - #seen -> true. - #subject -> 'load older eMails!'. - #to -> OrderedCollection new}); - body: ''; - seen: true; - flagged: false; - messageID: '-1'; - uid: '-1']. - - ^ instance folder: anICFolderDialog selectedFolder; folderDialog: anICFolderDialog \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/folderDialog..st b/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/folderDialog..st deleted file mode 100644 index 20d94825..00000000 --- a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/folderDialog..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -folderDialog: anICFolderDialog - - folderDialog := anICFolderDialog \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/folderDialog.st b/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/folderDialog.st deleted file mode 100644 index 02c6aa3b..00000000 --- a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/folderDialog.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -folderDialog - - ^ folderDialog \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/getDateInSeconds.st b/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/getDateInSeconds.st deleted file mode 100644 index 1ae91175..00000000 --- a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/getDateInSeconds.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -getDateInSeconds - - ^ -1 \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/isFlaggable.st b/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/isFlaggable.st deleted file mode 100644 index b577d36c..00000000 --- a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/isFlaggable.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -isFlaggable - - ^ false \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/open.st b/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/open.st deleted file mode 100644 index 809f29f4..00000000 --- a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/open.st +++ /dev/null @@ -1,4 +0,0 @@ -action -open - - self folderDialog loadOlderEmails \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/retrieveFlags.st b/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/retrieveFlags.st deleted file mode 100644 index a3d3a0f4..00000000 --- a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/instance/retrieveFlags.st +++ /dev/null @@ -1,6 +0,0 @@ -action -retrieveFlags - - "mock retrieve flags" - - ^ Dictionary newFrom: {#seen -> true} \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/methodProperties.json b/packages/IMAPClient-Core.package/ICLoadOlderMail.class/methodProperties.json deleted file mode 100644 index 1cd59438..00000000 --- a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/methodProperties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "class" : { - "instance:" : "C.G. 7/25/2018 14:09", - "instanceFor:" : "DH 6/26/2018 11:03" }, - "instance" : { - "folderDialog" : "lvm 5/23/2018 13:24", - "folderDialog:" : "lvm 5/23/2018 13:24", - "getDateInSeconds" : "DH 7/9/2018 11:21", - "isFlaggable" : "lvm 5/23/2018 13:15", - "open" : "lvm 5/24/2018 09:33", - "retrieveFlags" : "C.G. 6/26/2018 11:03" } } diff --git a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/properties.json b/packages/IMAPClient-Core.package/ICLoadOlderMail.class/properties.json deleted file mode 100644 index b60c1da7..00000000 --- a/packages/IMAPClient-Core.package/ICLoadOlderMail.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "category" : "IMAPClient-Core", - "classinstvars" : [ - "instance" ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - "folderDialog" ], - "name" : "ICLoadOlderMail", - "pools" : [ - ], - "super" : "ICEmail", - "type" : "normal" } diff --git a/packages/IMAPClient-Core.package/ICNullStream.class/README.md b/packages/IMAPClient-Core.package/ICNullStream.class/README.md index 1480daf1..bd303411 100644 --- a/packages/IMAPClient-Core.package/ICNullStream.class/README.md +++ b/packages/IMAPClient-Core.package/ICNullStream.class/README.md @@ -1 +1 @@ -An ICNullStream is a Null Object resembling an ICStreamWrapper. \ No newline at end of file +An ICNullStream is a Null Object resembling an SocketStream. \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICNullStream.class/properties.json b/packages/IMAPClient-Core.package/ICNullStream.class/properties.json index ccf4456c..1719d4bb 100644 --- a/packages/IMAPClient-Core.package/ICNullStream.class/properties.json +++ b/packages/IMAPClient-Core.package/ICNullStream.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "ms 7/28/2016 11:52", + "commentStamp" : "tg 7/25/2019 12:25", "instvars" : [ ], "name" : "ICNullStream", diff --git a/packages/IMAPClient-Core.package/ICServerInfo.class/README.md b/packages/IMAPClient-Core.package/ICServerInfo.class/README.md deleted file mode 100644 index c1fdb6a7..00000000 --- a/packages/IMAPClient-Core.package/ICServerInfo.class/README.md +++ /dev/null @@ -1 +0,0 @@ -An ICServerInfo is a wrapper for a host-port-combination. \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICServerInfo.class/class/defaultHost.st b/packages/IMAPClient-Core.package/ICServerInfo.class/class/defaultHost.st deleted file mode 100644 index 7e08bc2e..00000000 --- a/packages/IMAPClient-Core.package/ICServerInfo.class/class/defaultHost.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -defaultHost - - ^ 'unknown' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICServerInfo.class/class/for.using..st b/packages/IMAPClient-Core.package/ICServerInfo.class/class/for.using..st deleted file mode 100644 index 6a915ae9..00000000 --- a/packages/IMAPClient-Core.package/ICServerInfo.class/class/for.using..st +++ /dev/null @@ -1,6 +0,0 @@ -instance creation -for: host using: port - - ^ self new - host: host; - port: port \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICServerInfo.class/instance/host..st b/packages/IMAPClient-Core.package/ICServerInfo.class/instance/host..st deleted file mode 100644 index 0827711f..00000000 --- a/packages/IMAPClient-Core.package/ICServerInfo.class/instance/host..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -host: anObject - - host := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICServerInfo.class/instance/host.st b/packages/IMAPClient-Core.package/ICServerInfo.class/instance/host.st deleted file mode 100644 index 04d48494..00000000 --- a/packages/IMAPClient-Core.package/ICServerInfo.class/instance/host.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -host - - ^ host \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICServerInfo.class/instance/initialize.st b/packages/IMAPClient-Core.package/ICServerInfo.class/instance/initialize.st deleted file mode 100644 index 34404247..00000000 --- a/packages/IMAPClient-Core.package/ICServerInfo.class/instance/initialize.st +++ /dev/null @@ -1,5 +0,0 @@ -initialization -initialize - - self host: self class defaultHost. - self port: self class defaultPort \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICServerInfo.class/instance/isValid.st b/packages/IMAPClient-Core.package/ICServerInfo.class/instance/isValid.st deleted file mode 100644 index abafe4ec..00000000 --- a/packages/IMAPClient-Core.package/ICServerInfo.class/instance/isValid.st +++ /dev/null @@ -1,4 +0,0 @@ -validation -isValid - - ^ self host ~= self class defaultHost and: [self port ~= self class defaultPort] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICServerInfo.class/instance/port..st b/packages/IMAPClient-Core.package/ICServerInfo.class/instance/port..st deleted file mode 100644 index e0708f72..00000000 --- a/packages/IMAPClient-Core.package/ICServerInfo.class/instance/port..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -port: anObject - - port := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICServerInfo.class/instance/port.st b/packages/IMAPClient-Core.package/ICServerInfo.class/instance/port.st deleted file mode 100644 index 3913b353..00000000 --- a/packages/IMAPClient-Core.package/ICServerInfo.class/instance/port.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -port - - ^ port \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICServerInfo.class/methodProperties.json b/packages/IMAPClient-Core.package/ICServerInfo.class/methodProperties.json deleted file mode 100644 index 080c8e9a..00000000 --- a/packages/IMAPClient-Core.package/ICServerInfo.class/methodProperties.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "class" : { - "defaultHost" : "js 5/15/2016 16:06", - "defaultPort" : "js 5/15/2016 16:07", - "for:using:" : "js 5/15/2016 16:38" }, - "instance" : { - "host" : "js 5/15/2016 16:02", - "host:" : "js 5/15/2016 16:02", - "initialize" : "C.G. 7/25/2018 14:08", - "isValid" : "C.G. 7/25/2018 14:08", - "port" : "js 5/15/2016 16:02", - "port:" : "js 5/15/2016 16:02" } } diff --git a/packages/IMAPClient-Core.package/ICStreamWrapper.class/class/connectionTimeout.st b/packages/IMAPClient-Core.package/ICStreamWrapper.class/class/connectionTimeout.st new file mode 100644 index 00000000..19247f5f --- /dev/null +++ b/packages/IMAPClient-Core.package/ICStreamWrapper.class/class/connectionTimeout.st @@ -0,0 +1,4 @@ +constants +connectionTimeout + + ^ 10 \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/connectTo.on..st b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/connectTo.on..st index 1b7e6541..16f88cb3 100644 --- a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/connectTo.on..st +++ b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/connectTo.on..st @@ -1,10 +1,10 @@ connection -connectTo: host on: port +connectTo: aHost on: aPort | hostAddress | - self useSSL ifTrue: [^ self sslConnectTo: host on: port]. + self useSSL ifTrue: [^ self sslConnectTo: aHost on: aPort]. - hostAddress := NetNameResolver addressForName: host. + hostAddress := NetNameResolver addressForName: aHost. self close. - self stream: (SocketStream openConnectionToHost: hostAddress port: port) \ No newline at end of file + self stream: (SocketStream openConnectionToHost: hostAddress port: aPort) \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/host..st b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/host..st index 0827711f..8e89907c 100644 --- a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/host..st +++ b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/host..st @@ -1,4 +1,4 @@ accessing -host: anObject +host: aString - host := anObject \ No newline at end of file + host := aString \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/initialize.st b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/initialize.st deleted file mode 100644 index 7df41f20..00000000 --- a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/initialize.st +++ /dev/null @@ -1,5 +0,0 @@ -initialization -initialize - - self stream: ICNullStream new. - self ssl: false \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/lastResponse..st b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/lastResponse..st index 084335d7..21c35674 100644 --- a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/lastResponse..st +++ b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/lastResponse..st @@ -1,5 +1,4 @@ accessing -lastResponse: anObject +lastResponse: anOrderedCollection - Transcript show: 'RECEIVED: ', (anObject copy truncateTo:50); cr. - lastResponse := anObject \ No newline at end of file + lastResponse := anOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/port..st b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/port..st index e0708f72..776415e4 100644 --- a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/port..st +++ b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/port..st @@ -1,4 +1,4 @@ accessing -port: anObject +port: aNumber - port := anObject \ No newline at end of file + port := aNumber \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/sendCommand..st b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/sendCommand..st index 7b45972d..21169394 100644 --- a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/sendCommand..st +++ b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/sendCommand..st @@ -1,5 +1,4 @@ connection sendCommand: aString - Transcript show: 'SENDING: ', aString; cr. self stream sendCommand: aString \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/ssl..st b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/ssl..st index b1be2292..1e08ecbc 100644 --- a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/ssl..st +++ b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/ssl..st @@ -1,4 +1,4 @@ accessing -ssl: anObject +ssl: aBool - ssl := anObject \ No newline at end of file + ssl := aBool \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/ssl.st b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/ssl.st index 36952b3d..9d7a41d0 100644 --- a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/ssl.st +++ b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/ssl.st @@ -1,4 +1,4 @@ accessing ssl - ^ ssl \ No newline at end of file + ^ ssl ifNil: [ssl := false] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/sslConnectTo.on..st b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/sslConnectTo.on..st index b06d65ae..821816e4 100644 --- a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/sslConnectTo.on..st +++ b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/sslConnectTo.on..st @@ -1,8 +1,8 @@ connection -sslConnectTo: host on: port +sslConnectTo: aHost on: aPort | hostAddress | - hostAddress := NetNameResolver addressForName: host. - self stream: (SecureSocketStream openConnectionToHost: hostAddress port: port timeout: 10). - self stream sslConnectTo: host \ No newline at end of file + hostAddress := NetNameResolver addressForName: aHost. + self stream: (SecureSocketStream openConnectionToHost: hostAddress port: aPort timeout: self class connectionTimeout). + self stream sslConnectTo: aHost \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/stream..st b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/stream..st index b355bd09..91158002 100644 --- a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/stream..st +++ b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/stream..st @@ -1,4 +1,4 @@ accessing -stream: anObject +stream: aStream - stream := anObject \ No newline at end of file + stream := aStream \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/stream.st b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/stream.st index 80c70fdb..637bfdc8 100644 --- a/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/stream.st +++ b/packages/IMAPClient-Core.package/ICStreamWrapper.class/instance/stream.st @@ -1,4 +1,4 @@ accessing stream - ^ stream \ No newline at end of file + ^ stream ifNil: [stream := ICNullStream new] \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICStreamWrapper.class/methodProperties.json b/packages/IMAPClient-Core.package/ICStreamWrapper.class/methodProperties.json index 2c8b5123..7f9acfef 100644 --- a/packages/IMAPClient-Core.package/ICStreamWrapper.class/methodProperties.json +++ b/packages/IMAPClient-Core.package/ICStreamWrapper.class/methodProperties.json @@ -1,23 +1,22 @@ { "class" : { - }, + "connectionTimeout" : "ok 7/26/2019 18:50" }, "instance" : { "close" : "js 6/14/2016 10:43", - "connectTo:on:" : "C.G. 7/25/2018 14:08", + "connectTo:on:" : "tg 7/26/2019 22:13", "connectTo:on:with:" : "C.G. 7/25/2018 14:08", "host" : "js 6/7/2016 09:58", "host:" : "js 6/7/2016 09:59", - "initialize" : "ms 7/12/2016 10:09", "isConnected" : "js 6/7/2016 10:04", "lastResponse" : "js 6/7/2016 10:08", - "lastResponse:" : "DH 7/8/2018 23:57", + "lastResponse:" : "ok 7/26/2019 21:15", "nextResponse" : "C.G. 7/25/2018 14:09", "port" : "js 6/7/2016 09:59", - "port:" : "js 6/7/2016 10:05", - "sendCommand:" : "DH 6/26/2018 20:20", - "ssl" : "ms 7/12/2016 09:45", + "port:" : "pm 6/9/2019 16:59", + "sendCommand:" : "tg 7/26/2019 21:57", + "ssl" : "pm 6/9/2019 13:14", "ssl:" : "ms 7/12/2016 09:45", - "sslConnectTo:on:" : "C.G. 7/25/2018 14:09", - "stream" : "js 6/7/2016 10:05", + "sslConnectTo:on:" : "tg 7/26/2019 22:13", + "stream" : "pm 6/9/2019 13:14", "stream:" : "js 6/7/2016 10:05", "useSSL" : "ms 7/12/2016 09:45" } } diff --git a/packages/IMAPClient-Protocol.package/.filetree b/packages/IMAPClient-Protocol.package/.filetree new file mode 100644 index 00000000..8998102c --- /dev/null +++ b/packages/IMAPClient-Protocol.package/.filetree @@ -0,0 +1,4 @@ +{ + "noMethodMetaData" : true, + "separateMethodMetaAndSource" : false, + "useCypressPropertiesFile" : true } diff --git a/packages/IMAPClient-Protocol.package/.squot-contents b/packages/IMAPClient-Protocol.package/.squot-contents new file mode 100644 index 00000000..239ddebb --- /dev/null +++ b/packages/IMAPClient-Protocol.package/.squot-contents @@ -0,0 +1,5 @@ +SquotTrackedObjectMetadata { + #objectClassName : #PackageInfo, + #objectsReplacedByNames : true, + #serializer : #SquotCypressCodeSerializer +} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/README.md b/packages/IMAPClient-Protocol.package/ICCommand.class/README.md new file mode 100644 index 00000000..a98eb80a --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/README.md @@ -0,0 +1,2 @@ +ICCommands builds commands to send to the server. +The commands are conform to the IMAProtocol. \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/allUIDs.st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/allUIDs.st new file mode 100644 index 00000000..6ceb9b25 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/allUIDs.st @@ -0,0 +1,4 @@ +commands +allUIDs + + ^ self join: {'UID SEARCH ALL'} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/deleteEmail..st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/deleteEmail..st new file mode 100644 index 00000000..77647484 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/deleteEmail..st @@ -0,0 +1,4 @@ +commands +deleteEmail: aMessageId + + ^ self join: {'STORE' . aMessageId . '+FLAGS \Deleted'} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/expungeEmail.st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/expungeEmail.st new file mode 100644 index 00000000..a4d95a90 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/expungeEmail.st @@ -0,0 +1,4 @@ +commands +expungeEmail + + ^ self join: {'EXPUNGE'} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/fetchBody..st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/fetchBody..st new file mode 100644 index 00000000..58747ced --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/fetchBody..st @@ -0,0 +1,4 @@ +commands +fetchBody: aMessageId + + ^ self join: {'FETCH' . aMessageId . 'body[TEXT]'} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/fetchFlagsForUIDsFrom.to..st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/fetchFlagsForUIDsFrom.to..st new file mode 100644 index 00000000..614a6948 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/fetchFlagsForUIDsFrom.to..st @@ -0,0 +1,4 @@ +commands +fetchFlagsForUIDsFrom: aBeginUID to: anEndUID + + ^ self join: {'UID FETCH' . (aBeginUID asString, ':', anEndUID asString) . '(FLAGS)'} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/fetchHeadersForUIDsFrom.to..st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/fetchHeadersForUIDsFrom.to..st new file mode 100644 index 00000000..bc7cf2dc --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/fetchHeadersForUIDsFrom.to..st @@ -0,0 +1,7 @@ +commands +fetchHeadersForUIDsFrom: aBeginId to: anEndId + + ^ self join: { + 'UID FETCH' . + (aBeginId asString, ':', anEndId asString) . + '(FLAGS BODY.PEEK[HEADER.FIELDS (from to subject date content-type content-transfer-encoding)])'} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/isValidFlag..st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/isValidFlag..st new file mode 100644 index 00000000..8febe83b --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/isValidFlag..st @@ -0,0 +1,4 @@ +validation +isValidFlag: aFlagString + + ^ {'Seen' . 'Flagged'} includes: aFlagString withFirstCharacterUppercase \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/join..st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/join..st new file mode 100644 index 00000000..3c417dd2 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/join..st @@ -0,0 +1,6 @@ +command building +join: aCommandArray + + ^ aCommandArray asOrderedCollection + addFirst: self protocolCommandStart; + joinSeparatedBy: self protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/listSubfoldersOf.filterBy..st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/listSubfoldersOf.filterBy..st new file mode 100644 index 00000000..eefb6719 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/listSubfoldersOf.filterBy..st @@ -0,0 +1,4 @@ +commands +listSubfoldersOf: aFolder filterBy: aFilter + + ^ self join: {'LIST' . self putInQuotes: aFolder . self putInQuotes: aFilter} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/loginWith..st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/loginWith..st new file mode 100644 index 00000000..26293144 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/loginWith..st @@ -0,0 +1,4 @@ +commands +loginWith: anAccountInfo + + ^ self join: {'LOGIN' . anAccountInfo usernameAsIMAPString . anAccountInfo passwordAsIMAPString} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/logout.st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/logout.st new file mode 100644 index 00000000..cd7c8db6 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/logout.st @@ -0,0 +1,4 @@ +commands +logout + + ^ self join: {'LOGOUT'} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/moveEmail.to..st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/moveEmail.to..st new file mode 100644 index 00000000..2dce1cdb --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/moveEmail.to..st @@ -0,0 +1,4 @@ +commands +moveEmail: aMessageId to: aFolder + + ^ self join: {'MOVE' . aMessageId . self putInQuotes: aFolder} diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/noop.st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/noop.st new file mode 100644 index 00000000..87ca0330 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/noop.st @@ -0,0 +1,4 @@ +commands +noop + + ^ self join: {'NOOP'} \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/protocolBlank.st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/protocolBlank.st similarity index 100% rename from packages/IMAPClient-Core.package/ICEndPoint.class/class/protocolBlank.st rename to packages/IMAPClient-Protocol.package/ICCommand.class/class/protocolBlank.st diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/protocolCommandStart.st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/protocolCommandStart.st similarity index 82% rename from packages/IMAPClient-Core.package/ICEndPoint.class/class/protocolCommandStart.st rename to packages/IMAPClient-Protocol.package/ICCommand.class/class/protocolCommandStart.st index 5d918148..4b0cd3c3 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/protocolCommandStart.st +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/protocolCommandStart.st @@ -1,4 +1,4 @@ constants protocolCommandStart - ^ '.' \ No newline at end of file + ^ '.' \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/protocolQuote.st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/protocolQuote.st similarity index 100% rename from packages/IMAPClient-Core.package/ICEndPoint.class/class/protocolQuote.st rename to packages/IMAPClient-Protocol.package/ICCommand.class/class/protocolQuote.st diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/putInQuotes..st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/putInQuotes..st new file mode 100644 index 00000000..437a3e34 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/putInQuotes..st @@ -0,0 +1,4 @@ +command building +putInQuotes: aString + + ^ ICCommand protocolQuote, aString, ICCommand protocolQuote \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/resetFlag.for..st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/resetFlag.for..st new file mode 100644 index 00000000..9a9c43f0 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/resetFlag.for..st @@ -0,0 +1,5 @@ +commands +resetFlag: aFlagString for: aMessageId + + (self isValidFlag: aFlagString) ifFalse: [self error: 'Trying to send invalid Flag']. + ^ self join: {'STORE' . aMessageId . '-FLAGS \', aFlagString withFirstCharacterUppercase} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/select..st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/select..st new file mode 100644 index 00000000..bc95f61d --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/select..st @@ -0,0 +1,4 @@ +commands +select: aFolder + + ^ self join: {'SELECT' . self putInQuotes: aFolder} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/class/setFlag.for..st b/packages/IMAPClient-Protocol.package/ICCommand.class/class/setFlag.for..st new file mode 100644 index 00000000..56013352 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/class/setFlag.for..st @@ -0,0 +1,5 @@ +commands +setFlag: aFlagString for: aMessageId + + (self isValidFlag: aFlagString) ifFalse: [self error: 'Trying to send invalid Flag']. + ^ self join: {'STORE' . aMessageId . '+FLAGS \', aFlagString withFirstCharacterUppercase} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICCommand.class/methodProperties.json b/packages/IMAPClient-Protocol.package/ICCommand.class/methodProperties.json new file mode 100644 index 00000000..538e6957 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/methodProperties.json @@ -0,0 +1,24 @@ +{ + "class" : { + "allUIDs" : "pm 7/23/2019 14:18", + "deleteEmail:" : "pm 7/23/2019 14:46", + "expungeEmail" : "pm 7/23/2019 14:19", + "fetchBody:" : "pm 7/23/2019 14:48", + "fetchFlagsForUIDsFrom:to:" : "pm 7/24/2019 21:18", + "fetchHeadersForUIDsFrom:to:" : "pm 7/24/2019 21:18", + "isValidFlag:" : "tg 7/26/2019 13:45", + "join:" : "pm 7/24/2019 21:24", + "listSubfoldersOf:filterBy:" : "pm 7/23/2019 14:50", + "loginWith:" : "pm 7/23/2019 14:52", + "logout" : "pm 7/23/2019 14:53", + "moveEmail:to:" : "pm 7/23/2019 14:54", + "noop" : "pm 7/23/2019 15:09", + "protocolBlank" : "pm 7/24/2019 21:21", + "protocolCommandStart" : "pm 7/24/2019 21:21", + "protocolQuote" : "pm 7/24/2019 21:21", + "putInQuotes:" : "pm 7/25/2019 17:25", + "resetFlag:for:" : "pm 7/23/2019 18:29", + "select:" : "pm 7/23/2019 18:24", + "setFlag:for:" : "pm 7/23/2019 18:29" }, + "instance" : { + } } diff --git a/packages/IMAPClient-Core.package/ICServerInfo.class/properties.json b/packages/IMAPClient-Protocol.package/ICCommand.class/properties.json similarity index 51% rename from packages/IMAPClient-Core.package/ICServerInfo.class/properties.json rename to packages/IMAPClient-Protocol.package/ICCommand.class/properties.json index ab2e9dc6..a68e9fdf 100644 --- a/packages/IMAPClient-Core.package/ICServerInfo.class/properties.json +++ b/packages/IMAPClient-Protocol.package/ICCommand.class/properties.json @@ -1,14 +1,13 @@ { - "category" : "IMAPClient-Core", + "category" : "IMAPClient-Protocol", "classinstvars" : [ ], "classvars" : [ ], - "commentStamp" : "ms 7/28/2016 11:53", + "commentStamp" : "pm 7/23/2019 15:11", "instvars" : [ - "host", - "port" ], - "name" : "ICServerInfo", + ], + "name" : "ICCommand", "pools" : [ ], "super" : "Object", diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/README.md b/packages/IMAPClient-Protocol.package/ICParser.class/README.md new file mode 100644 index 00000000..b307024b --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/README.md @@ -0,0 +1 @@ +An ICParser is a stateless method bin that can parse a header, email body and folder path from a response. \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/buildFlagsAssociationFor.from..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/buildFlagsAssociationFor.from..st new file mode 100644 index 00000000..412619ab --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/buildFlagsAssociationFor.from..st @@ -0,0 +1,5 @@ +parsing +buildFlagsAssociationFor: aUidString from: aLineString + + ^ Association key: aUidString first value: (self flags select: [:flag | + aLineString includesSubString: flag]) \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/chop.forEmail..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/chop.forEmail..st new file mode 100644 index 00000000..f723d9b7 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/chop.forEmail..st @@ -0,0 +1,10 @@ +parsing +chop: aHeaderString forEmail: anEmail + + | headerChunks | + + headerChunks := OrderedCollection new. + (aHeaderString subStrings: Character cr asString) do: [:line | + self parse: line forHeaderChunks: headerChunks forEmail: anEmail]. + + ^ headerChunks \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/closeEmailContentFrom.for..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/closeEmailContentFrom.for..st new file mode 100644 index 00000000..ad9a8cb9 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/closeEmailContentFrom.for..st @@ -0,0 +1,5 @@ +parsing +closeEmailContentFrom: aStream for: anEmailString + + anEmailString nextPutAll: (aStream nextDelimited: $)). + aStream next \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/commandSucceeded..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/commandSucceeded..st new file mode 100644 index 00000000..380b4889 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/commandSucceeded..st @@ -0,0 +1,4 @@ +parsing +commandSucceeded: aResponseString + + ^ aResponseString beginsWith: self commandSucceeded \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/commandSucceeded.st b/packages/IMAPClient-Protocol.package/ICParser.class/class/commandSucceeded.st new file mode 100644 index 00000000..9ac21fc0 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/commandSucceeded.st @@ -0,0 +1,4 @@ +responses +commandSucceeded + + ^ {ICCommand protocolCommandStart . 'OK'} joinSeparatedBy: ICCommand protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/continueHeaderChunks.withLine..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/continueHeaderChunks.withLine..st new file mode 100644 index 00000000..a4994e2f --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/continueHeaderChunks.withLine..st @@ -0,0 +1,8 @@ +parsing +continueHeaderChunks: aCollection withLine: aString + + (self startsNewHeaderChunk: aString) + ifTrue: [aCollection add: {aString} asOrderedCollection] + ifFalse: [ + aCollection ifNotEmpty: [ + aCollection last add: aString]] \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/continueMailStream.into..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/continueMailStream.into..st new file mode 100644 index 00000000..91ff9d83 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/continueMailStream.into..st @@ -0,0 +1,8 @@ +parsing +continueMailStream: aStream into: anEmailStringCollection + + | id | + + id := self readMessageIdFromStream: aStream. + anEmailStringCollection at: id put: (String streamContents: [:email | + self extractEmailContentFrom: aStream for: email]) \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/extractEmailContentFrom.for..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/extractEmailContentFrom.for..st new file mode 100644 index 00000000..4b840f3b --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/extractEmailContentFrom.for..st @@ -0,0 +1,8 @@ +parsing +extractEmailContentFrom: aStream for: anEmailString + + | octetSize | + + octetSize := self readOctetSizeFrom: aStream for: anEmailString. + self readEmailContentFrom: aStream for: anEmailString bySize: octetSize. + self closeEmailContentFrom: aStream for: anEmailString \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/fetchBodyOffset.st b/packages/IMAPClient-Protocol.package/ICParser.class/class/fetchBodyOffset.st new file mode 100644 index 00000000..5483ad06 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/fetchBodyOffset.st @@ -0,0 +1,4 @@ +constants +fetchBodyOffset + + ^ 2 \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/flags.st b/packages/IMAPClient-Protocol.package/ICParser.class/class/flags.st new file mode 100644 index 00000000..992e7fe7 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/flags.st @@ -0,0 +1,4 @@ +constants +flags + + ^ {'\Seen'. '\Deleted'. '\Flagged'} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/lengthOfEmailPrefix.st b/packages/IMAPClient-Protocol.package/ICParser.class/class/lengthOfEmailPrefix.st new file mode 100644 index 00000000..378cdab2 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/lengthOfEmailPrefix.st @@ -0,0 +1,4 @@ +constants +lengthOfEmailPrefix + + ^ '* ' size \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/lengthOfFetchPrefix.st b/packages/IMAPClient-Protocol.package/ICParser.class/class/lengthOfFetchPrefix.st new file mode 100644 index 00000000..5d0e0d64 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/lengthOfFetchPrefix.st @@ -0,0 +1,4 @@ +constants +lengthOfFetchPrefix + + ^ 'FETCH (' size \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/parameterErrorPosition.st b/packages/IMAPClient-Protocol.package/ICParser.class/class/parameterErrorPosition.st similarity index 73% rename from packages/IMAPClient-Core.package/ICEndPoint.class/class/parameterErrorPosition.st rename to packages/IMAPClient-Protocol.package/ICParser.class/class/parameterErrorPosition.st index 7ea103e8..f9a4da0c 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/class/parameterErrorPosition.st +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/parameterErrorPosition.st @@ -1,4 +1,4 @@ -commands +constants parameterErrorPosition ^ 2 \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/parse.forHeaderChunks.forEmail..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/parse.forHeaderChunks.forEmail..st new file mode 100644 index 00000000..84640a5b --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/parse.forHeaderChunks.forEmail..st @@ -0,0 +1,6 @@ +parsing +parse: aString forHeaderChunks: aHeaderChunksCollection forEmail: anEmail + + (aString includesSubString: 'UID') + ifTrue: [anEmail uniqueID: ((aString subStrings: ' ') second)] + ifFalse: [self continueHeaderChunks: aHeaderChunksCollection withLine: aString] \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFetchBody..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFetchBody..st new file mode 100644 index 00000000..bdc3acdd --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFetchBody..st @@ -0,0 +1,7 @@ +parsing +parseFetchBody: aResponseStringArray + + ^ ((aResponseStringArray + copyFrom: self fetchBodyOffset + to: (aResponseStringArray size - 1)) + joinSeparatedBy: Character cr) \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFetchHeader.withId..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFetchHeader.withId..st new file mode 100644 index 00000000..0e1bc178 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFetchHeader.withId..st @@ -0,0 +1,9 @@ +parsing +parseFetchHeader: aHeaderString withId: aMessageID + + | email | + + email := ICEmail new messageID: aMessageID. + self populate: email withHeaderChunks: (self chop: aHeaderString forEmail: email). + + ^ email \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFetchMailStream..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFetchMailStream..st new file mode 100644 index 00000000..a62543cb --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFetchMailStream..st @@ -0,0 +1,9 @@ +parsing +parseFetchMailStream: aStream + + | emails | + + emails := Dictionary new. + [aStream atEnd] whileFalse: [self continueMailStream: aStream into: emails]. + + ^ emails \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFetchedFlagsAndPopulate..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFetchedFlagsAndPopulate..st new file mode 100644 index 00000000..559369ff --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFetchedFlagsAndPopulate..st @@ -0,0 +1,9 @@ +parsing +parseFetchedFlagsAndPopulate: aResponseStringArray + + | uidPart uid | + + ^ (aResponseStringArray collect: [:line | + uidPart := (line allRegexMatches: 'UID \d*') ifEmpty: [ ^ Dictionary new]. + uid := (uidPart first allRegexMatches: '[\d]+') ifEmpty: [ ^ Dictionary new]. + self buildFlagsAssociationFor: uid from: line]) as: Dictionary \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFolderPathFrom..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFolderPathFrom..st new file mode 100644 index 00000000..449516bd --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseFolderPathFrom..st @@ -0,0 +1,9 @@ +parsing +parseFolderPathFrom: aResponseString + + | splittedResponse | + + splittedResponse := self splitFolderPathResponse: aResponseString. + ^ ICProtocolFolder + newWithPath: (splittedResponse allButFirst joinSeparatedBy: ' ') + delimitedBy: splittedResponse first \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/parseHeaderContentFrom..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseHeaderContentFrom..st new file mode 100644 index 00000000..f9b6866e --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseHeaderContentFrom..st @@ -0,0 +1,7 @@ +parsing +parseHeaderContentFrom: aHeaderChunk + + ^ ((aHeaderChunk joinSeparatedBy: ' ') + copyReplaceFrom: 1 + to: (aHeaderChunk first indexOf: $:) + with: String empty) withoutLeadingBlanks \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/parseHeaderFieldFrom..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseHeaderFieldFrom..st new file mode 100644 index 00000000..d6b66ef5 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseHeaderFieldFrom..st @@ -0,0 +1,9 @@ +parsing +parseHeaderFieldFrom: aHeaderChunk + + | headerField | + + headerField := (aHeaderChunk first subStrings: ' ') first. + (headerField includesSubString: ':') ifTrue: [headerField := headerField allButLast]. + + ^ headerField \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/parseMethods.st b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseMethods.st new file mode 100644 index 00000000..e8e2a17d --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/parseMethods.st @@ -0,0 +1,12 @@ +constants +parseMethods + + ^ Dictionary newFrom: { + 'To' -> [:headerChunk :email | self populate: email withReceiver: headerChunk]. + 'From' -> [:headerChunk :email | self populate: email withSender: headerChunk]. + 'Subject' -> [:headerChunk :email | self populate: email withSubject: headerChunk]. + 'Date' -> [:headerChunk :email | self populate: email withDate: headerChunk]. + 'FLAGS' -> [:headerChunk :email | self populate: email withFlags: headerChunk]. + 'Content-Type' -> [:headerChunk :email | self populate: email withContentType: headerChunk]. + 'Content-Transfer-Encoding' -> [:headerChunk :email | + self populate: email withContentTransferEncoding: headerChunk]} \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withContentTransferEncoding..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withContentTransferEncoding..st new file mode 100644 index 00000000..6eca23ef --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withContentTransferEncoding..st @@ -0,0 +1,4 @@ +parsing +populate: anEmail withContentTransferEncoding: aHeaderChunk + + anEmail contentTransferEncoding: aHeaderChunk \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withContentType..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withContentType..st new file mode 100644 index 00000000..3ea63621 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withContentType..st @@ -0,0 +1,4 @@ +parsing +populate: anEmail withContentType: aHeaderChunk + + anEmail contentType: aHeaderChunk \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withDate..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withDate..st new file mode 100644 index 00000000..00233419 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withDate..st @@ -0,0 +1,4 @@ +parsing +populate: anEmail withDate: aHeaderChunk + + anEmail date: aHeaderChunk \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withFlags..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withFlags..st new file mode 100644 index 00000000..09d9b194 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withFlags..st @@ -0,0 +1,6 @@ +parsing +populate: anEmail withFlags: aHeaderChunk + + anEmail seen: (aHeaderChunk includesSubString: '\Seen'). + anEmail flagged: (aHeaderChunk includesSubString: '\Flagged'). + anEmail deleted: (aHeaderChunk includesSubString: '\Deleted') \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withHeaderChunks..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withHeaderChunks..st new file mode 100644 index 00000000..35d54848 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withHeaderChunks..st @@ -0,0 +1,5 @@ +parsing +populate: anEmail withHeaderChunks: aHeaderChunkCollection + + aHeaderChunkCollection do: [:chunk | + self populate: anEmail withHeadersFrom: chunk] \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withHeadersFrom..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withHeadersFrom..st new file mode 100644 index 00000000..98ef5322 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withHeadersFrom..st @@ -0,0 +1,10 @@ +parsing +populate: anEmail withHeadersFrom: aHeaderChunk + + | headerField headerContent method | + + headerField := self parseHeaderFieldFrom: aHeaderChunk. + headerContent := self parseHeaderContentFrom: aHeaderChunk. + method := (self parseMethods at: headerField ifAbsent: nil). + method ifNil: [Transcript show: 'WARNING: No method for parsing Header field:', headerField; cr] + ifNotNil: [method value: headerContent value: anEmail] \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withReceiver..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withReceiver..st new file mode 100644 index 00000000..05c701a7 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withReceiver..st @@ -0,0 +1,4 @@ +parsing +populate: anEmail withReceiver: aHeaderChunk + + anEmail to: (aHeaderChunk subStrings: ',') asOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withSender..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withSender..st new file mode 100644 index 00000000..f45173cb --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withSender..st @@ -0,0 +1,4 @@ +parsing +populate: anEmail withSender: aHeaderChunk + + anEmail from: aHeaderChunk \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withSubject..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withSubject..st new file mode 100644 index 00000000..41787838 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/populate.withSubject..st @@ -0,0 +1,6 @@ +parsing +populate: anEmail withSubject: aHeaderChunk + + [anEmail subject: aHeaderChunk decodeMimeHeader] + on: Error + do: [self inform: ('A mail in your account has a undecodeable MIME header')] \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/protocolError.st b/packages/IMAPClient-Protocol.package/ICParser.class/class/protocolError.st new file mode 100644 index 00000000..36af375e --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/protocolError.st @@ -0,0 +1,4 @@ +responses +protocolError + + ^ {ICCommand protocolCommandStart . 'BAD'} joinSeparatedBy: ICCommand protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/class/protocolParameterError.st b/packages/IMAPClient-Protocol.package/ICParser.class/class/protocolParameterError.st similarity index 100% rename from packages/IMAPClient-Core.package/ICEndPoint.class/class/protocolParameterError.st rename to packages/IMAPClient-Protocol.package/ICParser.class/class/protocolParameterError.st diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/readEmailContentCharacterFrom.for..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/readEmailContentCharacterFrom.for..st new file mode 100644 index 00000000..2f2ddfd1 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/readEmailContentCharacterFrom.for..st @@ -0,0 +1,9 @@ +parsing +readEmailContentCharacterFrom: aStream for: anEmailString + + | char | + + char := (aStream next) asCharacter. + anEmailString nextPut: char. + (char = Character cr) ifTrue: [^2]. + ^ 1 \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/readEmailContentFrom.for.bySize..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/readEmailContentFrom.for.bySize..st new file mode 100644 index 00000000..012d47c2 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/readEmailContentFrom.for.bySize..st @@ -0,0 +1,8 @@ +parsing +readEmailContentFrom: aStream for: anEmailString bySize: anOctetSize + + | charsLeft | + + charsLeft := anOctetSize. + [charsLeft > 0] whileTrue: [ + charsLeft := charsLeft - (self readEmailContentCharacterFrom: aStream for: anEmailString)]. \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/readMessageIdFromStream..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/readMessageIdFromStream..st new file mode 100644 index 00000000..5217910f --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/readMessageIdFromStream..st @@ -0,0 +1,10 @@ +parsing +readMessageIdFromStream: aStream + + | id | + + aStream next: self lengthOfEmailPrefix. + id := aStream nextDelimited: Character space. + aStream next: self lengthOfFetchPrefix. + + ^ id \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/readOctetSizeFrom.for..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/readOctetSizeFrom.for..st new file mode 100644 index 00000000..3b89190a --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/readOctetSizeFrom.for..st @@ -0,0 +1,5 @@ +parsing +readOctetSizeFrom: aStream for: anEmailString + + anEmailString nextPutAll: (aStream nextDelimited: ${). + ^ (aStream nextDelimited: $}) asNumber \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/responseIsError..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/responseIsError..st new file mode 100644 index 00000000..857a8bdf --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/responseIsError..st @@ -0,0 +1,4 @@ +parsing +responseIsError: aResponseString + + ^ aResponseString beginsWith: self protocolError \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/responseIsParameterError..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/responseIsParameterError..st new file mode 100644 index 00000000..74da3bf0 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/responseIsParameterError..st @@ -0,0 +1,6 @@ +parsing +responseIsParameterError: aResponseString + + ^ self protocolParameterError = + ((aResponseString subStrings: ICCommand protocolBlank) + at: self parameterErrorPosition) \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/class/splitFolderPathResponse..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/splitFolderPathResponse..st new file mode 100644 index 00000000..22fa171c --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/splitFolderPathResponse..st @@ -0,0 +1,5 @@ +parsing +splitFolderPathResponse: aResponseString + + ^ (aResponseString copyReplaceAll: ICCommand protocolQuote with: String empty) + subStrings: ICCommand protocolBlank \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/startsNewHeaderChunk..st b/packages/IMAPClient-Protocol.package/ICParser.class/class/startsNewHeaderChunk..st similarity index 89% rename from packages/IMAPClient-Core.package/ICEndPoint.class/instance/startsNewHeaderChunk..st rename to packages/IMAPClient-Protocol.package/ICParser.class/class/startsNewHeaderChunk..st index b06a049b..78412729 100644 --- a/packages/IMAPClient-Core.package/ICEndPoint.class/instance/startsNewHeaderChunk..st +++ b/packages/IMAPClient-Protocol.package/ICParser.class/class/startsNewHeaderChunk..st @@ -1,4 +1,4 @@ -fetching +parsing startsNewHeaderChunk: aLine ^ (aLine subStrings: ' ') first endsWith: ':' \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICParser.class/methodProperties.json b/packages/IMAPClient-Protocol.package/ICParser.class/methodProperties.json new file mode 100644 index 00000000..a8931b78 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICParser.class/methodProperties.json @@ -0,0 +1,45 @@ +{ + "class" : { + "buildFlagsAssociationFor:from:" : "ok 7/26/2019 17:39", + "chop:forEmail:" : "ok 7/26/2019 16:25", + "closeEmailContentFrom:for:" : "ok 7/26/2019 17:09", + "commandSucceeded" : "pm 7/25/2019 17:26", + "commandSucceeded:" : "pm 7/15/2019 20:40", + "continueHeaderChunks:withLine:" : "ok 7/26/2019 15:44", + "continueMailStream:into:" : "ok 7/26/2019 17:07", + "extractEmailContentFrom:for:" : "ok 7/26/2019 17:25", + "fetchBodyOffset" : "ok 7/26/2019 18:10", + "flags" : "pm 7/12/2019 18:35", + "lengthOfEmailPrefix" : "ok 7/26/2019 16:31", + "lengthOfFetchPrefix" : "mt 7/26/2019 15:44", + "parameterErrorPosition" : "pm 7/23/2019 13:31", + "parse:forHeaderChunks:forEmail:" : "ok 7/26/2019 16:23", + "parseFetchBody:" : "ok 7/26/2019 18:12", + "parseFetchHeader:withId:" : "ok 7/26/2019 18:01", + "parseFetchMailStream:" : "ok 7/26/2019 16:57", + "parseFetchedFlagsAndPopulate:" : "ok 7/26/2019 17:39", + "parseFolderPathFrom:" : "ok 7/26/2019 18:06", + "parseHeaderContentFrom:" : "ok 7/26/2019 17:58", + "parseHeaderFieldFrom:" : "tg 7/26/2019 20:26", + "parseMethods" : "pm 7/25/2019 17:40", + "populate:withContentTransferEncoding:" : "pm 7/25/2019 17:36", + "populate:withContentType:" : "pm 7/25/2019 17:37", + "populate:withDate:" : "pm 7/25/2019 17:37", + "populate:withFlags:" : "pm 7/25/2019 17:37", + "populate:withHeaderChunks:" : "ok 7/26/2019 16:24", + "populate:withHeadersFrom:" : "ok 7/26/2019 17:58", + "populate:withReceiver:" : "pm 7/25/2019 17:37", + "populate:withSender:" : "pm 7/25/2019 17:38", + "populate:withSubject:" : "tg 7/26/2019 21:01", + "protocolError" : "pm 7/25/2019 17:26", + "protocolParameterError" : "pm 7/12/2019 17:22", + "readEmailContentCharacterFrom:for:" : "tg 7/26/2019 21:04", + "readEmailContentFrom:for:bySize:" : "ok 7/26/2019 17:21", + "readMessageIdFromStream:" : "ok 7/26/2019 17:07", + "readOctetSizeFrom:for:" : "ok 7/26/2019 17:24", + "responseIsError:" : "pm 7/25/2019 17:51", + "responseIsParameterError:" : "pm 7/25/2019 17:53", + "splitFolderPathResponse:" : "ok 7/26/2019 18:04", + "startsNewHeaderChunk:" : "pm 7/12/2019 20:07" }, + "instance" : { + } } diff --git a/packages/IMAPClient-Core.package/ICHelper.class/properties.json b/packages/IMAPClient-Protocol.package/ICParser.class/properties.json similarity index 57% rename from packages/IMAPClient-Core.package/ICHelper.class/properties.json rename to packages/IMAPClient-Protocol.package/ICParser.class/properties.json index 973a2de2..1b8aa497 100644 --- a/packages/IMAPClient-Core.package/ICHelper.class/properties.json +++ b/packages/IMAPClient-Protocol.package/ICParser.class/properties.json @@ -1,13 +1,13 @@ { - "category" : "IMAPClient-Core", + "category" : "IMAPClient-Protocol", "classinstvars" : [ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "pm 7/12/2019 20:20", "instvars" : [ ], - "name" : "ICHelper", + "name" : "ICParser", "pools" : [ ], "super" : "Object", diff --git a/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/README.md b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/README.md new file mode 100644 index 00000000..a25aedaf --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/README.md @@ -0,0 +1,5 @@ +An ICProtocolFolder is a wrapper for a folder and contains a folder path and a hierarchy delimiter + +Instance Variables + folderPath: String + hierarchyDelimiter: String diff --git a/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/class/newWithPath.delimitedBy..st b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/class/newWithPath.delimitedBy..st new file mode 100644 index 00000000..4f926e04 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/class/newWithPath.delimitedBy..st @@ -0,0 +1,6 @@ +instance creation +newWithPath: aFolderPathString delimitedBy: aHierarchyDelimiterString + + ^ self new + folderPath: aFolderPathString; + hierarchyDelimiter: aHierarchyDelimiterString \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/folderPath..st b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/folderPath..st new file mode 100644 index 00000000..2510918d --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/folderPath..st @@ -0,0 +1,4 @@ +accessing +folderPath: aFolderPathString + + folderPath := aFolderPathString \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/folderPath.st b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/folderPath.st new file mode 100644 index 00000000..dbfe05e3 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/folderPath.st @@ -0,0 +1,4 @@ +accessing +folderPath + + ^ folderPath \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/hierarchyDelimiter..st b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/hierarchyDelimiter..st new file mode 100644 index 00000000..a91f115e --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/hierarchyDelimiter..st @@ -0,0 +1,4 @@ +accessing +hierarchyDelimiter: aHierarchyDelimiterString + + hierarchyDelimiter := aHierarchyDelimiterString \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/hierarchyDelimiter.st b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/hierarchyDelimiter.st new file mode 100644 index 00000000..e25fa332 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/hierarchyDelimiter.st @@ -0,0 +1,4 @@ +accessing +hierarchyDelimiter + + ^ hierarchyDelimiter \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/pathAsArray.st b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/pathAsArray.st new file mode 100644 index 00000000..b9c90401 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/instance/pathAsArray.st @@ -0,0 +1,4 @@ +accessing +pathAsArray + + ^ self folderPath subStrings: self hierarchyDelimiter \ No newline at end of file diff --git a/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/methodProperties.json b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/methodProperties.json new file mode 100644 index 00000000..35de45f7 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/methodProperties.json @@ -0,0 +1,9 @@ +{ + "class" : { + "newWithPath:delimitedBy:" : "pm 7/12/2019 18:06" }, + "instance" : { + "folderPath" : "pm 7/12/2019 18:04", + "folderPath:" : "pm 7/12/2019 18:05", + "hierarchyDelimiter" : "pm 7/12/2019 18:00", + "hierarchyDelimiter:" : "pm 7/12/2019 18:00", + "pathAsArray" : "pm 7/12/2019 18:07" } } diff --git a/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/properties.json b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/properties.json new file mode 100644 index 00000000..8f36bdc2 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/ICProtocolFolder.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "IMAPClient-Protocol", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "pm 7/12/2019 18:04", + "instvars" : [ + "hierarchyDelimiter", + "folderPath" ], + "name" : "ICProtocolFolder", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/packages/IMAPClient-Protocol.package/monticello.meta/categories.st b/packages/IMAPClient-Protocol.package/monticello.meta/categories.st new file mode 100644 index 00000000..0208e5d7 --- /dev/null +++ b/packages/IMAPClient-Protocol.package/monticello.meta/categories.st @@ -0,0 +1 @@ +SystemOrganization addCategory: #'IMAPClient-Protocol'! diff --git a/packages/IMAPClient-Core.package/ICFetchResponseParser.class/README.md b/packages/IMAPClient-Protocol.package/monticello.meta/initializers.st similarity index 100% rename from packages/IMAPClient-Core.package/ICFetchResponseParser.class/README.md rename to packages/IMAPClient-Protocol.package/monticello.meta/initializers.st diff --git a/packages/IMAPClient-Protocol.package/properties.json b/packages/IMAPClient-Protocol.package/properties.json new file mode 100644 index 00000000..f037444a --- /dev/null +++ b/packages/IMAPClient-Protocol.package/properties.json @@ -0,0 +1,2 @@ +{ + } diff --git a/packages/IMAPClient-Tests.package/.squot-contents b/packages/IMAPClient-Tests.package/.squot-contents index 460ade30..4ad0c330 100644 --- a/packages/IMAPClient-Tests.package/.squot-contents +++ b/packages/IMAPClient-Tests.package/.squot-contents @@ -1,4 +1,4 @@ SquotTrackedObjectMetadata { #objectClassName : #PackageInfo, #serializer : #SquotCypressCodeSerializer -} +} \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/README.md b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/README.md new file mode 100644 index 00000000..225607e2 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/README.md @@ -0,0 +1 @@ +This tests the ICAuthenticationInfo class by asserting IMAP conformity and argument count. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/invalidPassword.st b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/invalidPassword.st new file mode 100644 index 00000000..23c6e7b6 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/invalidPassword.st @@ -0,0 +1,4 @@ +constants +invalidPassword + + ^ 'foo bar " \ ' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/invalidUsername.st b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/invalidUsername.st new file mode 100644 index 00000000..c0433018 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/invalidUsername.st @@ -0,0 +1,4 @@ +constants +invalidUsername + + ^ 'user1 " \ ' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validAccountName.st b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validAccountName.st new file mode 100644 index 00000000..b30d39ad --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validAccountName.st @@ -0,0 +1,4 @@ +constants +validAccountName + + ^ 'validAccountName' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validHost.st b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validHost.st new file mode 100644 index 00000000..fc8e0577 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validHost.st @@ -0,0 +1,4 @@ +constants +validHost + + ^ 'valid.host' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validPassword.st b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validPassword.st new file mode 100644 index 00000000..0a5074b5 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validPassword.st @@ -0,0 +1,4 @@ +constants +validPassword + + ^ 'foo bar' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validPort.st b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validPort.st new file mode 100644 index 00000000..27c2b5fc --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validPort.st @@ -0,0 +1,4 @@ +constants +validPort + + ^ 993 \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validUsername.st b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validUsername.st new file mode 100644 index 00000000..fbd7a0c5 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/class/validUsername.st @@ -0,0 +1,4 @@ +constants +validUsername + + ^ 'user1' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/accountInfo..st b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/accountInfo..st new file mode 100644 index 00000000..4cae37c2 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/accountInfo..st @@ -0,0 +1,3 @@ +accessing +accountInfo: anICAccountInfo + accountInfo := anICAccountInfo \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/accountInfo.st b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/accountInfo.st new file mode 100644 index 00000000..8d15c789 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/accountInfo.st @@ -0,0 +1,3 @@ +accessing +accountInfo + ^ accountInfo \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/setUp.st b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/setUp.st new file mode 100644 index 00000000..1be2152a --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/setUp.st @@ -0,0 +1,11 @@ +running +setUp + + self accountInfo: ((ICAccountInfo new) + accountName: self class validAccountName; + host: self class validHost; + port: self class validPort; + username: self class validUsername; + password: self class validPassword; + ssl: true) + \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/testForArgumentCount.st b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/testForArgumentCount.st new file mode 100644 index 00000000..23aaaa8e --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/testForArgumentCount.st @@ -0,0 +1,5 @@ +testing +testForArgumentCount + + self assert: ['\".*\"' asRegex matches: self accountInfo usernameAsIMAPString]. + self assert: ['\".*\"' asRegex matches: self accountInfo passwordAsIMAPString]. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/testForValidIMAPString.st b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/testForValidIMAPString.st new file mode 100644 index 00000000..83af96db --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/instance/testForValidIMAPString.st @@ -0,0 +1,6 @@ +testing +testForValidIMAPString + + self should: [self accountInfo username: self class invalidUsername] raise: Error. + self should: [self accountInfo password: self class invalidPassword] raise: Error. + \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/methodProperties.json new file mode 100644 index 00000000..175d1dd9 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/methodProperties.json @@ -0,0 +1,15 @@ +{ + "class" : { + "invalidPassword" : "tg 5/9/2019 13:03", + "invalidUsername" : "tg 5/9/2019 13:04", + "validAccountName" : "tg 7/10/2019 19:37", + "validHost" : "tg 7/10/2019 19:37", + "validPassword" : "tg 7/10/2019 19:36", + "validPort" : "tg 7/10/2019 19:38", + "validUsername" : "tg 7/10/2019 19:36" }, + "instance" : { + "accountInfo" : "tg 7/10/2019 18:44", + "accountInfo:" : "tg 7/10/2019 18:44", + "setUp" : "mt 7/26/2019 14:21", + "testForArgumentCount" : "tg 7/10/2019 18:45", + "testForValidIMAPString" : "mt 7/26/2019 14:29" } } diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/properties.json b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/properties.json similarity index 64% rename from packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/properties.json rename to packages/IMAPClient-Tests.package/ICAccountInfoTest.class/properties.json index a0e7fee5..3aab6ebe 100644 --- a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/properties.json +++ b/packages/IMAPClient-Tests.package/ICAccountInfoTest.class/properties.json @@ -4,11 +4,10 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "tg 7/8/2019 15:40", "instvars" : [ - "endpoint", - "parser" ], - "name" : "ICFetchResponseParserTest", + "accountInfo" ], + "name" : "ICAccountInfoTest", "pools" : [ ], "super" : "TestCase", diff --git a/packages/IMAPClient-Tests.package/ICDeployment.class/README.md b/packages/IMAPClient-Tests.package/ICDeployment.class/README.md new file mode 100644 index 00000000..89e19a8c --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICDeployment.class/README.md @@ -0,0 +1,2 @@ +This class supports automatic releases via travis. It is not used for testing but enables automatic sar bulding. +As the build takes longer than 5 seconds a custom timeout is set in setUp. This enforces fast builds as well \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICDeployment.class/class/createMCZfor.in..st b/packages/IMAPClient-Tests.package/ICDeployment.class/class/createMCZfor.in..st new file mode 100644 index 00000000..9856cdf8 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICDeployment.class/class/createMCZfor.in..st @@ -0,0 +1,10 @@ +release building +createMCZfor: aPackageName in: aZIP + +| mczStream workingCopy version | + +mczStream := RWBinaryOrTextStream on: (String new: 10000). +workingCopy := MCWorkingCopy forPackage: (MCPackage new name: aPackageName). +version := workingCopy newVersionWithName: aPackageName message: ('new ', aPackageName , ' release'). +version fileOutOn: mczStream. +(aZIP addString: mczStream contents as: (aPackageName, '.mcz')) desiredCompressionLevel: 0. diff --git a/packages/IMAPClient-Tests.package/ICDeployment.class/class/packagesToDeploy.st b/packages/IMAPClient-Tests.package/ICDeployment.class/class/packagesToDeploy.st new file mode 100644 index 00000000..af4fb710 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICDeployment.class/class/packagesToDeploy.st @@ -0,0 +1,4 @@ +release building +packagesToDeploy + + ^ {'IMAPClient-Core'. 'IMAPClient-UI'. 'IMAPClient-Protocol'} \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICDeployment.class/class/preambleString.st b/packages/IMAPClient-Tests.package/ICDeployment.class/class/preambleString.st new file mode 100644 index 00000000..13291a17 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICDeployment.class/class/preambleString.st @@ -0,0 +1,7 @@ +release building +preambleString + + ^ ((self packagesToDeploy collect: [:packageName | + 'self fileInMonticelloZipVersionNamed: ''', packageName, '.mcz''.']) joinSeparatedBy: String cr), + String cr, + 'ICFolderDialog install.' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICDeployment.class/class/releaseName.st b/packages/IMAPClient-Tests.package/ICDeployment.class/class/releaseName.st new file mode 100644 index 00000000..7d4486aa --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICDeployment.class/class/releaseName.st @@ -0,0 +1,4 @@ +release building +releaseName + + ^ 'IMAPClient-Release' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICDeployment.class/instance/setUp.st b/packages/IMAPClient-Tests.package/ICDeployment.class/instance/setUp.st new file mode 100644 index 00000000..31763cfa --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICDeployment.class/instance/setUp.st @@ -0,0 +1,4 @@ +running +setUp + +self timeout: 60 \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICDeployment.class/instance/testDeployment.st b/packages/IMAPClient-Tests.package/ICDeployment.class/instance/testDeployment.st new file mode 100644 index 00000000..d04ad68c --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICDeployment.class/instance/testDeployment.st @@ -0,0 +1,11 @@ +deployment +testDeployment + +| zip | + +zip := ZipArchive new. + +self class packagesToDeploy do: [:package | self class createMCZfor: package in: zip]. +zip addString: self class preambleString as: 'install/preamble'. + +zip writeToFileNamed: (self class releaseName, '.sar'). \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICDeployment.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICDeployment.class/methodProperties.json new file mode 100644 index 00000000..5e2a8af8 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICDeployment.class/methodProperties.json @@ -0,0 +1,9 @@ +{ + "class" : { + "createMCZfor:in:" : "tg 7/26/2019 10:35", + "packagesToDeploy" : "tg 7/25/2019 21:24", + "preambleString" : "mt 7/26/2019 14:42", + "releaseName" : "tg 7/26/2019 10:31" }, + "instance" : { + "setUp" : "mt 7/26/2019 14:48", + "testDeployment" : "tg 7/26/2019 10:07" } } diff --git a/packages/IMAPClient-Tests.package/ICHelperTest.class/properties.json b/packages/IMAPClient-Tests.package/ICDeployment.class/properties.json similarity index 72% rename from packages/IMAPClient-Tests.package/ICHelperTest.class/properties.json rename to packages/IMAPClient-Tests.package/ICDeployment.class/properties.json index 2c783276..20b611f0 100644 --- a/packages/IMAPClient-Tests.package/ICHelperTest.class/properties.json +++ b/packages/IMAPClient-Tests.package/ICDeployment.class/properties.json @@ -4,10 +4,10 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "tg 7/26/2019 10:33", "instvars" : [ ], - "name" : "ICHelperTest", + "name" : "ICDeployment", "pools" : [ ], "super" : "TestCase", diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/README.md b/packages/IMAPClient-Tests.package/ICEmailTest.class/README.md index e69de29b..681cc956 100644 --- a/packages/IMAPClient-Tests.package/ICEmailTest.class/README.md +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/README.md @@ -0,0 +1 @@ +This conducts testing of basic formatting, header and body accessing methods of the ICEmail class. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/class/emailDate.st b/packages/IMAPClient-Tests.package/ICEmailTest.class/class/emailDate.st new file mode 100644 index 00000000..78fd1b4a --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/class/emailDate.st @@ -0,0 +1,4 @@ +constants +emailDate + + ^ DateAndTime year: 2016 month: 6 day: 10 hour: 10 minute: 51 second: 42 \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/class/expected1980Seconds.st b/packages/IMAPClient-Tests.package/ICEmailTest.class/class/expected1980Seconds.st new file mode 100644 index 00000000..61e4d768 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/class/expected1980Seconds.st @@ -0,0 +1,4 @@ +constants +expected1980Seconds + + ^ self emailDate asSeconds - (DateAndTime year: 1980 day: 1) asSeconds \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/class/expectedParsedDate.st b/packages/IMAPClient-Tests.package/ICEmailTest.class/class/expectedParsedMESZDate.st similarity index 57% rename from packages/IMAPClient-Tests.package/ICEmailTest.class/class/expectedParsedDate.st rename to packages/IMAPClient-Tests.package/ICEmailTest.class/class/expectedParsedMESZDate.st index c31f494a..ac3794e7 100644 --- a/packages/IMAPClient-Tests.package/ICEmailTest.class/class/expectedParsedDate.st +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/class/expectedParsedMESZDate.st @@ -1,4 +1,4 @@ constants -expectedParsedDate +expectedParsedMESZDate ^ '10.06.2016 12:51' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/class/expectedParsedUTCDate.st b/packages/IMAPClient-Tests.package/ICEmailTest.class/class/expectedParsedUTCDate.st new file mode 100644 index 00000000..65fefbac --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/class/expectedParsedUTCDate.st @@ -0,0 +1,4 @@ +constants +expectedParsedUTCDate + + ^ '10.06.2016 10:51' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/class/expectedSqueakEpochSeconds.st b/packages/IMAPClient-Tests.package/ICEmailTest.class/class/expectedSqueakEpochSeconds.st new file mode 100644 index 00000000..b61a1111 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/class/expectedSqueakEpochSeconds.st @@ -0,0 +1,4 @@ +constants +expectedSqueakEpochSeconds + + ^ self emailDate asSeconds \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/email..st b/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/email..st index db98607c..50d1374c 100644 --- a/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/email..st +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/email..st @@ -1,4 +1,4 @@ accessing -email: anObject +email: anICEmail - email := anObject \ No newline at end of file + email := anICEmail \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/setUp.st b/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/setUp.st index 5cacbad6..f8d21ce0 100644 --- a/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/setUp.st +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/setUp.st @@ -1,8 +1,7 @@ -accessing +running setUp - self - email: (ICEmail new + self email: (ICEmail new body: 'body text'; subject: 'subject text'; from: 'sender'; diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testDateFormatted.st b/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testDateFormatted.st new file mode 100644 index 00000000..5f549013 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testDateFormatted.st @@ -0,0 +1,16 @@ +accessing +testDateFormatted + + | previousOffset | + + previousOffset := DateAndTime localOffset. + + "use UTC (Coordinated Universal Time)" + DateAndTime localOffset: (Duration fromString: '0:00:00:00'). + self assert: self email dateFormatted equals: self class expectedParsedUTCDate. + + "use Mitteleuropäische Sommerzeit" + DateAndTime localOffset: (Duration fromString: '0:02:00:00'). + self assert: self email dateFormatted equals: self class expectedParsedMESZDate. + + DateAndTime localOffset: previousOffset \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testDateInSecondsSince1980.st b/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testDateInSecondsSince1980.st new file mode 100644 index 00000000..5046c5d2 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testDateInSecondsSince1980.st @@ -0,0 +1,4 @@ +accessing +testDateInSecondsSince1980 + + self assert: self email dateInSecondsSince1980 equals: self class expected1980Seconds. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testDateInSecondsSinceSqueakEpoch.st b/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testDateInSecondsSinceSqueakEpoch.st new file mode 100644 index 00000000..d8585850 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testDateInSecondsSinceSqueakEpoch.st @@ -0,0 +1,4 @@ +accessing +testDateInSecondsSinceSqueakEpoch + + self assert: self email dateInSecondsSinceSqueakEpoch equals: self class expectedSqueakEpochSeconds. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testGetDateFormatted.st b/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testGetDateFormatted.st deleted file mode 100644 index 6b87e669..00000000 --- a/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testGetDateFormatted.st +++ /dev/null @@ -1,13 +0,0 @@ -accessing -testGetDateFormatted - - | previousOffset | - - previousOffset := DateAndTime localOffset. - - "use 'Mitteleuropäische Sommerzeit' " - DateAndTime localOffset: (Duration fromString: '0:02:00:00'). - - self assert: self email getDateFormatted equals: self class expectedParsedDate. - - DateAndTime localOffset: previousOffset \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testRetrieveBody.st b/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testRetrieveBody.st index f9841a77..8fd37951 100644 --- a/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testRetrieveBody.st +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/instance/testRetrieveBody.st @@ -4,13 +4,11 @@ testRetrieveBody | folder endpoint | endpoint := ICMockEndpoint new. - - "ICEmails are retrieving their body from the endpoint." endpoint mailBody: self email body. folder := ICFolder new. folder endpoint: endpoint; - name: 'dummy'; + folderName: 'dummy'; parent: nil. self email folder: folder. diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICEmailTest.class/methodProperties.json index 164320b3..a2fd7c00 100644 --- a/packages/IMAPClient-Tests.package/ICEmailTest.class/methodProperties.json +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/methodProperties.json @@ -1,14 +1,20 @@ { "class" : { + "emailDate" : "tg 7/19/2019 12:40", + "expected1980Seconds" : "tg 7/19/2019 09:33", "expectedBody" : "DH 6/9/2018 15:33", "expectedMinimalHeaderAsString" : "DH 6/9/2018 15:32", - "expectedParsedDate" : "DH 6/6/2018 19:52", + "expectedParsedMESZDate" : "tg 7/19/2019 10:36", + "expectedParsedUTCDate" : "tg 7/19/2019 10:36", + "expectedSqueakEpochSeconds" : "tg 7/19/2019 09:29", "expectedStringRepresentation" : "DH 6/9/2018 15:23" }, "instance" : { "email" : "C.G. 7/25/2018 17:52", - "email:" : "C.G. 7/25/2018 17:52", - "setUp" : "C.G. 7/25/2018 17:53", + "email:" : "pm 6/9/2019 17:16", + "setUp" : "mt 7/26/2019 14:28", "testAsString" : "mw 5/11/2018 12:06", - "testGetDateFormatted" : "C.G. 7/25/2018 17:53", + "testDateFormatted" : "tg 7/19/2019 08:36", + "testDateInSecondsSince1980" : "tg 7/19/2019 09:26", + "testDateInSecondsSinceSqueakEpoch" : "tg 7/19/2019 09:27", "testMinimalHeaderAsString" : "C.G. 7/25/2018 17:53", - "testRetrieveBody" : "DH 7/9/2018 15:39" } } + "testRetrieveBody" : "mt 7/26/2019 14:41" } } diff --git a/packages/IMAPClient-Tests.package/ICEmailTest.class/properties.json b/packages/IMAPClient-Tests.package/ICEmailTest.class/properties.json index a84b02fa..2a9272d1 100644 --- a/packages/IMAPClient-Tests.package/ICEmailTest.class/properties.json +++ b/packages/IMAPClient-Tests.package/ICEmailTest.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "tg 7/9/2019 14:42", "instvars" : [ "email" ], "name" : "ICEmailTest", diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/README.md b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/README.md index e69de29b..9578197a 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/README.md +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/README.md @@ -0,0 +1 @@ +This tests the ICEndPoint-Authentification part by performing a successfull and a failing mock login \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/invalidPasswordAccountInfo.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/invalidPasswordAccountInfo.st new file mode 100644 index 00000000..72a3656f --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/invalidPasswordAccountInfo.st @@ -0,0 +1,10 @@ +constants +invalidPasswordAccountInfo + + ^ ICAccountInfo new + accountName: self validAccountName; + host: self validHost; + port: self validPort; + username: self validUsername; + password: self invalidPassword; + ssl: true \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/invalidUsernameAccountInfo.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/invalidUsernameAccountInfo.st new file mode 100644 index 00000000..0982b780 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/invalidUsernameAccountInfo.st @@ -0,0 +1,10 @@ +constants +invalidUsernameAccountInfo + + ^ ICAccountInfo new + accountName: self validAccountName; + host: self validHost; + port: self validPort; + username: self invalidUsername; + password: self validPassword; + ssl: true \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validAccountInfo.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validAccountInfo.st new file mode 100644 index 00000000..d97e6e76 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validAccountInfo.st @@ -0,0 +1,10 @@ +constants +validAccountInfo + + ^ ICAccountInfo new + accountName: self validAccountName; + host: self validHost; + port: self validPort; + username: self validUsername; + password: self validPassword; + ssl: true \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validAccountName.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validAccountName.st new file mode 100644 index 00000000..b30d39ad --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validAccountName.st @@ -0,0 +1,4 @@ +constants +validAccountName + + ^ 'validAccountName' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validHost.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validHost.st new file mode 100644 index 00000000..fc8e0577 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validHost.st @@ -0,0 +1,4 @@ +constants +validHost + + ^ 'valid.host' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validPassword.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validPassword.st index 1461b406..b187fa25 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validPassword.st +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validPassword.st @@ -1,4 +1,4 @@ constants validPassword - ^ '"123456"' \ No newline at end of file + ^ '123456' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validPort.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validPort.st new file mode 100644 index 00000000..27c2b5fc --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validPort.st @@ -0,0 +1,4 @@ +constants +validPort + + ^ 993 \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validUsername.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validUsername.st index 84a5afb9..20f446e2 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validUsername.st +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/class/validUsername.st @@ -1,4 +1,4 @@ constants validUsername - ^ '"user"' \ No newline at end of file + ^ 'user' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/endPoint..st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/endPoint..st index 5a97cc5e..9d4906a6 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/endPoint..st +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/endPoint..st @@ -1,4 +1,4 @@ accessing -endPoint: anObject +endPoint: anICEndPoint - endPoint := anObject \ No newline at end of file + endPoint := anICEndPoint \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/setUp.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/setUp.st index 0b2ef19b..8aba068f 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/setUp.st +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/setUp.st @@ -1,11 +1,11 @@ -setup +running setUp self endPoint: ICEndPoint new. self endPoint stream: ICMockSocketStream new. self endPoint stream connected: true. - self - endPoint stream server + + self endPoint stream server validUsername: self class validUsername; validPassword: self class validPassword; responses: self endPoint stream server notAuthenticatedResponses \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/tearDown.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/tearDown.st index b3dbdaa0..6b57022e 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/tearDown.st +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/tearDown.st @@ -1,4 +1,4 @@ -setup +running tearDown self endPoint close \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLogin.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLogin.st index 78ca270d..b9636c60 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLogin.st +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLogin.st @@ -1,4 +1,5 @@ login testLogin - - self assert: (self endPoint login: self class validUsername using: self class validPassword) \ No newline at end of file + + self endPoint accountInfo: self class validAccountInfo. + self assert: (self endPoint login) \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLoginWithInvalidPassword.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLoginWithInvalidPassword.st new file mode 100644 index 00000000..af09d69b --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLoginWithInvalidPassword.st @@ -0,0 +1,5 @@ +login +testLoginWithInvalidPassword + + [self endPoint accountInfo: self class invalidPasswordAccountInfo. + self deny: self endPoint login] valueSuppressingAllMessages \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLoginWithInvalidUsername.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLoginWithInvalidUsername.st new file mode 100644 index 00000000..6b557dde --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLoginWithInvalidUsername.st @@ -0,0 +1,5 @@ +login +testLoginWithInvalidUsername + + [self endPoint accountInfo: self class invalidUsernameAccountInfo. + self deny: self endPoint login] valueSuppressingAllMessages \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLoginWithWrongPassword.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLoginWithWrongPassword.st deleted file mode 100644 index 4a880f92..00000000 --- a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLoginWithWrongPassword.st +++ /dev/null @@ -1,7 +0,0 @@ -login -testLoginWithWrongPassword - - [self endPoint authenticationInfo - username: self class validUsername; - password: self class invalidPassword. - self deny: self endPoint login] valueSuppressingAllMessages \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLoginWithWrongUsername.st b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLoginWithWrongUsername.st deleted file mode 100644 index 140af1ea..00000000 --- a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/instance/testLoginWithWrongUsername.st +++ /dev/null @@ -1,7 +0,0 @@ -login -testLoginWithWrongUsername - - [self endPoint authenticationInfo - username: self class invalidUsername; - password: self class validPassword. - self deny: self endPoint login] valueSuppressingAllMessages \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/methodProperties.json index 87488776..3bf2cd24 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/methodProperties.json +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/methodProperties.json @@ -1,14 +1,20 @@ { "class" : { "invalidPassword" : "jwe 6/15/2016 16:03", + "invalidPasswordAccountInfo" : "mt 7/26/2019 14:22", "invalidUsername" : "jwe 6/15/2016 16:03", - "validPassword" : "jwe 6/15/2016 16:03", - "validUsername" : "jwe 6/15/2016 16:03" }, + "invalidUsernameAccountInfo" : "mt 7/26/2019 14:23", + "validAccountInfo" : "mt 7/26/2019 14:23", + "validAccountName" : "tg 7/10/2019 19:43", + "validHost" : "tg 7/10/2019 19:43", + "validPassword" : "tg 4/30/2019 12:22", + "validPort" : "tg 7/10/2019 19:43", + "validUsername" : "tg 4/30/2019 12:22" }, "instance" : { "endPoint" : "AR 5/31/2016 21:33", - "endPoint:" : "AR 5/31/2016 21:33", - "setUp" : "C.G. 7/25/2018 17:53", + "endPoint:" : "pm 6/9/2019 17:16", + "setUp" : "tg 7/10/2019 19:16", "tearDown" : "js 6/7/2016 09:40", - "testLogin" : "jwe 7/12/2016 10:18", - "testLoginWithWrongPassword" : "C.G. 7/25/2018 12:54", - "testLoginWithWrongUsername" : "C.G. 7/25/2018 12:55" } } + "testLogin" : "tg 7/10/2019 18:58", + "testLoginWithInvalidPassword" : "tg 7/10/2019 18:59", + "testLoginWithInvalidUsername" : "tg 7/10/2019 18:54" } } diff --git a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/properties.json b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/properties.json index 2d754c35..bcd63ef5 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/properties.json +++ b/packages/IMAPClient-Tests.package/ICEndPointAuthentificationTest.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "tg 7/8/2019 15:42", "instvars" : [ "endPoint" ], "name" : "ICEndPointAuthentificationTest", diff --git a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/README.md b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/README.md index e69de29b..05d85f88 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/README.md +++ b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/README.md @@ -0,0 +1 @@ +This tests the ICEndPoint-Command part by performing various protocol calls. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/endPoint..st b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/endPoint..st index 5a97cc5e..9d4906a6 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/endPoint..st +++ b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/endPoint..st @@ -1,4 +1,4 @@ accessing -endPoint: anObject +endPoint: anICEndPoint - endPoint := anObject \ No newline at end of file + endPoint := anICEndPoint \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/rootFolder..st b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/rootFolder..st index 39b879e0..b5caae36 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/rootFolder..st +++ b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/rootFolder..st @@ -1,4 +1,4 @@ accessing -rootFolder: anObject +rootFolder: anICFolder - rootFolder := anObject \ No newline at end of file + rootFolder := anICFolder \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/setUp.st b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/setUp.st index a3d5ceab..a4ad1bdd 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/setUp.st +++ b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/setUp.st @@ -1,4 +1,4 @@ -setup +running setUp | subfolder | @@ -19,8 +19,7 @@ setUp hierarchyDelimiter: '\'. self endPoint stream connected: true. - "self endPoint stream server responses: self endPoint stream server selectedResponses." - "Transcript show: (String cr, 'last response:', String cr, (self endPoint stream server selectedResponses at: - '. FETCH 45 (body[HEADER.FIELDS (from to subject date)])') , String cr, String cr)." - self endPoint lastResponse: (self endPoint stream server selectedResponses at: '. FETCH 45 (body[HEADER.FIELDS (from to subject date)])') \ No newline at end of file + self endPoint lastResponse: (self endPoint + stream server selectedResponses + at: '. FETCH 45 (body[HEADER.FIELDS (from to subject date)])') \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/tearDown.st b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/tearDown.st new file mode 100644 index 00000000..a836cb36 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/tearDown.st @@ -0,0 +1,14 @@ +running +tearDown + + | mailAPath mailBPath path folderName | + + folderName := self endPoint rootFolderName. + + path := 'Maildir', FileDirectory slash, folderName, FileDirectory slash, 'inbox'. + mailAPath := FileDirectory default fullPathFor: path , FileDirectory slash, '3' . + mailBPath := FileDirectory default fullPathFor: path , FileDirectory slash, '4' . + + FileDirectory default + deleteFileNamed: mailAPath; + deleteFileNamed: mailBPath \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFetchMailsBeginningAtWithFoundMails.st b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFetchMailsBeginningAtWithFoundMails.st index 0c731f64..d12de6e9 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFetchMailsBeginningAtWithFoundMails.st +++ b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFetchMailsBeginningAtWithFoundMails.st @@ -1,13 +1,10 @@ fetch testFetchMailsBeginningAtWithFoundMails - "the uids of the mock server are 3 4 42 43 44 45 46 - so fetchMailsBeginningAt:42 with 2 should return mails 3+4" - | path emailObjects mailAPath mailBPath folderName | emailObjects := self endPoint fetchMailsBeginningAt: 42 number: 2. - folderName := ICHelper getHashNameForAccount: (self endPoint serverInfo host) and: (self endPoint authenticationInfo username). + folderName := self endPoint rootFolderName. path := 'Maildir', FileDirectory slash, folderName, FileDirectory slash, 'inbox'. mailAPath := FileDirectory default fullPathFor: path , FileDirectory slash, '3' . mailBPath := FileDirectory default fullPathFor: path , FileDirectory slash, '4' . @@ -19,7 +16,6 @@ testFetchMailsBeginningAtWithFoundMails assert: (FileDirectory default fileExists: (mailAPath)); assert: (FileDirectory default fileExists: (mailBPath)). - "Delete generated files" FileDirectory default deleteFileNamed: mailAPath; deleteFileNamed: mailBPath. diff --git a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFetchMailsBeginningAtWithoutFoundMails.st b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFetchMailsBeginningAtWithoutFoundMails.st index c493e4bc..c1606094 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFetchMailsBeginningAtWithoutFoundMails.st +++ b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFetchMailsBeginningAtWithoutFoundMails.st @@ -1,10 +1,4 @@ fetch testFetchMailsBeginningAtWithoutFoundMails - "the uids of the mock server are 3 4 42 43 44 45 46 - so fetchMailsBeginningAt:3 with 5 should return no mails" - - | result | - - result := self endPoint fetchMailsBeginningAt: 3 number: 5. - self assert: result isEmpty \ No newline at end of file + self assert: (self endPoint fetchMailsBeginningAt: 3 number: 5) isEmpty \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFillMessageBody.st b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFillMessageBody.st index 93e03f09..672e1840 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFillMessageBody.st +++ b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFillMessageBody.st @@ -5,7 +5,7 @@ testFillMessageBody email := ICEmail new. email messageID: 42. - email uid: 42. + email uniqueID: 42. self endPoint fillBodyFor: email. self assert: (email body) equals: self class expectedFetchBody \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFillMessageBodyWithMultilineBody.st b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFillMessageBodyWithMultilineBody.st index d1ba71c1..1098d85d 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFillMessageBodyWithMultilineBody.st +++ b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testFillMessageBodyWithMultilineBody.st @@ -5,6 +5,6 @@ testFillMessageBodyWithMultilineBody email := ICEmail new. email messageID: 43. - email uid: 43. + email uniqueID: 43. self endPoint fillBodyFor: email. self assert: (email body) equals: self class expectedFetchMultilineBody \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testRetrieveFlagsOnly.st b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testRetrieveFlagsOnly.st index a509a1d3..9e042ecc 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testRetrieveFlagsOnly.st +++ b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/instance/testRetrieveFlagsOnly.st @@ -6,15 +6,15 @@ testRetrieveFlagsOnly "Load emails from server and store them locally" "To test the functionality I need ICEMails, which are already present in storage, - so I can check whether the flags are updated" + so I can check whether the flags are updated" emailObjects := self endPoint maildirDiffFetchHeadersFrom: '3' to: '4'. mailA := emailObjects first. mailB := emailObjects second. folder := emailObjects first folder. - folder emails addAll: emailObjects. + folder addMails: emailObjects. - folderName := ICHelper getHashNameForAccount: (self endPoint serverInfo host) and: (self endPoint authenticationInfo username). + folderName := self endPoint rootFolderName. path := 'Maildir', FileDirectory slash, folderName, FileDirectory slash, 'inbox'. mailAPath := FileDirectory default fullPathFor: path , FileDirectory slash, '3' . mailBPath := FileDirectory default fullPathFor: path , FileDirectory slash, '4' . diff --git a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/methodProperties.json index 64804330..537c315c 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/methodProperties.json +++ b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/methodProperties.json @@ -19,21 +19,22 @@ "serverPort" : "jwe 6/21/2016 10:11" }, "instance" : { "endPoint" : "js 6/14/2016 10:46", - "endPoint:" : "js 6/14/2016 10:46", + "endPoint:" : "pm 6/9/2019 17:17", "messageID" : "AR 6/13/2016 18:45", "messageIDWithDifferentOrder" : "al 6/28/2016 10:25", "multilineBodyMessageID" : "AR 6/15/2016 12:01", "multilineReceiverMessageID" : "al 6/28/2016 10:46", "multilineSenderMessageID" : "al 6/28/2016 10:38", "rootFolder" : "C.G. 7/25/2018 17:54", - "rootFolder:" : "C.G. 7/25/2018 17:54", - "setUp" : "C.G. 7/25/2018 17:54", - "testFetchMailsBeginningAtWithFoundMails" : "C.G. 7/25/2018 17:55", - "testFetchMailsBeginningAtWithoutFoundMails" : "C.G. 7/25/2018 17:55", - "testFillMessageBody" : "C.G. 7/25/2018 17:55", - "testFillMessageBodyWithMultilineBody" : "C.G. 7/25/2018 17:56", + "rootFolder:" : "pm 6/9/2019 17:17", + "setUp" : "tg 7/26/2019 20:58", + "tearDown" : "ok 7/25/2019 18:39", + "testFetchMailsBeginningAtWithFoundMails" : "mt 7/26/2019 14:46", + "testFetchMailsBeginningAtWithoutFoundMails" : "mt 7/26/2019 14:46", + "testFillMessageBody" : "pm 6/2/2019 15:58", + "testFillMessageBodyWithMultilineBody" : "pm 6/2/2019 15:58", "testListAllFolders" : "DH 4/27/2018 02:35", "testLogout" : "jwe 6/21/2016 10:15", "testPing" : "jwe 6/21/2016 10:15", - "testRetrieveFlagsOnly" : "C.G. 7/25/2018 17:59", + "testRetrieveFlagsOnly" : "tg 7/26/2019 22:01", "testSelectInbox" : "C.G. 7/25/2018 18:00" } } diff --git a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/properties.json b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/properties.json index 14ccee51..b3b2c2ac 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/properties.json +++ b/packages/IMAPClient-Tests.package/ICEndPointCommandTest.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "tg 7/8/2019 15:43", "instvars" : [ "endPoint", "rootFolder" ], diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/README.md b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/README.md new file mode 100644 index 00000000..5510dd06 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/README.md @@ -0,0 +1 @@ +This tests the ICEndPoint-ConnectionConfigurations part (aka the storage) by modifying the data and assuring it cant be modifyed otherwise. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/class/defaultConfigurationDictionary.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/class/defaultConfigurationDictionary.st new file mode 100644 index 00000000..5b2093ee --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/class/defaultConfigurationDictionary.st @@ -0,0 +1,10 @@ +constants +defaultConfigurationDictionary + + ^ Dictionary newFrom: { + 'accountName' -> 'accountname'. + 'address' -> 'imap.test.de'. + 'port' -> 42. + 'username' -> 'test@test.test'. + 'ssl' -> true. + } \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/class/defaultInvalidKeysConfigurationDictionary.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/class/defaultInvalidKeysConfigurationDictionary.st new file mode 100644 index 00000000..be79aed4 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/class/defaultInvalidKeysConfigurationDictionary.st @@ -0,0 +1,9 @@ +constants +defaultInvalidKeysConfigurationDictionary + + ^ Dictionary newFrom: { + 'address' -> 'imap.test.de'. + 'bort' -> 42. + 'username' -> 'test@test.test'. + 'ssl' -> true. + } \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/class/invalidDataDictionaryErrorMessage.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/class/invalidDataDictionaryErrorMessage.st new file mode 100644 index 00000000..ed670b9a --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/class/invalidDataDictionaryErrorMessage.st @@ -0,0 +1,4 @@ +constants +invalidDataDictionaryErrorMessage + + ^ 'Not a valid dataDictionary' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/previousConnectionConfigurations..st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/previousConnectionConfigurations..st new file mode 100644 index 00000000..36870382 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/previousConnectionConfigurations..st @@ -0,0 +1,4 @@ +accessing +previousConnectionConfigurations: aConfigurationsCollection + + previousConnectionConfigurations := aConfigurationsCollection \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/previousConnectionConfigurations.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/previousConnectionConfigurations.st new file mode 100644 index 00000000..6ad73590 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/previousConnectionConfigurations.st @@ -0,0 +1,4 @@ +accessing +previousConnectionConfigurations + + ^ previousConnectionConfigurations \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/setUp.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/setUp.st new file mode 100644 index 00000000..e4913d82 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/setUp.st @@ -0,0 +1,7 @@ +running +setUp + + self previousConnectionConfigurations: ICEndPoint connectionConfigurations. + ICEndPoint connectionConfigurations: nil. + + \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/tearDown.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/tearDown.st new file mode 100644 index 00000000..6f3c39df --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/tearDown.st @@ -0,0 +1,6 @@ +running +tearDown + + ICEndPoint connectionConfigurations: self previousConnectionConfigurations. + + \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testAddConfiguration.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testAddConfiguration.st new file mode 100644 index 00000000..987b131c --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testAddConfiguration.st @@ -0,0 +1,6 @@ +testing +testAddConfiguration + + ICEndPoint addConfiguration: self class defaultConfigurationDictionary. + self assert: ICEndPoint connectionConfigurations equals: + { self class defaultConfigurationDictionary } asOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testCheckValidConfiguration.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testCheckValidConfiguration.st new file mode 100644 index 00000000..c274817b --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testCheckValidConfiguration.st @@ -0,0 +1,7 @@ +testing +testCheckValidConfiguration + + self assert: (ICEndPoint checkValidConfiguration: Dictionary new) not. + self assert: (ICEndPoint checkValidConfiguration: self class defaultInvalidKeysConfigurationDictionary) not. + + self assert: (ICEndPoint checkValidConfiguration: self class defaultConfigurationDictionary) \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testClearConfigurations.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testClearConfigurations.st new file mode 100644 index 00000000..f2bf518c --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testClearConfigurations.st @@ -0,0 +1,6 @@ +testing +testClearConfigurations + + ICEndPoint addConfiguration: self class defaultConfigurationDictionary. + ICEndPoint clearConfigurations. + self assert: ICEndPoint connectionConfigurations equals: OrderedCollection new \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testLazyInit.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testLazyInit.st new file mode 100644 index 00000000..5f831808 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testLazyInit.st @@ -0,0 +1,4 @@ +testing +testLazyInit + + self assert: ICEndPoint connectionConfigurations equals: OrderedCollection new \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testReferenceDeleteSecurity.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testReferenceDeleteSecurity.st new file mode 100644 index 00000000..ef399e58 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testReferenceDeleteSecurity.st @@ -0,0 +1,10 @@ +testing +testReferenceDeleteSecurity + + |reference| + ICEndPoint addConfiguration: self class defaultConfigurationDictionary. + reference := ICEndPoint connectionConfigurations. + reference remove: self class defaultConfigurationDictionary. + + self assert: ICEndPoint connectionConfigurations equals: + {self class defaultConfigurationDictionary} asOrderedCollection. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testRejectInvaildConfiguration.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testRejectInvaildConfiguration.st new file mode 100644 index 00000000..e5abe11e --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testRejectInvaildConfiguration.st @@ -0,0 +1,11 @@ +testing +testRejectInvaildConfiguration + + self should: [ICEndPoint addConfiguration: Dictionary new] + raise: Error + description: self class invalidDataDictionaryErrorMessage. + self should: [ICEndPoint addConfiguration: + self class defaultInvalidKeysConfigurationDictionary ] + raise: Error + description: self class invalidDataDictionaryErrorMessage + \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testRemoveConfiguration.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testRemoveConfiguration.st new file mode 100644 index 00000000..2860527e --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/instance/testRemoveConfiguration.st @@ -0,0 +1,6 @@ +testing +testRemoveConfiguration + + ICEndPoint addConfiguration: self class defaultConfigurationDictionary. + ICEndPoint removeConfiguration: self class defaultConfigurationDictionary. + self assert: ICEndPoint connectionConfigurations equals: OrderedCollection new \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/methodProperties.json new file mode 100644 index 00000000..450b0f24 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/methodProperties.json @@ -0,0 +1,17 @@ +{ + "class" : { + "defaultConfigurationDictionary" : "tg 7/19/2019 10:02", + "defaultInvalidKeysConfigurationDictionary" : "tg 7/19/2019 10:02", + "invalidDataDictionaryErrorMessage" : "pm 6/19/2019 14:26" }, + "instance" : { + "previousConnectionConfigurations" : "pm 6/11/2019 19:44", + "previousConnectionConfigurations:" : "pm 6/11/2019 19:45", + "setUp" : "pm 6/19/2019 13:19", + "tearDown" : "pm 6/19/2019 13:19", + "testAddConfiguration" : "pm 6/19/2019 14:46", + "testCheckValidConfiguration" : "pm 6/19/2019 15:03", + "testClearConfigurations" : "pm 6/19/2019 14:47", + "testLazyInit" : "pm 6/19/2019 14:47", + "testReferenceDeleteSecurity" : "tg 7/26/2019 20:59", + "testRejectInvaildConfiguration" : "tg 7/26/2019 21:00", + "testRemoveConfiguration" : "pm 6/19/2019 14:47" } } diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/properties.json b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/properties.json new file mode 100644 index 00000000..73ff6e0f --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionConfigurationsTest.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "IMAPClient-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "tg 7/8/2019 15:43", + "instvars" : [ + "previousConnectionConfigurations" ], + "name" : "ICEndPointConnectionConfigurationsTest", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/README.md b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/README.md index e69de29b..0b10f7a5 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/README.md +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/README.md @@ -0,0 +1 @@ +This tests the ICEndPoint-Connection part by creating a successfull connection and a failing one. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/invalidHost.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/invalidHost.st index afbf8181..01b1beed 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/invalidHost.st +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/invalidHost.st @@ -1,4 +1,4 @@ constants invalidHost - ^ 'example.de' \ No newline at end of file + ^ 'example' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/invalidHostAccountInfo.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/invalidHostAccountInfo.st new file mode 100644 index 00000000..9454b403 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/invalidHostAccountInfo.st @@ -0,0 +1,10 @@ +constants +invalidHostAccountInfo + +^ ICAccountInfo new + accountName: self validAccountName; + host: self invalidHost; + port: self validPort; + username: self validUsername; + password: self validPassword; + ssl: true \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/invalidPortAccountInfo.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/invalidPortAccountInfo.st new file mode 100644 index 00000000..8005517f --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/invalidPortAccountInfo.st @@ -0,0 +1,10 @@ +constants +invalidPortAccountInfo + + ^ ICAccountInfo new + accountName: self validAccountName; + host: self validHost; + port: self invalidPort; + username: self validUsername; + password: self validPassword; + ssl: true \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/validAccountInfo.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/validAccountInfo.st new file mode 100644 index 00000000..d97e6e76 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/validAccountInfo.st @@ -0,0 +1,10 @@ +constants +validAccountInfo + + ^ ICAccountInfo new + accountName: self validAccountName; + host: self validHost; + port: self validPort; + username: self validUsername; + password: self validPassword; + ssl: true \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/validAccountName.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/validAccountName.st new file mode 100644 index 00000000..b30d39ad --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/validAccountName.st @@ -0,0 +1,4 @@ +constants +validAccountName + + ^ 'validAccountName' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/validPassword.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/validPassword.st new file mode 100644 index 00000000..35a09155 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/validPassword.st @@ -0,0 +1,4 @@ +constants +validPassword + + ^ 'validPassword' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/validUsername.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/validUsername.st new file mode 100644 index 00000000..a9add4d3 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/class/validUsername.st @@ -0,0 +1,4 @@ +constants +validUsername + + ^ 'validUserName' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/endPoint..st b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/endPoint..st index 5a97cc5e..9d4906a6 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/endPoint..st +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/endPoint..st @@ -1,4 +1,4 @@ accessing -endPoint: anObject +endPoint: anICEndPoint - endPoint := anObject \ No newline at end of file + endPoint := anICEndPoint \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/setUp.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/setUp.st index 61ee330a..4ee8418f 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/setUp.st +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/setUp.st @@ -1,4 +1,4 @@ -setup +running setUp self endPoint: ICEndPoint new. diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/tearDown.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/tearDown.st index b3dbdaa0..6b57022e 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/tearDown.st +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/tearDown.st @@ -1,4 +1,4 @@ -setup +running tearDown self endPoint close \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/testConnectToOn.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/testConnectToOn.st index 2f49b9f3..53791717 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/testConnectToOn.st +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/testConnectToOn.st @@ -1,6 +1,6 @@ connectOn testConnectToOn - self - shouldnt: [endPoint connectTo: self class validHost on: self class validPort with: ICMockSocketStream] + self endPoint accountInfo: self class validAccountInfo. + self shouldnt: [self endPoint connectWith: ICMockSocketStream] raise: Exception \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/testConnectToOnWithWrongHost.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/testConnectToOnWithWrongHost.st index 4d03310a..f5cd0ab5 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/testConnectToOnWithWrongHost.st +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/testConnectToOnWithWrongHost.st @@ -1,5 +1,6 @@ connectOn testConnectToOnWithWrongHost - self endPoint connectTo: self class invalidHost on: self class invalidPort with: ICMockSocketStream. + self endPoint accountInfo: self class invalidHostAccountInfo. + self endPoint connectWith: ICMockSocketStream. self assert: self endPoint fatalErrorOccured equals: true \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/testConnectToOnWithWrongPort.st b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/testConnectToOnWithWrongPort.st index 583c251c..c971b49e 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/testConnectToOnWithWrongPort.st +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/instance/testConnectToOnWithWrongPort.st @@ -1,5 +1,6 @@ connectOn testConnectToOnWithWrongPort - self endPoint connectTo: self class validHost on: self class invalidPort with: ICMockSocketStream. + self endPoint accountInfo: self class invalidPortAccountInfo. + self endPoint connectWith: ICMockSocketStream. self assert: self endPoint fatalErrorOccured equals: true \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/methodProperties.json index 958120ff..a24d5caa 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/methodProperties.json +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/methodProperties.json @@ -1,17 +1,23 @@ { "class" : { "defaultMockServerConfig" : "C.G. 7/25/2018 18:22", - "invalidHost" : "AR 5/31/2016 22:00", + "invalidHost" : "tg 7/10/2019 19:36", + "invalidHostAccountInfo" : "mt 7/26/2019 14:24", "invalidPort" : "AR 5/31/2016 22:00", + "invalidPortAccountInfo" : "mt 7/26/2019 14:23", + "validAccountInfo" : "mt 7/26/2019 14:23", + "validAccountName" : "tg 7/10/2019 19:26", "validHost" : "jwe 7/28/2016 14:29", "validHostIP" : "AR 7/12/2016 10:24", - "validPort" : "AR 5/31/2016 21:37" }, + "validPassword" : "tg 7/10/2019 19:27", + "validPort" : "AR 5/31/2016 21:37", + "validUsername" : "tg 7/10/2019 19:26" }, "instance" : { "endPoint" : "AR 5/31/2016 21:33", - "endPoint:" : "AR 5/31/2016 21:33", + "endPoint:" : "pm 6/9/2019 17:17", "setUp" : "AR 7/14/2016 09:17", "tearDown" : "js 6/7/2016 09:42", - "testConnectToOn" : "C.G. 7/25/2018 18:01", - "testConnectToOnWithWrongHost" : "C.G. 7/25/2018 18:01", - "testConnectToOnWithWrongPort" : "C.G. 7/25/2018 12:53", + "testConnectToOn" : "tg 7/26/2019 21:41", + "testConnectToOnWithWrongHost" : "tg 7/10/2019 20:00", + "testConnectToOnWithWrongPort" : "tg 7/10/2019 20:00", "testPingIfNotConnected" : "C.G. 7/25/2018 18:02" } } diff --git a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/properties.json b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/properties.json index a9fd3c6f..12d6f7fd 100644 --- a/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/properties.json +++ b/packages/IMAPClient-Tests.package/ICEndPointConnectionTest.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "tg 7/8/2019 15:44", "instvars" : [ "endPoint" ], "name" : "ICEndPointConnectionTest", diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/README.md b/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstUID.st b/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstUID.st deleted file mode 100644 index c7827f4f..00000000 --- a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstUID.st +++ /dev/null @@ -1,4 +0,0 @@ -as yet unclassified -firstUID - - ^ '20' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/endpoint..st b/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/endpoint..st deleted file mode 100644 index b41cab06..00000000 --- a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/endpoint..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -endpoint: anObject - - endpoint := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/parser..st b/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/parser..st deleted file mode 100644 index 53616b8a..00000000 --- a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/parser..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -parser: anObject - - parser := anObject \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/parser.st b/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/parser.st deleted file mode 100644 index 6e5e526a..00000000 --- a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/parser.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -parser - - ^ parser \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/setUp.st b/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/setUp.st deleted file mode 100644 index ecfd1a28..00000000 --- a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/setUp.st +++ /dev/null @@ -1,5 +0,0 @@ -as yet unclassified -setUp - - self parser: ICFetchResponseParser new. - self endpoint: ICEndPoint new \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/README.md b/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/README.md index e69de29b..b4be42b2 100644 --- a/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/README.md +++ b/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/README.md @@ -0,0 +1 @@ +This tests the class ICFileReadWriter by creating and reading JSON FIles. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/readWriter..st b/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/readWriter..st index 2d812299..24bdb677 100644 --- a/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/readWriter..st +++ b/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/readWriter..st @@ -1,4 +1,4 @@ accessing -readWriter: anObject +readWriter: anICFileReadWriter - readWriter := anObject \ No newline at end of file + readWriter := anICFileReadWriter \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/setUp.st b/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/setUp.st index d6345276..7409be69 100644 --- a/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/setUp.st +++ b/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/setUp.st @@ -1,4 +1,4 @@ -accessing +running setUp self readWriter: ICFileReadWriter new \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/testGetRecipients.st b/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/testRecipients.st similarity index 67% rename from packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/testGetRecipients.st rename to packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/testRecipients.st index 6b107732..dd9c22b9 100644 --- a/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/testGetRecipients.st +++ b/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/instance/testRecipients.st @@ -1,9 +1,9 @@ accessing -testGetRecipients +testRecipients | jsonRecipients | jsonRecipients := (self class givenJsonObject at: 'header') at: 'to'. self - assert: (self readWriter getRecipientsFrom: jsonRecipients) + assert: (self readWriter recipientsFrom: jsonRecipients) equals: (self class expectedMailObject header at: #to) \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/methodProperties.json index 7eb7c46a..209ebd03 100644 --- a/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/methodProperties.json +++ b/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/methodProperties.json @@ -5,9 +5,9 @@ "givenJsonObject" : "C.G. 7/25/2018 18:21" }, "instance" : { "readWriter" : "dl 7/20/2017 10:54", - "readWriter:" : "dl 7/20/2017 10:54", + "readWriter:" : "pm 6/9/2019 17:18", "setUp" : "C.G. 7/25/2018 18:02", "testCreateHeader" : "C.G. 7/25/2018 18:03", "testCreateJsonHeader" : "C.G. 7/25/2018 18:03", - "testGetRecipients" : "C.G. 7/25/2018 18:03", - "testReadWrite" : "C.G. 7/25/2018 18:03" } } + "testReadWrite" : "C.G. 7/25/2018 18:03", + "testRecipients" : "pm 6/3/2019 18:53" } } diff --git a/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/properties.json b/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/properties.json index 2adb761b..42128914 100644 --- a/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/properties.json +++ b/packages/IMAPClient-Tests.package/ICFileReadWriterTest.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "tg 7/8/2019 15:48", "instvars" : [ "readWriter" ], "name" : "ICFileReadWriterTest", diff --git a/packages/IMAPClient-Tests.package/ICFolderTest.class/README.md b/packages/IMAPClient-Tests.package/ICFolderTest.class/README.md index e69de29b..6cfb583b 100644 --- a/packages/IMAPClient-Tests.package/ICFolderTest.class/README.md +++ b/packages/IMAPClient-Tests.package/ICFolderTest.class/README.md @@ -0,0 +1 @@ +This tests the ICFolder class by adding, removing and reading from a folder. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/endpoint..st b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/endpoint..st index b41cab06..9da1aa2d 100644 --- a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/endpoint..st +++ b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/endpoint..st @@ -1,4 +1,4 @@ accessing -endpoint: anObject +endpoint: anICEndPoint - endpoint := anObject \ No newline at end of file + endpoint := anICEndPoint \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/exampleEmailIn..st b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/exampleEmailIn..st index 5239719f..dbcf1ab3 100644 --- a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/exampleEmailIn..st +++ b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/exampleEmailIn..st @@ -1,15 +1,10 @@ setup exampleEmailIn: aFolder - - | email | - - email := ICEmail new. - email + + ^ ICEmail new body: 'i am very body'; subject: 'urgent'; from: 'coolkid@aol.com'; to: 'me@me.com'; folder: aFolder; - date: 'Fri, 10 Jun 2016 12:52:11 +0200'. - - ^ email \ No newline at end of file + date: 'Fri, 10 Jun 2016 12:52:11 +0200' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/root..st b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/root..st index dc8cfd2d..d79b7251 100644 --- a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/root..st +++ b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/root..st @@ -1,4 +1,4 @@ accessing -root: anObject +root: anICFolder - root := anObject \ No newline at end of file + root := anICFolder \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/setUp.st b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/setUp.st index 8c312c6b..5cbf7fcd 100644 --- a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/setUp.st +++ b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/setUp.st @@ -1,4 +1,4 @@ -setup +running setUp self root: ICFolder new. diff --git a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/tearDown.st b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/tearDown.st index 999458f2..7d90a5c7 100644 --- a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/tearDown.st +++ b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/tearDown.st @@ -1,4 +1,4 @@ -setup +running tearDown self root: nil \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/testChildFolderNamedWithSubfolderNotPresent.st b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/testChildFolderNamedWithSubfolderNotPresent.st index 3f045f00..51e16c3c 100644 --- a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/testChildFolderNamedWithSubfolderNotPresent.st +++ b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/testChildFolderNamedWithSubfolderNotPresent.st @@ -1,4 +1,4 @@ -childFolderNamed +folderNames testChildFolderNamedWithSubfolderNotPresent | subfolder1 subfolder2 | diff --git a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/testChildFolderNamedWithSubfolderPresent.st b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/testChildFolderNamedWithSubfolderPresent.st index 7f93acfb..be19931d 100644 --- a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/testChildFolderNamedWithSubfolderPresent.st +++ b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/testChildFolderNamedWithSubfolderPresent.st @@ -1,4 +1,4 @@ -childFolderNamed +folderNames testChildFolderNamedWithSubfolderPresent | subfolder1 subfolder2 result | diff --git a/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/testRootFolderHashName.st b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/testRootFolderHashName.st new file mode 100644 index 00000000..a9a9c860 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICFolderTest.class/instance/testRootFolderHashName.st @@ -0,0 +1,21 @@ +folderNames +testRootFolderHashName + + | testEndpoint| + testEndpoint := ICEndPoint new + accountInfo: (ICAccountInfo new). + + testEndpoint accountInfo + host: 'testHost'; + username: 'klaus'. + self assert: testEndpoint rootFolderName equals: '1394373304'. + + testEndpoint accountInfo + host: 'tHost'; + username: 'klaus'. + self assert: testEndpoint rootFolderName equals: '8003456151'. + + testEndpoint accountInfo + host: 'abcd'; + username: 'efgh'. + self assert: testEndpoint rootFolderName equals: '3788214663' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFolderTest.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICFolderTest.class/methodProperties.json index d20a35e5..fa083f4e 100644 --- a/packages/IMAPClient-Tests.package/ICFolderTest.class/methodProperties.json +++ b/packages/IMAPClient-Tests.package/ICFolderTest.class/methodProperties.json @@ -3,10 +3,10 @@ }, "instance" : { "endpoint" : "ms 7/28/2016 14:10", - "endpoint:" : "ms 7/28/2016 14:11", - "exampleEmailIn:" : "C.G. 7/25/2018 18:04", + "endpoint:" : "pm 6/9/2019 17:19", + "exampleEmailIn:" : "mt 7/26/2019 15:18", "root" : "js 6/7/2016 12:56", - "root:" : "js 6/7/2016 12:56", + "root:" : "pm 6/9/2019 17:19", "setUp" : "C.G. 7/25/2018 18:04", "tearDown" : "js 6/7/2016 12:56", "testAddFolder" : "DH 7/19/2018 18:18", @@ -15,4 +15,5 @@ "testCountFolders" : "C.G. 7/25/2018 18:04", "testEmailInFolder" : "C.G. 7/25/2018 18:05", "testRemoveFolder" : "C.G. 7/25/2018 18:04", - "testRemoveFolderWithFolderNotExisting" : "C.G. 7/25/2018 18:04" } } + "testRemoveFolderWithFolderNotExisting" : "C.G. 7/25/2018 18:04", + "testRootFolderHashName" : "mt 7/26/2019 14:30" } } diff --git a/packages/IMAPClient-Tests.package/ICFolderTest.class/properties.json b/packages/IMAPClient-Tests.package/ICFolderTest.class/properties.json index 77592608..30360e32 100644 --- a/packages/IMAPClient-Tests.package/ICFolderTest.class/properties.json +++ b/packages/IMAPClient-Tests.package/ICFolderTest.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "tg 7/8/2019 15:49", "instvars" : [ "root", "endpoint" ], diff --git a/packages/IMAPClient-Tests.package/ICHelperTest.class/README.md b/packages/IMAPClient-Tests.package/ICHelperTest.class/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/IMAPClient-Tests.package/ICHelperTest.class/class/configFiles.st b/packages/IMAPClient-Tests.package/ICHelperTest.class/class/configFiles.st deleted file mode 100644 index 5a4f51c6..00000000 --- a/packages/IMAPClient-Tests.package/ICHelperTest.class/class/configFiles.st +++ /dev/null @@ -1,10 +0,0 @@ -as yet unclassified -configFiles - - | configs | - - configs := OrderedCollection new. - configs add: self firstConfig. - configs add: self secondConfig. - - ^ configs \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICHelperTest.class/class/firstConfig.st b/packages/IMAPClient-Tests.package/ICHelperTest.class/class/firstConfig.st deleted file mode 100644 index 029b8e8a..00000000 --- a/packages/IMAPClient-Tests.package/ICHelperTest.class/class/firstConfig.st +++ /dev/null @@ -1,14 +0,0 @@ -as yet unclassified -firstConfig - - | config | - - config := Dictionary new. - - config at: 'ssl' put: true. - config at: 'name' put: 'maxsAccount'. - config at: 'address' put: 'test.server.de' . - config at: 'port' put: '993'. - config at: 'username' put: 'maxMustermann'. - - ^ config \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICHelperTest.class/class/secondConfig.st b/packages/IMAPClient-Tests.package/ICHelperTest.class/class/secondConfig.st deleted file mode 100644 index bf9b671a..00000000 --- a/packages/IMAPClient-Tests.package/ICHelperTest.class/class/secondConfig.st +++ /dev/null @@ -1,14 +0,0 @@ -as yet unclassified -secondConfig - - | config | - - config := Dictionary new. - - config at: 'ssl' put: true. - config at: 'name' put: 'petersAccount'. - config at: 'address' put: 'test.server.nl' . - config at: 'port' put: '993'. - config at: 'username' put: 'peterMustermann'. - - ^ config \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/createConfigFiles.st b/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/createConfigFiles.st deleted file mode 100644 index 5b6bfa31..00000000 --- a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/createConfigFiles.st +++ /dev/null @@ -1,29 +0,0 @@ -as yet unclassified -createConfigFiles - - | directory | - - directory := FileDirectory default. - - (directory directoryExists: 'Maildir') - ifFalse: [directory createDirectory: 'Maildir']. - - directory := directory directoryNamed: 'Maildir'. - - (directory directoryExists: 'config') - ifFalse: [directory createDirectory: 'config']. - - directory := directory directoryNamed: 'config'. - - self class configFiles do: [:config | - FileStream forceNewFileNamed: (directory fullPathFor: (config at: 'name')) do: - [:stream | stream - wantsLineEndConversion: false; - nextPutAll: (config at: 'name') ; cr; - nextPutAll: (config at: 'address'); cr; - nextPutAll: (config at: 'port') asString; cr; - nextPutAll: (config at: 'username'); cr; - nextPutAll: (config at: 'ssl') asString; cr; - close]]. - - ^ directory \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/deleteConfigFiles.and..st b/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/deleteConfigFiles.and..st deleted file mode 100644 index 2802b38d..00000000 --- a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/deleteConfigFiles.and..st +++ /dev/null @@ -1,12 +0,0 @@ -as yet unclassified -deleteConfigFiles: firstFileName and: secondFileName - - | directory | - - directory := self getConfigDirectory. - - (directory fileOrDirectoryExists: (firstFileName)) - ifTrue: [directory deleteFileNamed: (firstFileName)]. - - (directory fileOrDirectoryExists: (secondFileName)) - ifTrue: [directory deleteFileNamed: (secondFileName)] \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/getConfigDirectory.st b/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/getConfigDirectory.st deleted file mode 100644 index f32b9785..00000000 --- a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/getConfigDirectory.st +++ /dev/null @@ -1,17 +0,0 @@ -as yet unclassified -getConfigDirectory - - | directory | - - directory := FileDirectory default. - (directory directoryExists: 'Maildir') - ifFalse: [directory createDirectory: 'Maildir']. - - directory := directory directoryNamed: 'Maildir'. - - (directory directoryExists: 'config') - ifFalse: [directory createDirectory: 'config']. - - directory := directory directoryNamed: 'config'. - - ^ directory \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/testDeleteAccountFromEndpoint.st b/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/testDeleteAccountFromEndpoint.st deleted file mode 100644 index b5fb8a09..00000000 --- a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/testDeleteAccountFromEndpoint.st +++ /dev/null @@ -1,42 +0,0 @@ -as yet unclassified -testDeleteAccountFromEndpoint - - | endpoint serverInfo authenticationInfo directory configDirectory fileName | - - serverInfo := (ICServerInfo new) host: 'testHost'; port: 993. - authenticationInfo := (ICAuthenticationInfo new) username: 'klaus'; password: 'test'. - - endpoint := ICEndPoint new. - endpoint - serverInfo: serverInfo; - authenticationInfo: authenticationInfo. - - "file name calculated with hash of host + username" - fileName := '1394373304'. - - "create dummy config file" - directory := FileDirectory default. - - (directory directoryExists: 'Maildir') - ifFalse: [directory createDirectory: 'Maildir']. - - directory := directory directoryNamed: 'Maildir'. - - "create maildir mail folder" - (directory directoryExists: fileName) - ifFalse: [directory createDirectory: fileName]. - - "create config file" - (directory directoryExists: 'config') - ifFalse: [directory createDirectory: 'config']. - - configDirectory := directory directoryNamed: 'config'. - configDirectory forceNewFileNamed: fileName. - - self assert: ((directory directoryExists: fileName)) equals: true. - self assert: ((configDirectory fileExists: fileName)) equals: true. - - ICHelper deleteAccountFromEndpoint: endpoint. - - self assert: ((directory directoryExists: fileName)) equals: false. - self assert: ((configDirectory fileExists: fileName)) equals: false \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/testGetHashName.st b/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/testGetHashName.st deleted file mode 100644 index 43a42fe1..00000000 --- a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/testGetHashName.st +++ /dev/null @@ -1,6 +0,0 @@ -as yet unclassified -testGetHashName - - self assert: (ICHelper getHashNameForAccount: 'testHost' and: 'klaus') equals: '1394373304'. - self assert: (ICHelper getHashNameForAccount: 'tHost' and: 'klaus') equals: '8003456151'. - self assert: (ICHelper getHashNameForAccount: 'abcd' and: 'efgh') equals: '3788214663' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/testLoadCredentialsIntoDictionaries.st b/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/testLoadCredentialsIntoDictionaries.st deleted file mode 100644 index a5069912..00000000 --- a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/testLoadCredentialsIntoDictionaries.st +++ /dev/null @@ -1,16 +0,0 @@ -as yet unclassified -testLoadCredentialsIntoDictionaries - - "this tests checks if the config files can be parsed correctly into dictionaries. - for default folders and config files are named by hash...here we use just the name" - - | loadedDataCollection | - - self createConfigFiles. - loadedDataCollection := ICHelper loadCredentialsIntoDictionaries. - - self assert: ((loadedDataCollection indexOf: (self class firstConfig)) ~= 0) equals: true. - self assert: ((loadedDataCollection indexOf: (self class secondConfig)) ~= 0) equals: true. - - "delete the file, which was created for the test" - self deleteConfigFiles: (self class firstConfig at: 'name') and: (self class secondConfig at: 'name') \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/testSaveCredentialsIntoFile.st b/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/testSaveCredentialsIntoFile.st deleted file mode 100644 index 524bd44b..00000000 --- a/packages/IMAPClient-Tests.package/ICHelperTest.class/instance/testSaveCredentialsIntoFile.st +++ /dev/null @@ -1,33 +0,0 @@ -as yet unclassified -testSaveCredentialsIntoFile - - "this tests checks if a data dictionary can be saved correctly into a file" - - |directory result firstFileName secondFileName | - - self class configFiles do: [ :config | ICHelper saveCredentialsIntoFile: (config)]. - - directory := self getConfigDirectory. - - firstFileName := (ICHelper getHashNameForAccount: (self class firstConfig at: 'address') - and: (self class firstConfig at: 'username')). - - secondFileName := (ICHelper getHashNameForAccount: (self class secondConfig at: 'address') - and: (self class secondConfig at: 'username')). - - "the method uses hashing for names" - self - assert: (directory fileExists: (ICHelper getHashNameForAccount: (self class firstConfig at: 'address') - and: (self class firstConfig at: 'username'))). - - self - assert: (directory fileExists: (ICHelper getHashNameForAccount: (self class secondConfig at: 'address') - and: (self class secondConfig at: 'username'))). - - result := ICHelper loadCredentialsIntoDictionaries. - - self assert: ((result indexOf: (self class firstConfig)) ~= 0) equals: true. - self assert: ((result indexOf: (self class secondConfig)) ~= 0) equals: true. - - "delete the file, which was created for the test" - self deleteConfigFiles: firstFileName and: secondFileName. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICHelperTest.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICHelperTest.class/methodProperties.json deleted file mode 100644 index ae15088c..00000000 --- a/packages/IMAPClient-Tests.package/ICHelperTest.class/methodProperties.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "class" : { - "configFiles" : "C.G. 7/25/2018 18:15", - "firstConfig" : "C.G. 7/25/2018 18:15", - "secondConfig" : "C.G. 7/25/2018 18:16" }, - "instance" : { - "createConfigFiles" : "C.G. 7/25/2018 18:06", - "deleteConfigFiles:and:" : "C.G. 7/25/2018 18:06", - "getConfigDirectory" : "C.G. 7/25/2018 18:07", - "testDeleteAccountFromEndpoint" : "C.G. 7/25/2018 18:08", - "testGetHashName" : "C.G. 7/25/2018 18:09", - "testLoadCredentialsIntoDictionaries" : "C.G. 7/25/2018 18:09", - "testSaveCredentialsIntoFile" : "C.G. 7/25/2018 18:10" } } diff --git a/packages/IMAPClient-Tests.package/ICMockEndpoint.class/README.md b/packages/IMAPClient-Tests.package/ICMockEndpoint.class/README.md index e69de29b..d3467192 100644 --- a/packages/IMAPClient-Tests.package/ICMockEndpoint.class/README.md +++ b/packages/IMAPClient-Tests.package/ICMockEndpoint.class/README.md @@ -0,0 +1 @@ +Mock endpoint for offline testing purposes \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockEndpoint.class/instance/mailBody..st b/packages/IMAPClient-Tests.package/ICMockEndpoint.class/instance/mailBody..st index 148b31d7..924daf3a 100644 --- a/packages/IMAPClient-Tests.package/ICMockEndpoint.class/instance/mailBody..st +++ b/packages/IMAPClient-Tests.package/ICMockEndpoint.class/instance/mailBody..st @@ -1,4 +1,4 @@ accessing -mailBody: anObject +mailBody: aString - mailBody := anObject \ No newline at end of file + mailBody := aString \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockEndpoint.class/instance/rootFolder..st b/packages/IMAPClient-Tests.package/ICMockEndpoint.class/instance/rootFolder..st index 39b879e0..b5caae36 100644 --- a/packages/IMAPClient-Tests.package/ICMockEndpoint.class/instance/rootFolder..st +++ b/packages/IMAPClient-Tests.package/ICMockEndpoint.class/instance/rootFolder..st @@ -1,4 +1,4 @@ accessing -rootFolder: anObject +rootFolder: anICFolder - rootFolder := anObject \ No newline at end of file + rootFolder := anICFolder \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockEndpoint.class/instance/select..st b/packages/IMAPClient-Tests.package/ICMockEndpoint.class/instance/select..st index 49400cdf..b89d80fd 100644 --- a/packages/IMAPClient-Tests.package/ICMockEndpoint.class/instance/select..st +++ b/packages/IMAPClient-Tests.package/ICMockEndpoint.class/instance/select..st @@ -1,6 +1,2 @@ mockMethods -select: aString - - "do nothing" - - ^ '' \ No newline at end of file +select: aString \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockEndpoint.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICMockEndpoint.class/methodProperties.json index 08a81cde..03c6230a 100644 --- a/packages/IMAPClient-Tests.package/ICMockEndpoint.class/methodProperties.json +++ b/packages/IMAPClient-Tests.package/ICMockEndpoint.class/methodProperties.json @@ -5,7 +5,7 @@ "fillBodyFor:" : "DH 7/9/2018 15:37", "hierarchyDelimiter" : "ms 7/28/2016 14:04", "mailBody" : "C.G. 7/25/2018 18:10", - "mailBody:" : "C.G. 7/25/2018 18:10", + "mailBody:" : "pm 6/9/2019 17:19", "rootFolder" : "ms 7/28/2016 14:00", - "rootFolder:" : "ms 7/28/2016 14:01", - "select:" : "C.G. 7/25/2018 18:11" } } + "rootFolder:" : "pm 6/9/2019 17:19", + "select:" : "mt 7/26/2019 14:38" } } diff --git a/packages/IMAPClient-Tests.package/ICMockEndpoint.class/properties.json b/packages/IMAPClient-Tests.package/ICMockEndpoint.class/properties.json index 5209ada2..3216c564 100644 --- a/packages/IMAPClient-Tests.package/ICMockEndpoint.class/properties.json +++ b/packages/IMAPClient-Tests.package/ICMockEndpoint.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "tg 7/9/2019 14:43", "instvars" : [ "rootFolder", "mailBody" ], diff --git a/packages/IMAPClient-Tests.package/ICMockServer.class/README.md b/packages/IMAPClient-Tests.package/ICMockServer.class/README.md index e69de29b..68e8946d 100644 --- a/packages/IMAPClient-Tests.package/ICMockServer.class/README.md +++ b/packages/IMAPClient-Tests.package/ICMockServer.class/README.md @@ -0,0 +1 @@ +Mock server for offline testing purposes \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/commandSucceeded..st b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/commandSucceeded..st index 0da9b566..f4929f1f 100644 --- a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/commandSucceeded..st +++ b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/commandSucceeded..st @@ -1,4 +1,4 @@ accessing commandSucceeded: aResponse - ^ aResponse last beginsWith: ICEndPoint commandSucceeded \ No newline at end of file + ^ ICParser commandSucceeded: aResponse last \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/fetchFlagsOnlyResponse.st b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/fetchFlagsOnlyResponse.st index e478b977..8cd07ff3 100644 --- a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/fetchFlagsOnlyResponse.st +++ b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/fetchFlagsOnlyResponse.st @@ -4,4 +4,4 @@ fetchFlagsOnlyResponse ^ OrderedCollection newFrom: { '* 1 FLAGS( \Flagged) UID 3'. '* 2 FLAGS( \Flagged) UID 4'. - '. OK FETCH completed.' }. \ No newline at end of file + '. OK FETCH completed.' } \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/notAuthenticatedResponses.st b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/notAuthenticatedResponses.st index 9e73f2f0..5618722d 100644 --- a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/notAuthenticatedResponses.st +++ b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/notAuthenticatedResponses.st @@ -3,5 +3,5 @@ notAuthenticatedResponses ^ Dictionary newFrom: { '. NOOP' -> self noopResponse. - '. LOGIN ', self validUsername, ' ', self validPassword -> self loginResponse. + '. LOGIN "', self validUsername, '" "', self validPassword, '"' -> self loginResponse. '. LOGOUT' -> self logoutResponse} \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/responses..st b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/responses..st index ac480c57..e33f61fc 100644 --- a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/responses..st +++ b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/responses..st @@ -1,4 +1,4 @@ accessing -responses: anObject +responses: anOrderedCollection - responses := anObject \ No newline at end of file + responses := anOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validHost..st b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validHost..st index 452c1fb8..8fb2c1a5 100644 --- a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validHost..st +++ b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validHost..st @@ -1,4 +1,4 @@ accessing -validHost: anObject +validHost: aString - validHost := anObject \ No newline at end of file + validHost := aString \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validHostIP..st b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validHostIP..st index d530051b..04b1732d 100644 --- a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validHostIP..st +++ b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validHostIP..st @@ -1,4 +1,4 @@ accessing -validHostIP: anObject +validHostIP: anArray - validHostIP := anObject \ No newline at end of file + validHostIP := anArray \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validPassword..st b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validPassword..st index d95f1df4..ca1941a2 100644 --- a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validPassword..st +++ b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validPassword..st @@ -1,4 +1,4 @@ accessing -validPassword: anObject +validPassword: aString - validPassword := anObject \ No newline at end of file + validPassword := aString \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validPort..st b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validPort..st index 63daf68b..a0e85243 100644 --- a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validPort..st +++ b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validPort..st @@ -1,4 +1,4 @@ accessing -validPort: anObject +validPort: aNumber - validPort := anObject \ No newline at end of file + validPort := aNumber \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validUsername..st b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validUsername..st index 15d35316..ee4c9b19 100644 --- a/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validUsername..st +++ b/packages/IMAPClient-Tests.package/ICMockServer.class/instance/validUsername..st @@ -1,4 +1,4 @@ accessing -validUsername: anObject +validUsername: aString - validUsername := anObject \ No newline at end of file + validUsername := aString \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockServer.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICMockServer.class/methodProperties.json index d678b844..747aa4e5 100644 --- a/packages/IMAPClient-Tests.package/ICMockServer.class/methodProperties.json +++ b/packages/IMAPClient-Tests.package/ICMockServer.class/methodProperties.json @@ -4,9 +4,9 @@ "instance" : { "authenticatedResponses" : "C.G. 6/28/2018 10:33", "badResponse" : "AR 6/10/2016 15:26", - "commandSucceeded:" : "AR 6/26/2016 12:16", + "commandSucceeded:" : "pm 7/15/2019 20:39", "fetchBodyResponse" : "C.G. 7/25/2018 18:12", - "fetchFlagsOnlyResponse" : "C.G. 7/25/2018 18:12", + "fetchFlagsOnlyResponse" : "mt 7/26/2019 14:42", "fetchHeaderResponse" : "al 6/28/2016 10:18", "fetchHeaderResponseBeginning:" : "C.G. 7/25/2018 18:12", "fetchHeaderResponseDate" : "al 6/28/2016 10:06", @@ -27,21 +27,21 @@ "logoutResponse" : "AR 6/30/2016 07:46", "makeTransition:withResponse:" : "C.G. 7/25/2018 18:13", "noopResponse" : "AR 6/30/2016 07:47", - "notAuthenticatedResponses" : "AR 6/30/2016 07:47", + "notAuthenticatedResponses" : "tg 4/30/2019 19:51", "respondTo:" : "C.G. 7/25/2018 18:13", "responses" : "js 6/14/2016 10:51", - "responses:" : "js 6/14/2016 10:51", + "responses:" : "pm 6/9/2019 17:21", "selectInboxResponse" : "AR 6/26/2016 11:50", "selectedResponses" : "js 8/4/2017 21:47", "stateTransitions" : "DH 6/26/2018 21:25", "uidResponse" : "C.G. 7/25/2018 18:13", "validHost" : "js 6/14/2016 10:51", - "validHost:" : "js 6/14/2016 10:51", + "validHost:" : "pm 6/9/2019 17:21", "validHostIP" : "C.G. 7/25/2018 18:13", - "validHostIP:" : "C.G. 7/25/2018 18:14", + "validHostIP:" : "pm 6/9/2019 17:22", "validPassword" : "js 6/14/2016 10:51", - "validPassword:" : "js 6/14/2016 10:51", + "validPassword:" : "pm 6/9/2019 17:23", "validPort" : "js 6/14/2016 10:51", - "validPort:" : "js 6/14/2016 10:51", + "validPort:" : "pm 6/9/2019 17:23", "validUsername" : "js 6/14/2016 10:51", - "validUsername:" : "js 6/14/2016 10:51" } } + "validUsername:" : "pm 6/9/2019 17:23" } } diff --git a/packages/IMAPClient-Tests.package/ICMockServer.class/properties.json b/packages/IMAPClient-Tests.package/ICMockServer.class/properties.json index eedccb08..8b1b5acb 100644 --- a/packages/IMAPClient-Tests.package/ICMockServer.class/properties.json +++ b/packages/IMAPClient-Tests.package/ICMockServer.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "tg 7/9/2019 14:43", "instvars" : [ "responses", "validHost", diff --git a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/README.md b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/README.md index e69de29b..bac1aa1f 100644 --- a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/README.md +++ b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/README.md @@ -0,0 +1 @@ +This is part of the imap server communication mock up. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/connected..st b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/connected..st index d0f08f6a..f55dec70 100644 --- a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/connected..st +++ b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/connected..st @@ -1,4 +1,4 @@ accessing -connected: anObject +connected: aBool - connected := anObject \ No newline at end of file + connected := aBool \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/lastResponse..st b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/lastResponse..st index 73671fc0..5cb22cad 100644 --- a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/lastResponse..st +++ b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/lastResponse..st @@ -1,4 +1,4 @@ accessing -lastResponse: anObject +lastResponse: aString - lastResponse := anObject \ No newline at end of file + lastResponse := aString \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/nextResponse.st b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/nextResponse.st index e9266085..3c6a453a 100644 --- a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/nextResponse.st +++ b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/nextResponse.st @@ -4,6 +4,5 @@ nextResponse self responseQueue ifEmpty: [ ^ OrderedCollection new]. self lastResponse: self responseQueue removeFirst. - Transcript show: 'RECEIVING: ' , self lastResponse; cr. - + ^ self lastResponse \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/responseQueue..st b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/responseQueue..st index e934079e..b1024e9f 100644 --- a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/responseQueue..st +++ b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/responseQueue..st @@ -1,4 +1,4 @@ accessing -responseQueue: anObject +responseQueue: anOrderedCollection - responseQueue := anObject \ No newline at end of file + responseQueue := anOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/server..st b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/server..st index d31ad51c..290983d5 100644 --- a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/server..st +++ b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/server..st @@ -1,4 +1,4 @@ accessing -server: anObject +server: anICMockServer - server := anObject \ No newline at end of file + server := anICMockServer \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/ssl..st b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/ssl..st index b1be2292..1e08ecbc 100644 --- a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/ssl..st +++ b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/instance/ssl..st @@ -1,4 +1,4 @@ accessing -ssl: anObject +ssl: aBool - ssl := anObject \ No newline at end of file + ssl := aBool \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/methodProperties.json index d2eaebe8..8fc29619 100644 --- a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/methodProperties.json +++ b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/methodProperties.json @@ -5,17 +5,17 @@ "close" : "js 6/7/2016 09:49", "connectTo:on:" : "C.G. 7/25/2018 18:14", "connected" : "js 6/7/2016 09:49", - "connected:" : "js 6/7/2016 09:49", + "connected:" : "pm 6/9/2019 17:23", "initialize" : "AR 6/13/2016 15:21", "isConnected" : "js 6/7/2016 09:57", "lastResponse" : "js 6/7/2016 10:26", - "lastResponse:" : "js 6/7/2016 10:22", + "lastResponse:" : "pm 6/9/2019 17:25", "nextLine" : "AR 7/12/2016 10:00", - "nextResponse" : "C.G. 7/25/2018 18:14", + "nextResponse" : "mt 7/26/2019 14:30", "responseQueue" : "AR 5/24/2016 10:18", - "responseQueue:" : "AR 5/24/2016 10:18", + "responseQueue:" : "pm 6/9/2019 17:25", "sendCommand:" : "AR 6/10/2016 15:30", "server" : "C.G. 7/25/2018 18:14", - "server:" : "C.G. 7/25/2018 18:14", + "server:" : "pm 6/9/2019 17:26", "ssl" : "ms 7/12/2016 10:38", - "ssl:" : "ms 7/12/2016 10:38" } } + "ssl:" : "pm 6/9/2019 17:26" } } diff --git a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/properties.json b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/properties.json index f6d01a0f..c9a77370 100644 --- a/packages/IMAPClient-Tests.package/ICMockSocketStream.class/properties.json +++ b/packages/IMAPClient-Tests.package/ICMockSocketStream.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "tg 7/8/2019 15:50", "instvars" : [ "responseQueue", "connected", diff --git a/packages/IMAPClient-Tests.package/ICNullStreamTest.class/README.md b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/README.md new file mode 100644 index 00000000..bea9b0e6 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/README.md @@ -0,0 +1 @@ +This test class conducts basic testing of the ICNullStream null object properties. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICNullStreamTest.class/instance/nullStream..st b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/instance/nullStream..st new file mode 100644 index 00000000..2358091d --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/instance/nullStream..st @@ -0,0 +1,4 @@ +accessing +nullStream: anICNullStream + + nullStream := anICNullStream \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICNullStreamTest.class/instance/nullStream.st b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/instance/nullStream.st new file mode 100644 index 00000000..8776fbd6 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/instance/nullStream.st @@ -0,0 +1,4 @@ +accessing +nullStream + + ^ nullStream \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICNullStreamTest.class/instance/setUp.st b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/instance/setUp.st new file mode 100644 index 00000000..0fd9467f --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/instance/setUp.st @@ -0,0 +1,4 @@ +running +setUp + + self nullStream: ICNullStream new \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICNullStreamTest.class/instance/testNullObjectBehavior.st b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/instance/testNullObjectBehavior.st new file mode 100644 index 00000000..efbb7c22 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/instance/testNullObjectBehavior.st @@ -0,0 +1,9 @@ +testing +testNullObjectBehavior + + self assert: true equals: self nullStream close. + self assert: false equals: self nullStream isConnected. + self assert: String empty equals: self nullStream nextLine. + + self assert: false equals: (self nullStream sendCommand: String empty). + self assert: false equals: (self nullStream sendCommand: '12345abcedfg') \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICNullStreamTest.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/methodProperties.json new file mode 100644 index 00000000..c1356cf3 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/methodProperties.json @@ -0,0 +1,8 @@ +{ + "class" : { + }, + "instance" : { + "nullStream" : "ok 7/25/2019 20:23", + "nullStream:" : "ok 7/25/2019 20:23", + "setUp" : "ok 7/25/2019 20:24", + "testNullObjectBehavior" : "ok 7/25/2019 20:25" } } diff --git a/packages/IMAPClient-Tests.package/ICNullStreamTest.class/properties.json b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/properties.json new file mode 100644 index 00000000..2d0540f7 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICNullStreamTest.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "IMAPClient-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "tg 7/25/2019 13:20", + "instvars" : [ + "nullStream" ], + "name" : "ICNullStreamTest", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/packages/IMAPClient-Tests.package/ICParserTest.class/README.md b/packages/IMAPClient-Tests.package/ICParserTest.class/README.md new file mode 100644 index 00000000..a0db317b --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICParserTest.class/README.md @@ -0,0 +1 @@ +This tests the ICParser by parsing hardcoded server responses. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/expectedNumberOfMails.st b/packages/IMAPClient-Tests.package/ICParserTest.class/class/expectedNumberOfMails.st similarity index 58% rename from packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/expectedNumberOfMails.st rename to packages/IMAPClient-Tests.package/ICParserTest.class/class/expectedNumberOfMails.st index bd42c78a..756918d8 100644 --- a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/expectedNumberOfMails.st +++ b/packages/IMAPClient-Tests.package/ICParserTest.class/class/expectedNumberOfMails.st @@ -1,4 +1,4 @@ -as yet unclassified +constants expectedNumberOfMails ^ 1 \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstExampleResponse.st b/packages/IMAPClient-Tests.package/ICParserTest.class/class/firstExampleResponse.st similarity index 94% rename from packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstExampleResponse.st rename to packages/IMAPClient-Tests.package/ICParserTest.class/class/firstExampleResponse.st index 539c945b..f2dcc0ea 100644 --- a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstExampleResponse.st +++ b/packages/IMAPClient-Tests.package/ICParserTest.class/class/firstExampleResponse.st @@ -1,4 +1,4 @@ -as yet unclassified +constants firstExampleResponse ^ ('* ', self firstMessageID ,' FETCH (BODY[HEADER.FIELDS (from to subject date)] {103}', Character cr, diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstExpectedMailObject.st b/packages/IMAPClient-Tests.package/ICParserTest.class/class/firstExpectedMailObject.st similarity index 82% rename from packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstExpectedMailObject.st rename to packages/IMAPClient-Tests.package/ICParserTest.class/class/firstExpectedMailObject.st index adabba32..8c82b59a 100644 --- a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstExpectedMailObject.st +++ b/packages/IMAPClient-Tests.package/ICParserTest.class/class/firstExpectedMailObject.st @@ -1,4 +1,4 @@ -as yet unclassified +constants firstExpectedMailObject ^ ICEmail new @@ -6,5 +6,5 @@ firstExpectedMailObject from: 'test@example.de'; to: (OrderedCollection newFrom: { 'student@hpi.de' }); subject: 'test mail'; - uid: (self firstUID); + uniqueID: (self firstUID); yourself \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstExpectedResponse.st b/packages/IMAPClient-Tests.package/ICParserTest.class/class/firstExpectedResponse.st similarity index 94% rename from packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstExpectedResponse.st rename to packages/IMAPClient-Tests.package/ICParserTest.class/class/firstExpectedResponse.st index c9fa8393..29223725 100644 --- a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstExpectedResponse.st +++ b/packages/IMAPClient-Tests.package/ICParserTest.class/class/firstExpectedResponse.st @@ -1,4 +1,4 @@ -as yet unclassified +constants firstExpectedResponse ^ ('BODY[HEADER.FIELDS (from to subject date)] ', Character cr, diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstMessageID.st b/packages/IMAPClient-Tests.package/ICParserTest.class/class/firstMessageID.st similarity index 55% rename from packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstMessageID.st rename to packages/IMAPClient-Tests.package/ICParserTest.class/class/firstMessageID.st index df2f21c7..09db37cf 100644 --- a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/class/firstMessageID.st +++ b/packages/IMAPClient-Tests.package/ICParserTest.class/class/firstMessageID.st @@ -1,4 +1,4 @@ -as yet unclassified +constants firstMessageID ^ '364' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICParserTest.class/class/firstUID.st b/packages/IMAPClient-Tests.package/ICParserTest.class/class/firstUID.st new file mode 100644 index 00000000..6f70c19b --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICParserTest.class/class/firstUID.st @@ -0,0 +1,4 @@ +constants +firstUID + + ^ '20' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICParserTest.class/instance/endpoint..st b/packages/IMAPClient-Tests.package/ICParserTest.class/instance/endpoint..st new file mode 100644 index 00000000..9da1aa2d --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICParserTest.class/instance/endpoint..st @@ -0,0 +1,4 @@ +accessing +endpoint: anICEndPoint + + endpoint := anICEndPoint \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/endpoint.st b/packages/IMAPClient-Tests.package/ICParserTest.class/instance/endpoint.st similarity index 100% rename from packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/endpoint.st rename to packages/IMAPClient-Tests.package/ICParserTest.class/instance/endpoint.st diff --git a/packages/IMAPClient-Tests.package/ICParserTest.class/instance/setUp.st b/packages/IMAPClient-Tests.package/ICParserTest.class/instance/setUp.st new file mode 100644 index 00000000..eb5a76ac --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICParserTest.class/instance/setUp.st @@ -0,0 +1,4 @@ +running +setUp + + self endpoint: ICEndPoint new \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/testParseSimpleFetch.st b/packages/IMAPClient-Tests.package/ICParserTest.class/instance/testParseSimpleFetch.st similarity index 69% rename from packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/testParseSimpleFetch.st rename to packages/IMAPClient-Tests.package/ICParserTest.class/instance/testParseSimpleFetch.st index 8588d426..d2c423fb 100644 --- a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/instance/testParseSimpleFetch.st +++ b/packages/IMAPClient-Tests.package/ICParserTest.class/instance/testParseSimpleFetch.st @@ -1,20 +1,20 @@ -as yet unclassified +testing testParseSimpleFetch | parseResult firstResult parsedMail givenMail | - parseResult := parser parse: (ReadStream on: (self class firstExampleResponse)). + parseResult := ICParser parseFetchMailStream: (ReadStream on: (self class firstExampleResponse)). firstResult := parseResult at: (self class firstMessageID). self assert: parseResult size equals: self class expectedNumberOfMails. self assert: (firstResult) equals: (self class firstExpectedResponse). "parse the mail into ICMail and compare" - parsedMail := self endpoint parseFetchHeader: firstResult withId: (parseResult keyAtValue: firstResult). + parsedMail := ICParser parseFetchHeader: firstResult withId: (parseResult keyAtValue: firstResult). givenMail := self class firstExpectedMailObject. self assert: parsedMail from equals: givenMail from. self assert: parsedMail to equals: givenMail to. self assert: parsedMail subject equals: givenMail subject. self assert: parsedMail date equals: givenMail date. - self assert: parsedMail uid equals: givenMail uid \ No newline at end of file + self assert: parsedMail uniqueID equals: givenMail uniqueID \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICParserTest.class/methodProperties.json similarity index 53% rename from packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/methodProperties.json rename to packages/IMAPClient-Tests.package/ICParserTest.class/methodProperties.json index 48fa4394..02066efa 100644 --- a/packages/IMAPClient-Tests.package/ICFetchResponseParserTest.class/methodProperties.json +++ b/packages/IMAPClient-Tests.package/ICParserTest.class/methodProperties.json @@ -2,14 +2,12 @@ "class" : { "expectedNumberOfMails" : "dl 8/1/2017 16:25", "firstExampleResponse" : "C.G. 7/4/2018 13:21", - "firstExpectedMailObject" : "C.G. 7/4/2018 13:21", + "firstExpectedMailObject" : "pm 6/2/2019 15:58", "firstExpectedResponse" : "C.G. 7/4/2018 13:22", "firstMessageID" : "DH 7/4/2018 12:37", "firstUID" : "DH 7/4/2018 12:37" }, "instance" : { "endpoint" : "C.G. 7/25/2018 18:02", - "endpoint:" : "C.G. 7/25/2018 18:02", - "parser" : "C.G. 7/25/2018 18:02", - "parser:" : "C.G. 7/25/2018 18:02", - "setUp" : "C.G. 7/25/2018 18:02", - "testParseSimpleFetch" : "C.G. 7/4/2018 13:23" } } + "endpoint:" : "pm 6/9/2019 17:18", + "setUp" : "pm 7/25/2019 15:42", + "testParseSimpleFetch" : "pm 7/25/2019 15:40" } } diff --git a/packages/IMAPClient-Tests.package/IMAPClientTestsServiceProvider.class/properties.json b/packages/IMAPClient-Tests.package/ICParserTest.class/properties.json similarity index 57% rename from packages/IMAPClient-Tests.package/IMAPClientTestsServiceProvider.class/properties.json rename to packages/IMAPClient-Tests.package/ICParserTest.class/properties.json index 6c635055..978cd12e 100644 --- a/packages/IMAPClient-Tests.package/IMAPClientTestsServiceProvider.class/properties.json +++ b/packages/IMAPClient-Tests.package/ICParserTest.class/properties.json @@ -4,11 +4,11 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "pm 7/25/2019 15:44", "instvars" : [ - ], - "name" : "IMAPClientTestsServiceProvider", + "endpoint" ], + "name" : "ICParserTest", "pools" : [ ], - "super" : "ServiceProvider", + "super" : "TestCase", "type" : "normal" } diff --git a/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/README.md b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/README.md new file mode 100644 index 00000000..29e4e0fa --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/README.md @@ -0,0 +1 @@ +This test class conducts basic testing of the ICStreamWrapper connection capabilities. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/class/testserverHost.st b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/class/testserverHost.st new file mode 100644 index 00000000..96850a98 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/class/testserverHost.st @@ -0,0 +1,4 @@ +constants +testserverHost + + ^ 'hpi.de' \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/class/testserverPort.st b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/class/testserverPort.st new file mode 100644 index 00000000..b48235b3 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/class/testserverPort.st @@ -0,0 +1,4 @@ +constants +testserverPort + + ^ 80 \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/class/testserverSSLPort.st b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/class/testserverSSLPort.st new file mode 100644 index 00000000..11dce174 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/class/testserverSSLPort.st @@ -0,0 +1,4 @@ +constants +testserverSSLPort + + ^ 443 \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/setUp.st b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/setUp.st new file mode 100644 index 00000000..5ac4c672 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/setUp.st @@ -0,0 +1,4 @@ +running +setUp + + self streamWrapper: ICStreamWrapper new. \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/streamWrapper..st b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/streamWrapper..st new file mode 100644 index 00000000..237ce1ba --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/streamWrapper..st @@ -0,0 +1,4 @@ +accessing +streamWrapper: aStreamWrapper + + streamWrapper := aStreamWrapper \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/streamWrapper.st b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/streamWrapper.st new file mode 100644 index 00000000..fcd2ae12 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/streamWrapper.st @@ -0,0 +1,4 @@ +accessing +streamWrapper + + ^ streamWrapper \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/tearDown.st b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/tearDown.st new file mode 100644 index 00000000..dc081f14 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/tearDown.st @@ -0,0 +1,4 @@ +running +tearDown + + self streamWrapper close \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/testAccessors.st b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/testAccessors.st new file mode 100644 index 00000000..6d049f9c --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/testAccessors.st @@ -0,0 +1,12 @@ +testing +testAccessors + + self streamWrapper host: self class testserverHost. + self streamWrapper port: self class testserverPort. + + self + assert: self streamWrapper host + equals: self class testserverHost. + self + assert: self streamWrapper port + equals: self class testserverPort \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/testStreamConnection.st b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/testStreamConnection.st new file mode 100644 index 00000000..ff9dde78 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/testStreamConnection.st @@ -0,0 +1,6 @@ +testing +testStreamConnection + + self streamWrapper connectTo: self class testserverHost on: self class testserverPort. + + self assert: self streamWrapper isConnected \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/testStreamSSLConnection.st b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/testStreamSSLConnection.st new file mode 100644 index 00000000..5fed0ec6 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/instance/testStreamSSLConnection.st @@ -0,0 +1,6 @@ +testing +testStreamSSLConnection + + self streamWrapper sslConnectTo: self class testserverHost on: self class testserverSSLPort. + + self assert: self streamWrapper isConnected \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/methodProperties.json b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/methodProperties.json new file mode 100644 index 00000000..dd01f127 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/methodProperties.json @@ -0,0 +1,13 @@ +{ + "class" : { + "testserverHost" : "ok 7/25/2019 20:16", + "testserverPort" : "ok 7/25/2019 20:16", + "testserverSSLPort" : "ok 7/25/2019 20:17" }, + "instance" : { + "setUp" : "ok 7/25/2019 20:17", + "streamWrapper" : "ok 7/25/2019 20:18", + "streamWrapper:" : "ok 7/25/2019 20:18", + "tearDown" : "ok 7/25/2019 20:17", + "testAccessors" : "ok 7/25/2019 20:24", + "testStreamConnection" : "ok 7/25/2019 20:24", + "testStreamSSLConnection" : "ok 7/25/2019 20:24" } } diff --git a/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/properties.json b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/properties.json new file mode 100644 index 00000000..1afef725 --- /dev/null +++ b/packages/IMAPClient-Tests.package/ICStreamWrapperTest.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "IMAPClient-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "ok 7/9/2019 19:36", + "instvars" : [ + "streamWrapper" ], + "name" : "ICStreamWrapperTest", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/packages/IMAPClient-Tests.package/IMAPClientTestsServiceProvider.class/README.md b/packages/IMAPClient-Tests.package/IMAPClientTestsServiceProvider.class/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/IMAPClient-Tests.package/IMAPClientTestsServiceProvider.class/class/initialize.st b/packages/IMAPClient-Tests.package/IMAPClientTestsServiceProvider.class/class/initialize.st deleted file mode 100644 index dead3973..00000000 --- a/packages/IMAPClient-Tests.package/IMAPClientTestsServiceProvider.class/class/initialize.st +++ /dev/null @@ -1,4 +0,0 @@ -initialization -initialize - - ServiceRegistry current buildProvider: self new \ No newline at end of file diff --git a/packages/IMAPClient-Tests.package/IMAPClientTestsServiceProvider.class/methodProperties.json b/packages/IMAPClient-Tests.package/IMAPClientTestsServiceProvider.class/methodProperties.json deleted file mode 100644 index 9979ac9c..00000000 --- a/packages/IMAPClient-Tests.package/IMAPClientTestsServiceProvider.class/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - "initialize" : "C.G. 7/25/2018 18:14" }, - "instance" : { - } } diff --git a/packages/IMAPClient-UI.package/.squot-contents b/packages/IMAPClient-UI.package/.squot-contents index 460ade30..4ad0c330 100644 --- a/packages/IMAPClient-UI.package/.squot-contents +++ b/packages/IMAPClient-UI.package/.squot-contents @@ -1,4 +1,4 @@ SquotTrackedObjectMetadata { #objectClassName : #PackageInfo, #serializer : #SquotCypressCodeSerializer -} +} \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICEmail.class/instance/defaultSubject.st b/packages/IMAPClient-UI.package/ICEmailDialog.class/class/defaultSubject.st similarity index 76% rename from packages/IMAPClient-Core.package/ICEmail.class/instance/defaultSubject.st rename to packages/IMAPClient-UI.package/ICEmailDialog.class/class/defaultSubject.st index ce906af9..2255fbb1 100644 --- a/packages/IMAPClient-Core.package/ICEmail.class/instance/defaultSubject.st +++ b/packages/IMAPClient-UI.package/ICEmailDialog.class/class/defaultSubject.st @@ -1,4 +1,4 @@ -constants +defaults defaultSubject ^ '(no subject)' \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getBody.st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/body.st similarity index 75% rename from packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getBody.st rename to packages/IMAPClient-UI.package/ICEmailDialog.class/instance/body.st index 58e08698..e51047c4 100644 --- a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getBody.st +++ b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/body.st @@ -1,9 +1,9 @@ email access -getBody +body | mimeDoc body | - body := email retrieveBody. + body := self email retrieveBody. mimeDoc := MailMessage new initializeFromString: body. ^ mimeDoc bodyTextFormatted \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildBody..st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildBody..st new file mode 100644 index 00000000..e794fe05 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildBody..st @@ -0,0 +1,9 @@ +toolbuilder +buildBody: builder + + ^ builder pluggableTextSpec new + model: self; + readOnly: true; + indicateUnacceptedChanges: false; + getText: #body; + frame: (0 @ 0.2 extent: 1 @ 0.8) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildRecipient..st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildRecipient..st new file mode 100644 index 00000000..d46b10a3 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildRecipient..st @@ -0,0 +1,10 @@ +toolbuilder +buildRecipient: builder + + ^ builder pluggableInputFieldSpec new + model: self; + color: #checkBoxColor; + readOnly: true; + indicateUnacceptedChanges: false; + getText: #recipients; + frame: (0 @ 0.1333 extent: 1 @ 0.0666) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildSenderLabel..st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildSenderLabel..st new file mode 100644 index 00000000..06846903 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildSenderLabel..st @@ -0,0 +1,10 @@ +toolbuilder +buildSenderLabel: builder + + ^ builder pluggableInputFieldSpec new + model: self; + color: #checkBoxColor; + readOnly: true; + indicateUnacceptedChanges: false; + getText: #sender; + frame: (0 @ 0 extent: 1 @ 0.0666) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildSubject..st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildSubject..st new file mode 100644 index 00000000..9c7d0964 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildSubject..st @@ -0,0 +1,11 @@ +toolbuilder +buildSubject: builder + + ^ builder pluggableInputFieldSpec new + model: self; + color: #checkBoxColor; + readOnly: true; + font: (Preferences standardDefaultTextFont emphasized: 1); + indicateUnacceptedChanges: false; + getText: #subject; + frame: (0 @ 0.0666 extent: 1 @ 0.0666) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildWith..st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildWith..st index fa3d16a8..7c8d206d 100644 --- a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildWith..st +++ b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/buildWith..st @@ -1,54 +1,13 @@ toolbuilder buildWith: builder - | window windowSpec senderLabelSpec subjectSpec bodySpec recipientSpec | - windowSpec := builder pluggableWindowSpec new. - windowSpec + ^ builder build: (builder pluggableWindowSpec new model: self; label: self dialogTitle; children: OrderedCollection new; - extent: 600 @ 400. - - senderLabelSpec := builder pluggableInputFieldSpec new. - senderLabelSpec - model: self; - color: #checkBoxColor; - readOnly: true; - indicateUnacceptedChanges: false; - getText: #getSender; - frame: (0 @ 0 extent: 1 @ 0.0666). - - subjectSpec := builder pluggableInputFieldSpec new. - subjectSpec - model: self; - color: #checkBoxColor; - readOnly: true; - font: (Preferences standardDefaultTextFont emphasized: 1); - indicateUnacceptedChanges: false; - getText: #getSubject; - frame: (0 @ 0.0666 extent: 1 @ 0.0666). - - recipientSpec := builder pluggableInputFieldSpec new. - recipientSpec - model: self; - color: #checkBoxColor; - readOnly: true; - indicateUnacceptedChanges: false; - getText: #getRecipients; - frame: (0 @ 0.1333 extent: 1 @ 0.0666). - - bodySpec := builder pluggableTextSpec new. - bodySpec - model: self; - readOnly: true; - indicateUnacceptedChanges: false; - getText: #getBody; - frame: (0 @ 0.2 extent: 1 @ 0.8). - - windowSpec children addAll: {senderLabelSpec . subjectSpec . recipientSpec . bodySpec}. - - window := builder build: windowSpec. - - self changed: #checkBoxColor. - - ^ window \ No newline at end of file + extent: 600 @ 400; + children: { + self buildSenderLabel: builder. + self buildSubject: builder. + self buildRecipient: builder. + self buildBody: builder}) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/dialogTitle.st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/dialogTitle.st index 47239fba..e4dee937 100644 --- a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/dialogTitle.st +++ b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/dialogTitle.st @@ -1,4 +1,4 @@ toolbuilder dialogTitle - ^ self getSubject \ No newline at end of file + ^ self subject \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/email..st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/email..st index db98607c..50d1374c 100644 --- a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/email..st +++ b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/email..st @@ -1,4 +1,4 @@ accessing -email: anObject +email: anICEmail - email := anObject \ No newline at end of file + email := anICEmail \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getColor.st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getColor.st deleted file mode 100644 index 7ebf94e6..00000000 --- a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getColor.st +++ /dev/null @@ -1,4 +0,0 @@ -user interface -getColor - - ^ Color transparent \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getRecipients.st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getRecipients.st deleted file mode 100644 index 3c45d00e..00000000 --- a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getRecipients.st +++ /dev/null @@ -1,4 +0,0 @@ -email access -getRecipients - - ^ email to joinSeparatedBy: ';' \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getSender.st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getSender.st deleted file mode 100644 index 653f9702..00000000 --- a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getSender.st +++ /dev/null @@ -1,4 +0,0 @@ -email access -getSender - - ^ email from \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getSubject.st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getSubject.st deleted file mode 100644 index f3cc2682..00000000 --- a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/getSubject.st +++ /dev/null @@ -1,4 +0,0 @@ -email access -getSubject - - ^ email subject \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/recipients.st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/recipients.st new file mode 100644 index 00000000..fa053428 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/recipients.st @@ -0,0 +1,4 @@ +email access +recipients + + ^ self email to joinSeparatedBy: ';' \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/sender.st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/sender.st new file mode 100644 index 00000000..e179743d --- /dev/null +++ b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/sender.st @@ -0,0 +1,4 @@ +email access +sender + + ^ self email from \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/subject.st b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/subject.st new file mode 100644 index 00000000..28fb411f --- /dev/null +++ b/packages/IMAPClient-UI.package/ICEmailDialog.class/instance/subject.st @@ -0,0 +1,4 @@ +email access +subject + + ^ self email subject ifEmpty: [^ self class defaultSubject] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICEmailDialog.class/methodProperties.json b/packages/IMAPClient-UI.package/ICEmailDialog.class/methodProperties.json index b6d9e2e8..571359b4 100644 --- a/packages/IMAPClient-UI.package/ICEmailDialog.class/methodProperties.json +++ b/packages/IMAPClient-UI.package/ICEmailDialog.class/methodProperties.json @@ -1,16 +1,20 @@ { "class" : { + "defaultSubject" : "tg 7/19/2019 11:48", "open" : "ms 7/9/2016 16:43", "openWith:" : "ms 7/9/2016 16:56" }, "instance" : { - "buildWith:" : "C.G. 7/25/2018 14:14", + "body" : "tg 7/26/2019 21:40", + "buildBody:" : "pm 6/25/2019 16:29", + "buildRecipient:" : "pm 6/25/2019 16:29", + "buildSenderLabel:" : "pm 6/25/2019 16:28", + "buildSubject:" : "pm 6/25/2019 16:28", + "buildWith:" : "pm 6/25/2019 16:36", "checkBoxColor" : "ms 7/13/2016 17:34", "defaultBackgroundColor" : "ms 7/11/2016 16:34", - "dialogTitle" : "ms 7/9/2016 17:31", + "dialogTitle" : "pm 6/3/2019 18:42", "email" : "ms 7/9/2016 16:56", - "email:" : "C.G. 7/25/2018 14:14", - "getBody" : "C.G. 7/25/2018 14:14", - "getColor" : "C.G. 7/25/2018 14:15", - "getRecipients" : "ms 7/10/2016 13:56", - "getSender" : "ms 7/10/2016 13:56", - "getSubject" : "ms 7/9/2016 17:16" } } + "email:" : "pm 6/9/2019 17:01", + "recipients" : "tg 7/26/2019 21:40", + "sender" : "tg 7/26/2019 21:40", + "subject" : "tg 7/26/2019 21:40" } } diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/class/addUserIcon.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/class/addUserIcon.st new file mode 100644 index 00000000..8b1e771e --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/class/addUserIcon.st @@ -0,0 +1,10 @@ +constants +addUserIcon + "The 'user-plus' icon taken from https://fontawesome.com/icons/user-plus as 20@16. + Licensed under https://fontawesome.com/license." + ^ Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: +'iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAAzElEQVR4Xq2RMQrCQBBFcwyR +WOdqWqRIZZtCwc4DiOkNgRwg2uUi2hlUTCoFMf6FvxDC7oQsDrxidz6P3RnPUDOQgYbkIPAc +S8nuoO3xYG90ZQaZJnURNoKw/rfwaciH7IU2YS4ID4Z8zF5sEwZcQF92A34ntwBLULBf8Dy3 +bTrlzGq+zO9lWgGnisAGlJSUPEc6MAUJqMAHHMGWnHinenswGZqhkl0GvtHl3JEat5yMkGl2 +0jwqB+FVErYOfCXh20H4koTrkVKVXdlkPz8IoEMpApVWAAAAAElFTkSuQmCC' readStream) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/class/install.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/class/install.st new file mode 100644 index 00000000..32f2854b --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/class/install.st @@ -0,0 +1,8 @@ +instance creation +install + + TheWorldMenu registerOpenCommand: { + 'IMAP Client'. + { self. #new }. + 'Start the IMAP Client' + } \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/class/loadEmailBodyFailure.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/class/loadEmailBodyFailure.st new file mode 100644 index 00000000..45efd4f0 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/class/loadEmailBodyFailure.st @@ -0,0 +1,6 @@ +errors +loadEmailBodyFailure + + ^ 'Loading Body of the Mail failed. + This typically happens it the Mails was moved/deleted on another device. + Use Update Button to update Mailbox Status.' \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/accountsComplete.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/accountsComplete.st index 3f830aac..cfa79b23 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/accountsComplete.st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/accountsComplete.st @@ -1,13 +1,12 @@ accountManagment accountsComplete - "all accounts are have received their password" - - self emailAccounts: (ICHelper accountDictionariesToEndpoints: (self initializedAccounts)). + self emailAccounts: (self initializedAccounts collect: [:configData | + ICEndPoint new connectAndLoginWith: (ICAccountInfo newWith: configData)]). "let all Endpoints preload their file structure and configure them to prevent timeouts" self emailAccounts do: [:endpoint | - self getFolderWith: endpoint. + self folderWith: endpoint. endpoint preventTimeout]. ToolBuilder default open: self \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/addAccount..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/addAccount..st index cc899de0..5cc02393 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/addAccount..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/addAccount..st @@ -1,11 +1,6 @@ accountManagment -addAccount: aDataDictionary - - | data | +addAccount: anAccountInfo - data := OrderedCollection new. - data add: aDataDictionary. - - ICHelper saveCredentialsIntoFile: aDataDictionary. - self emailAccounts add: ((ICHelper accountDictionariesToEndpoints: data) at: 1). + ICEndPoint addConfiguration: anAccountInfo asDictionary. + self emailAccounts add: (ICEndPoint new connectAndLoginWith: anAccountInfo). self changed: #emailAccounts \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/addPasswordToCollection..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/addPasswordToCollection..st deleted file mode 100644 index 2e55f2f1..00000000 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/addPasswordToCollection..st +++ /dev/null @@ -1,17 +0,0 @@ -accountManagment -addPasswordToCollection: aDictionary - - "this is the callback method for the ICPasswordPrompt" - - | nextAccount | - - self initializedAccounts add: aDictionary. - - "delete the newly initialized account from uninitializedAccounts" - nextAccount := self uninitializedAccounts findFirst: [:account | (account at: 'name') = (aDictionary at: 'name')]. - self uninitializedAccounts removeAt: nextAccount. - - "if there are yet uninitializedAccounts, open a ICPasswordPrompt for them" - (uninitializedAccounts isEmpty) - ifTrue: [self accountsComplete] - ifFalse: [ICPasswordDialog openWith: (self uninitializedAccounts first) and: self] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildAddAccountButton..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildAddAccountButton..st new file mode 100644 index 00000000..dd6e476d --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildAddAccountButton..st @@ -0,0 +1,8 @@ +toolbuilder +buildAddAccountButton: builder + + ^ builder pluggableButtonSpec new + model: self; + frame: (0.8 @ 0 corner: 1 @ 0.05); + label: self class addUserIcon; + action: #createAccount \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildEmailButton..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildEmailButton..st new file mode 100644 index 00000000..b5cf275b --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildEmailButton..st @@ -0,0 +1,8 @@ +toolbuilder +buildEmailButton: builder + + ^ builder pluggableButtonSpec new + model: self; + frame: (0 @ 0 corner: 0.8 @ 0.05); + label: 'Update'; + action: #update \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildEmailList..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildEmailList..st new file mode 100644 index 00000000..f20c1d74 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildEmailList..st @@ -0,0 +1,25 @@ +toolbuilder +buildEmailList: builder + + ^ builder pluggableTreeSpec new + model: self; + roots: #emailsOfSelectedFolder; + label: #labelForMail:; + setSelected: #selectedEmail:; + getSelected: #selectedEmail; + doubleClick: #openEmail:; + keyPress: #emailListKeyPress:; + hScrollBarPolicy: #always; + vScrollBarPolicy: #always; + menu: #emailListMenu:; + autoDeselect: false; + columns: { + [:listMorph | self emphasizeUnseenMessages: listMorph filteredItems. + (listMorph filteredItems collect: [:item | + item preferredWidthOfColumn: 1]) max]. + [:listMorph | (listMorph filteredItems collect: [:item | + item preferredWidthOfColumn: 2]) max]. + [:listMorph | (listMorph filteredItems collect: [:item | + item preferredWidthOfColumn: 3]) max].}; + frame: (0.2 @ 0.05 extent: 0.8 @ 0.95); + color: (Color white) diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildEmailSearch..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildEmailSearch..st new file mode 100644 index 00000000..508f5b93 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildEmailSearch..st @@ -0,0 +1,12 @@ +toolbuilder +buildEmailSearch: builder + + ^ builder pluggableInputFieldSpec new + model: self; + frame: (0 @ 0 extent: 0.8 @ 1); + editText: #changeFilter:; + setText: #filterString:; + getText: #filterString; + help: #emailSearchHelp; + askBeforeDiscardingEdits: true; + indicateUnacceptedChanges: false \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildEmailTopPanel..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildEmailTopPanel..st new file mode 100644 index 00000000..6f6375c6 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildEmailTopPanel..st @@ -0,0 +1,10 @@ +toolbuilder +buildEmailTopPanel: builder + + ^ builder pluggablePanelSpec new + wantsResizeHandles: true; + model: self; + frame: (0.2 @ 0 extent: 0.8 @ 0.05); + children: { + self buildEmailSearch: builder. + self buildLoadOlderEmailsButton: builder} \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildFolderTree..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildFolderTree..st new file mode 100644 index 00000000..52a64115 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildFolderTree..st @@ -0,0 +1,19 @@ +toolbuilder +buildFolderTree: builder + + ^ builder pluggableTreeSpec new + model: self; + roots: #childFolders; + setSelected: #selectedFolder:; + getSelected: #selectedFolder; + getChildren: #subFoldersOf:; + label: #labelForFolder:; + autoDeselect: false; + frame: (0 @ 0.15 corner: 1 @ 1); + columns: { + [:listMorph | self emphasizeUnseenFolders: listMorph filteredItems. + (listMorph filteredItems collect: [:item | + item preferredWidthOfColumn: 1]) max]. + [:listMorph | + (listMorph filteredItems collect: [:item | + item preferredWidthOfColumn: 2]) max]} \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildLoadOlderEmailsButton..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildLoadOlderEmailsButton..st new file mode 100644 index 00000000..446c7f24 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildLoadOlderEmailsButton..st @@ -0,0 +1,8 @@ +toolbuilder +buildLoadOlderEmailsButton: builder + + ^ builder pluggableButtonSpec new + model: self; + frame: (0.8 @ 0 extent: 0.2 @ 1); + label: 'Load older Emails'; + action: #loadOlderEmails \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildNavigationPanel..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildNavigationPanel..st new file mode 100644 index 00000000..1a3e4295 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildNavigationPanel..st @@ -0,0 +1,12 @@ +toolbuilder +buildNavigationPanel: builder + + ^ builder pluggablePanelSpec new + wantsResizeHandles: true; + model: self; + frame: (0 @ 0 extent: 0.2 @ 1); + children: { + self buildAddAccountButton: builder. + self buildEmailButton: builder. + self buildUserList: builder. + self buildFolderTree: builder} \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildUserList..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildUserList..st new file mode 100644 index 00000000..e637e95a --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildUserList..st @@ -0,0 +1,19 @@ +toolbuilder +buildUserList: builder + + ^ builder pluggableTreeSpec new + model: self; + roots: #emailAccounts; + label: #labelForAccount:; + menu: #userListMenu:; + autoDeselect: false; + getSelected: #selectedEndpoint; + setSelected: #selectedEndpoint:; + frame: (0 @ 0.05 corner: 1 @ 0.15); + columns: { + [:listMorph | self emphasizeUnseenAccounts: listMorph filteredItems. + (listMorph filteredItems collect: [:item | + item preferredWidthOfColumn: 1]) max]. + [:listMorph | + (listMorph filteredItems collect: [:item | + item preferredWidthOfColumn: 2]) max]} \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildWith..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildWith..st index 487e10ae..1dea84cf 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildWith..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/buildWith..st @@ -1,101 +1,13 @@ toolbuilder buildWith: builder - | window windowSpec emailButtonSpec addAccountButtonSpec userListSpec folderTreeSpec emailListSpec emailSearchSpec | - - windowSpec := builder pluggableWindowSpec new. - windowSpec + ^ builder build: (builder pluggableWindowSpec new model: self; label: self dialogTitle; children: OrderedCollection new; closeAction: #closeConnection; - extent: 1200 @ 600. - - userListSpec := builder pluggableTreeSpec new. - userListSpec - model: self; - roots: #emailAccounts; - label: #labelForAccount:; - menu: #userListMenu:; - autoDeselect: false; - getSelected: #selectedAccount; - setSelected: #selectedAccount:; - frame: (0 @ 0.05 extent: 0.2 @ 0.1); - columns: { - [:listMorph | self emphasizeUnseenAccounts: listMorph filteredItems. - (listMorph filteredItems collect: [:item | - item preferredWidthOfColumn: 1]) max]. - [:listMorph | - (listMorph filteredItems collect: [:item | - item preferredWidthOfColumn: 2]) max]}. - - emailButtonSpec := builder pluggableButtonSpec new. - emailButtonSpec - model: self; - frame: (0 @ 0 extent: 0.15 @ 0.05); - label: 'Update'; - action: #update. - - addAccountButtonSpec := builder pluggableButtonSpec new. - addAccountButtonSpec - model: self; - frame: (0.15 @ 0 extent: 0.05 @ 0.05); - label: '+'; - action: #addAccountButton. - - folderTreeSpec := builder pluggableTreeSpec new. - folderTreeSpec - model: self; - roots: #childFolders; - setSelected: #selectedFolder:; - getSelected: #selectedFolder; - getChildren: #subFoldersOf:; - label: #labelForFolder:; - autoDeselect: false; - frame: (0 @ 0.15 extent: 0.2 @ 0.85); - columns: { - [:listMorph | self emphasizeUnseenFolders: listMorph filteredItems. - (listMorph filteredItems collect: [:item | - item preferredWidthOfColumn: 1]) max]. - [:listMorph | - (listMorph filteredItems collect: [:item | - item preferredWidthOfColumn: 2]) max]}. - - emailSearchSpec := builder pluggableInputFieldSpec new. - emailSearchSpec - model: self; - frame: (0.2 @ 0 extent: 0.8 @ 0.05); - askBeforeDiscardingEdits: false; - editText: #changeFilter:; - help: #emailSearchHelp; - indicateUnacceptedChanges: false. - - emailListSpec := builder pluggableTreeSpec new. - emailListSpec - model: self; - roots: #emailsOfSelectedFolder; - label: #labelForMail:; - setSelected: #selectedEmail:; - getSelected: #selectedEmail; - hScrollBarPolicy: #always; - vScrollBarPolicy: #always; - menu: #emailListMenu:; - autoDeselect: false; - columns: { - [:listMorph | self emphasizeUnseenMessages: listMorph filteredItems. - (listMorph filteredItems collect: [:item | - item preferredWidthOfColumn: 1]) max]. - [:listMorph | (listMorph filteredItems collect: [:item | - item preferredWidthOfColumn: 2]) max]. - [:listMorph | (listMorph filteredItems collect: [:item | - item preferredWidthOfColumn: 3]) max].}; - frame: (0.2 @ 0.05 extent: 0.8 @ 0.95); - color: (Color white). - - windowSpec children - addAll: {emailButtonSpec . addAccountButtonSpec . userListSpec . folderTreeSpec . emailListSpec . emailSearchSpec}. - - window := builder build: windowSpec. - window on: #keyStroke send: #keyEvent: to: self. - - ^ window \ No newline at end of file + extent: 1200 @ 600; + children: { + self buildNavigationPanel: builder. + self buildEmailTopPanel: builder. + self buildEmailList: builder.}) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/changeAccounts..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/changeAccounts..st deleted file mode 100644 index 186f2d96..00000000 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/changeAccounts..st +++ /dev/null @@ -1,15 +0,0 @@ -accountManagment -changeAccounts: anAccount - - - anAccount ifNil: [^self]. - self getFolderWith: anAccount. - - self rootFolder: (Array with: anAccount rootFolder). - self selectedFolder: nil. - - self - changed: #selectedFolder; - changed: #rootFolder; - changed: #childFolders; - changed: #emailsOfSelectedFolder \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/changeFilter..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/changeFilter..st index e1194e18..224f74c4 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/changeFilter..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/changeFilter..st @@ -1,6 +1,5 @@ get emails changeFilter: aText - self filterString: aText asString; changed: #emailsOfSelectedFolder \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/childFolders.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/childFolders.st index a5aa1a51..be96dc53 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/childFolders.st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/childFolders.st @@ -4,4 +4,4 @@ childFolders (self rootFolder) ifNil: [^ OrderedCollection new]. - ^ (self rootFolder at: 1) childFolders \ No newline at end of file + ^ self rootFolder childFolders \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/closeConnection.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/closeConnection.st index f71d81af..9182388a 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/closeConnection.st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/closeConnection.st @@ -3,6 +3,6 @@ closeConnection (self rootFolder) ifNotNil: [ - [self rootFolder first endpoint close] + [self rootFolder endpoint close] on: Error do: [:e | self inform: 'Error occured during closing:', e]] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/addAccountButton.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/createAccount.st similarity index 71% rename from packages/IMAPClient-UI.package/ICFolderDialog.class/instance/addAccountButton.st rename to packages/IMAPClient-UI.package/ICFolderDialog.class/instance/createAccount.st index fc80944d..5f99a9c0 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/addAccountButton.st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/createAccount.st @@ -1,4 +1,4 @@ accountManagment -addAccountButton +createAccount ICLoginDialog open: self \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/deleteAccountButton..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/deleteAccountButton..st index ec7206d9..0a4e5158 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/deleteAccountButton..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/deleteAccountButton..st @@ -1,8 +1,8 @@ accountManagment -deleteAccountButton: account +deleteAccountButton: anICEndpoint - ICHelper deleteAccountFromEndpoint: account. - self emailAccounts remove: account. + ICEndPoint removeConfiguration: (anICEndpoint accountInfo asDictionary). + self emailAccounts remove: anICEndpoint. self selectedFolder: nil. self rootFolder: nil. diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/deleteEmail.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/deleteEmail.st index 0cac9260..4183aaeb 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/deleteEmail.st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/deleteEmail.st @@ -1,11 +1,11 @@ email selection deleteEmail - - selectedEmail retrieveFlags. - (selectedEmail deleted) - ifTrue: [selectedEmail expungeEmails] - ifFalse: [selectedEmail deleteEmail]. + self selectedEmail retrieveFlags. + + (self selectedEmail deleted) + ifTrue: [self selectedEmail expungeEmails] + ifFalse: [self selectedEmail deleteEmail]. self selectedEmail: nil. self diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/editAccount.with..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/editAccount.with..st index 5622225e..8735fce3 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/editAccount.with..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/editAccount.with..st @@ -1,25 +1,14 @@ accountManagment -editAccount: newData with: anEndPoint +editAccount: anAccountInfo with: anEndPoint - "callback method for dialog. newData contains the updated Data, while previousData - contains the old data" - - | data | - - data := OrderedCollection new. - data add: newData. - - ICHelper deleteAccountFromEndpoint: anEndPoint. + ICEndPoint removeConfiguration: anEndPoint. self emailAccounts remove: anEndPoint. - ICHelper saveCredentialsIntoFile: newData. + ICEndPoint addConfiguration: anAccountInfo asDictionary. - self emailAccounts add: ((ICHelper accountDictionariesToEndpoints: data) at: 1). + self emailAccounts add: (ICEndPoint new connectAndLoginWith: anAccountInfo). self selectedFolder: nil. self rootFolder: nil. - self changed: #selectedFolder. - self changed: #rootFolder. - self changed: #childFolders. - self changed: #emailsOfSelectedFolder. - self changed: #emailAccounts \ No newline at end of file + self triggerBasicChanges. + self changed: #emailAccounts. \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/editAccountButton..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/editAccountButton..st index c6ef5787..421840ef 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/editAccountButton..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/editAccountButton..st @@ -1,6 +1,4 @@ accountManagment editAccountButton: account - - "open dialog with existing data" ICLoginDialog open: self with: account \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailListKeyPress..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailListKeyPress..st new file mode 100644 index 00000000..864f8814 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailListKeyPress..st @@ -0,0 +1,8 @@ +events +emailListKeyPress: aKey + + self emailListKeyPressMapping at: (aKey asLowercase) ifPresent: [ :anAction | + anAction value. + ^ true + ] ifAbsent: [^ false]. + ^ false \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailListKeyPressMapping.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailListKeyPressMapping.st new file mode 100644 index 00000000..31d61b81 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailListKeyPressMapping.st @@ -0,0 +1,6 @@ +events +emailListKeyPressMapping + + ^ { + $o -> [self selectedEmail ifNotNil: [self openEmail: self selectedEmail]] + } asDictionary \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailListMenu..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailListMenu..st index de27fd88..b048e043 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailListMenu..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailListMenu..st @@ -3,9 +3,6 @@ emailListMenu: aMenu self selectedEmail ifNil: [^ aMenu]. - "ICLoadOlderMail shouldnt open context menu" - self selectedEmail isFlaggable ifFalse: [^ aMenu]. - "update the flags of the mail" self selectedEmail retrieveFlags. @@ -18,7 +15,7 @@ emailListMenu: aMenu ifTrue: ['Unflag'] ifFalse: ['Mark as flagged']) action: [self modifyFlag: #flagged]; - add: (self labelForDeletionAction: self selectedEmail folder name) + add: (self labelForDeletionAction: self selectedEmail folder folderName) action: #deleteEmail; add: 'Move to ...' subMenu: self folderListMenu. diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailsOfSelectedFolder.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailsOfSelectedFolder.st index 40266bef..de884035 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailsOfSelectedFolder.st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/emailsOfSelectedFolder.st @@ -11,6 +11,5 @@ emailsOfSelectedFolder self filterString notEmpty ifTrue: [^ emails select: [:anICEmail | (self labelForMail: anICEmail) includesSubstring: self filterString caseSensitive: false]]. - emails add: (ICLoadOlderMail instanceFor: self). ^ emails \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/filterString..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/filterString..st index c0aff2bc..9829058d 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/filterString..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/filterString..st @@ -1,4 +1,3 @@ accessing filterString: aString - filterString := aString \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/folderListMenu.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/folderListMenu.st index 9231eb69..543502b6 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/folderListMenu.st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/folderListMenu.st @@ -4,7 +4,7 @@ folderListMenu | aMenu folders | aMenu := MenuMorph new. - folders := ICHelper getAllFolders: ((self rootFolder) asOrderedCollection). + folders := self rootFolder recursiveChildFolders. folders allButFirst do: [:each | aMenu diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/folderNameOf..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/folderNameOf..st index abcf6f3b..d8a45400 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/folderNameOf..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/folderNameOf..st @@ -1,8 +1,5 @@ folder selection folderNameOf: folder - - "folder is a child of a folder, which is not the root folder - this is an easy way to indent entries" | levelCounter offset currentFolder | @@ -10,11 +7,11 @@ folderNameOf: folder offset := ''. currentFolder := folder. - [(currentFolder parent ~= currentFolder) and: (currentFolder parent ~= (self rootFolder at:1))] + [(currentFolder parent ~= currentFolder) and: [(currentFolder parent ~= self rootFolder)]] whileTrue: [ levelCounter := levelCounter + 1. currentFolder := currentFolder parent]. 1 to: levelCounter do: [ :i | offset := offset , ' ']. - ^ offset, folder name \ No newline at end of file + ^ offset, folder folderName \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/getFolderWith..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/folderWith..st similarity index 80% rename from packages/IMAPClient-UI.package/ICFolderDialog.class/instance/getFolderWith..st rename to packages/IMAPClient-UI.package/ICFolderDialog.class/instance/folderWith..st index f088ed62..f99b3365 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/getFolderWith..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/folderWith..st @@ -1,5 +1,5 @@ folder selection -getFolderWith: endpoint +folderWith: endpoint ^ endpoint checkConnected; diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/initialize.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/initialize.st index 213e8d93..b9c96055 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/initialize.st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/initialize.st @@ -1,14 +1,8 @@ initialization initialize - - "get config data as credentials" - - | accounts | - - accounts := ICHelper loadCredentialsIntoDictionaries. - - self uninitializedAccounts: accounts. - self initializedAccounts: OrderedCollection new. + + self uninitializedAccounts: ICEndPoint connectionConfigurations. + (self uninitializedAccounts) ifEmpty: [self accountsComplete] diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/initializedAccounts..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/initializedAccounts..st index e5105c6f..7186d8e3 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/initializedAccounts..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/initializedAccounts..st @@ -1,4 +1,4 @@ accessing -initializedAccounts: anObject +initializedAccounts: anOrderedCollection - initializedAccounts := anObject \ No newline at end of file + initializedAccounts := anOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/initializedAccounts.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/initializedAccounts.st index 67b5cf96..5531621b 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/initializedAccounts.st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/initializedAccounts.st @@ -1,4 +1,4 @@ accessing initializedAccounts - ^ initializedAccounts \ No newline at end of file + ^ initializedAccounts ifNil: [initializedAccounts := OrderedCollection new] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/keyEvent..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/keyEvent..st deleted file mode 100644 index b28c333d..00000000 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/keyEvent..st +++ /dev/null @@ -1,4 +0,0 @@ -events -keyEvent: aKey - - "do nothing for the moment." \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/labelForAccount..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/labelForAccount..st index ccb84e28..62b54535 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/labelForAccount..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/labelForAccount..st @@ -5,5 +5,5 @@ labelForAccount: anICEndpoint countOfUnseenMails := anICEndpoint rootFolder numOfUnseenMails. countOfUnseenMails > 0 - ifTrue: [^ anICEndpoint name, Character tab, '[' , countOfUnseenMails asString, ']'] - ifFalse: [^ anICEndpoint name, Character tab, ''] \ No newline at end of file + ifTrue: [^ anICEndpoint accountInfo accountName, Character tab, '[' , countOfUnseenMails asString, ']'] + ifFalse: [^ anICEndpoint accountInfo accountName, Character tab, ''] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/labelForFolder..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/labelForFolder..st index 69929e5c..167f3cdd 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/labelForFolder..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/labelForFolder..st @@ -5,5 +5,5 @@ labelForFolder: anICFolder countOfUnseenMails := anICFolder numOfUnseenMails. countOfUnseenMails > 0 - ifTrue: [^ anICFolder name, Character tab, '[', countOfUnseenMails asString, ']'] - ifFalse: [^ anICFolder name, Character tab, ''] \ No newline at end of file + ifTrue: [^ anICFolder folderName, Character tab, '[', countOfUnseenMails asString, ']'] + ifFalse: [^ anICFolder folderName, Character tab, ''] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/labelForMail..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/labelForMail..st index c5897e3f..8043756b 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/labelForMail..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/labelForMail..st @@ -1,17 +1,18 @@ email selection labelForMail: anICEmail - | fromCollection label | + | fromCollection subject label | fromCollection := anICEmail from findBetweenSubStrs: '<>'. - label := (anICEmail subject truncateTo: 80), + subject := anICEmail subject ifEmpty: [ICEmailDialog defaultSubject]. + + label := (subject truncateTo: 80), Character tab, (fromCollection at: 2 ifAbsent: [fromCollection at: 1 ifAbsent: ['']]), Character tab, - anICEmail getDateFormatted. + anICEmail dateFormatted. - (anICEmail isFlaggable) ifFalse: [^ label]. (anICEmail flagged) ifTrue: [label := '[FLAGGED] ', label]. ^ label \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/loadOlderEmails.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/loadOlderEmails.st index 2245a8c9..abad232b 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/loadOlderEmails.st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/loadOlderEmails.st @@ -1,4 +1,6 @@ get emails loadOlderEmails - [self loadOlderEmailsProcess ] forkAt: Processor userBackgroundPriority \ No newline at end of file + + self selectedFolder ifNotNil: [ + [self loadOlderEmailsProcess ] forkAt: Processor userBackgroundPriority] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/modifyFlag..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/modifyFlag..st index 32a01f00..16239c17 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/modifyFlag..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/modifyFlag..st @@ -1,8 +1,8 @@ flags modifyFlag: aFlag - - selectedEmail modifyFlag: aFlag. - selectedEmail retrieveFlags. + + self selectedEmail modifyFlag: aFlag. + self selectedEmail retrieveFlags. self changed: #emailsOfSelectedFolder; diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/moveEmail..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/moveEmail..st index 310cd879..3ea78beb 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/moveEmail..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/moveEmail..st @@ -1,7 +1,7 @@ email selection moveEmail: aFolder - selectedEmail moveEmail: aFolder. + self selectedEmail moveEmail: aFolder. self selectedEmail: nil. self changed: #emailsOfSelectedFolder; diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/numberOfFetchedFolders..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/numberOfFetchedFolders..st index 539c0ad1..386ef70d 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/numberOfFetchedFolders..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/numberOfFetchedFolders..st @@ -1,4 +1,4 @@ accessing -numberOfFetchedFolders: anObject +numberOfFetchedFolders: aNumber - numberOfFetchedFolders := anObject \ No newline at end of file + numberOfFetchedFolders := aNumber \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/numberOfFolders..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/numberOfFolders..st index 479219b0..ffd082d2 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/numberOfFolders..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/numberOfFolders..st @@ -1,4 +1,4 @@ accessing -numberOfFolders: anObject +numberOfFolders: aNumber - numberOfFolders := anObject \ No newline at end of file + numberOfFolders := aNumber \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/openEmail..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/openEmail..st index fedd744f..585d106d 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/openEmail..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/openEmail..st @@ -1,15 +1,11 @@ email selection openEmail: anICEmail - [anICEmail open. - anICEmail isFlaggable - ifTrue: [ - selectedEmail retrieveFlags. - self - changed: #emailsOfSelectedFolder; - changed: #childFolders; - changed: #emailAccounts]] + self selectedEmail retrieveFlags. + self + changed: #emailsOfSelectedFolder; + changed: #childFolders; + changed: #emailAccounts] on: Error - do: [:sig | self inform: 'Loading Body of the Mail failed. - This typically happens it the Mails was moved/deleted on another device. Use Update Button to update Mailbox Status.'] \ No newline at end of file + do: [:e | self inform: self class loadEmailBodyFailure] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/passwordPromtCallback..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/passwordPromtCallback..st new file mode 100644 index 00000000..22b78aa4 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/passwordPromtCallback..st @@ -0,0 +1,14 @@ +accountManagment +passwordPromtCallback: aDictionary + + | nextAccount | + + self initializedAccounts add: aDictionary. + + nextAccount := self uninitializedAccounts findFirst: [:account | + (account at: 'accountName') = (aDictionary at: 'accountName')]. + self uninitializedAccounts removeAt: nextAccount. + + (self uninitializedAccounts isEmpty) + ifTrue: [self accountsComplete] + ifFalse: [ICPasswordDialog openWith: (self uninitializedAccounts first) and: self] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/progressCallback.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/progressCallback.st index 286761ac..0480c81c 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/progressCallback.st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/progressCallback.st @@ -1,8 +1,6 @@ get emails progressCallback - "every time this method is called, the number of headers to fetch will be reduced by one" - | result | result := (1 / (self numberOfFolders)) * (self numberOfFetchedFolders). diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/rootFolder..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/rootFolder..st index 39b879e0..b5caae36 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/rootFolder..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/rootFolder..st @@ -1,4 +1,4 @@ accessing -rootFolder: anObject +rootFolder: anICFolder - rootFolder := anObject \ No newline at end of file + rootFolder := anICFolder \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedAccount..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedAccount..st deleted file mode 100644 index 63d976c8..00000000 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedAccount..st +++ /dev/null @@ -1,8 +0,0 @@ -accessing -selectedAccount: anObject - - (anObject = self selectedAccount) - ifFalse: [ - selectedAccount := anObject. - self changeAccounts: anObject. - self changed: #selectedAccount] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedAccount.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedAccount.st deleted file mode 100644 index a8431814..00000000 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedAccount.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -selectedAccount - - ^ selectedAccount \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedEmail..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedEmail..st index 76c3ba05..a87675b8 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedEmail..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedEmail..st @@ -1,9 +1,5 @@ accessing -selectedEmail: anObject +selectedEmail: anEmail - ((anObject == self selectedEmail) and: anObject isNil not) - ifTrue: [ - self openEmail: anObject]. - - selectedEmail := anObject. + selectedEmail := anEmail. self changed: #selectedEmail \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedEndpoint..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedEndpoint..st new file mode 100644 index 00000000..d27fc372 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedEndpoint..st @@ -0,0 +1,7 @@ +accessing +selectedEndpoint: anICEndpoint + + (anICEndpoint = self selectedEndpoint) + ifFalse: [ + selectedEndpoint := anICEndpoint. + self switchToNewEndpoint] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedEndpoint.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedEndpoint.st new file mode 100644 index 00000000..a885db2a --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/selectedEndpoint.st @@ -0,0 +1,4 @@ +accessing +selectedEndpoint + + ^ selectedEndpoint \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/switchToNewEndpoint.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/switchToNewEndpoint.st new file mode 100644 index 00000000..875505a6 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/switchToNewEndpoint.st @@ -0,0 +1,12 @@ +accountManagment +switchToNewEndpoint + + + self selectedEndpoint ifNil: [^self]. + self folderWith: self selectedEndpoint. + + self rootFolder: self selectedEndpoint rootFolder. + self selectedFolder: nil. + + self triggerBasicChanges. + self changed: #selectedEndpoint \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/triggerBasicChanges.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/triggerBasicChanges.st new file mode 100644 index 00000000..7ba1a46a --- /dev/null +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/triggerBasicChanges.st @@ -0,0 +1,7 @@ +accountManagment +triggerBasicChanges + + self changed: #selectedFolder. + self changed: #rootFolder. + self changed: #childFolders. + self changed: #emailsOfSelectedFolder. \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/uninitializedAccounts..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/uninitializedAccounts..st index c07ea622..6eaf2105 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/uninitializedAccounts..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/uninitializedAccounts..st @@ -1,4 +1,4 @@ accessing -uninitializedAccounts: anObject +uninitializedAccounts: anOrderedCollection - uninitializedAccounts := anObject \ No newline at end of file + uninitializedAccounts := anOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/uninitializedAccounts.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/uninitializedAccounts.st index b5e2252b..a594da17 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/uninitializedAccounts.st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/uninitializedAccounts.st @@ -1,4 +1,4 @@ accessing uninitializedAccounts - ^ uninitializedAccounts \ No newline at end of file + ^ uninitializedAccounts ifNil: [uninitializedAccounts := OrderedCollection new] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/update.st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/update.st index ed1f8348..21947322 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/update.st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/update.st @@ -3,7 +3,8 @@ update self numberOfFetchedFolders: 0. self numberOfFolders: - (ICHelper getAllFolders: (self emailAccounts collect: [:each | each rootFolder])) size. + (self emailAccounts collect: [:each | each rootFolder recursiveChildFolders]) flatten size + + self emailAccounts size. 'Updating ' displaySequentialProgress: [self updateProcess]. self numberOfFetchedFolders: 0 \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/userListMenu..st b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/userListMenu..st index aa48674a..278a931f 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/userListMenu..st +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/instance/userListMenu..st @@ -2,7 +2,7 @@ folder selection userListMenu: aMenu aMenu - add: 'Edit' action: [self editAccountButton: self selectedAccount]; - add: 'Delete' action: [self deleteAccountButton: self selectedAccount]. + add: 'Edit' action: [self editAccountButton: self selectedEndpoint]; + add: 'Delete' action: [self deleteAccountButton: self selectedEndpoint]. ^ aMenu \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/methodProperties.json b/packages/IMAPClient-UI.package/ICFolderDialog.class/methodProperties.json index b88f1439..b7a68e64 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/methodProperties.json +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/methodProperties.json @@ -1,65 +1,79 @@ { "class" : { + "addUserIcon" : "fr 7/7/2019 10:43", + "install" : "pm 5/24/2019 14:28", + "loadEmailBodyFailure" : "tg 7/26/2019 16:19", "open" : "DH 7/19/2018 18:21" }, "instance" : { - "accountsComplete" : "C.G. 7/25/2018 14:15", - "addAccount:" : "C.G. 6/26/2018 11:04", - "addAccountButton" : "C.G. 6/26/2018 11:04", - "addPasswordToCollection:" : "C.G. 6/26/2018 11:05", - "buildWith:" : "C.G. 7/25/2018 14:15", - "changeAccounts:" : "C.G. 7/25/2018 14:16", + "accountsComplete" : "tg 7/25/2019 11:52", + "addAccount:" : "tg 7/25/2019 11:47", + "buildAddAccountButton:" : "tg 7/26/2019 22:07", + "buildEmailButton:" : "ok 6/20/2019 12:18", + "buildEmailList:" : "pm 6/26/2019 14:31", + "buildEmailSearch:" : "pm 6/26/2019 14:43", + "buildEmailTopPanel:" : "tg 7/26/2019 16:22", + "buildFolderTree:" : "ok 6/20/2019 12:19", + "buildLoadOlderEmailsButton:" : "pm 6/26/2019 14:43", + "buildNavigationPanel:" : "ok 6/20/2019 12:24", + "buildUserList:" : "tg 7/25/2019 20:19", + "buildWith:" : "pm 6/26/2019 14:43", "changeFilter:" : "lvm 7/3/2018 15:50", - "childFolders" : "C.G. 7/25/2018 14:16", - "closeConnection" : "C.G. 6/21/2018 00:19", + "childFolders" : "tg 7/26/2019 13:30", + "closeConnection" : "tg 7/26/2019 13:30", + "createAccount" : "fr 7/7/2019 09:59", "currentRemoteVatId" : "dl 6/23/2017 12:30", "defaultBackgroundColor" : "C.G. 7/25/2018 14:16", - "deleteAccountButton:" : "DH 6/19/2018 11:59", - "deleteEmail" : "C.G. 7/25/2018 14:16", + "deleteAccountButton:" : "tg 7/25/2019 20:28", + "deleteEmail" : "ok 7/26/2019 15:22", "dialogTitle" : "ms 6/26/2016 13:50", - "editAccount:with:" : "C.G. 7/25/2018 14:16", - "editAccountButton:" : "C.G. 7/25/2018 14:16", + "editAccount:with:" : "tg 7/26/2019 15:49", + "editAccountButton:" : "tg 7/26/2019 16:22", "emailAccounts" : "C.G. 7/25/2018 14:16", "emailAccounts:" : "C.G. 7/25/2018 14:16", - "emailListMenu:" : "DH 7/25/2018 00:04", + "emailListKeyPress:" : "tg 7/26/2019 15:53", + "emailListKeyPressMapping" : "pm 5/27/2019 14:00", + "emailListMenu:" : "tg 7/19/2019 09:30", "emailSearchHelp" : "lvm 7/3/2018 16:09", - "emailsOfSelectedFolder" : "DH 7/9/2018 21:22", + "emailsOfSelectedFolder" : "pm 6/26/2019 14:32", "emphasizeUnseenAccounts:" : "lvm 7/4/2018 11:18", "emphasizeUnseenFolders:" : "lvm 7/4/2018 11:18", "emphasizeUnseenMessages:" : "C.G. 6/21/2018 00:20", "filterString" : "lvm 6/26/2018 14:05", - "filterString:" : "7/9/2018 21:18:29", - "folderListMenu" : "C.G. 7/12/2018 08:14", - "folderNameOf:" : "C.G. 7/25/2018 14:18", - "getFolderWith:" : "DH 6/21/2018 20:22", - "initialize" : "DH 6/23/2018 16:23", + "filterString:" : "fr 6/3/2019 15:50", + "folderListMenu" : "tg 7/25/2019 11:35", + "folderNameOf:" : "tg 7/26/2019 22:03", + "folderWith:" : "pm 6/3/2019 18:47", + "initialize" : "tg 7/8/2019 14:56", "initializedAccounts" : "C.G. 7/25/2018 14:18", - "initializedAccounts:" : "C.G. 7/25/2018 14:18", - "keyEvent:" : "C.G. 7/25/2018 14:18", - "labelForAccount:" : "C.G. 7/25/2018 14:19", + "initializedAccounts:" : "pm 6/9/2019 17:02", + "labelForAccount:" : "tg 7/10/2019 18:39", "labelForDeletionAction:" : "C.G. 7/25/2018 14:19", - "labelForFolder:" : "C.G. 7/25/2018 14:19", - "labelForMail:" : "C.G. 6/26/2018 11:06", - "loadOlderEmails" : "C.G. 7/25/2018 14:19", + "labelForFolder:" : "tg 7/19/2019 09:19", + "labelForMail:" : "pm 6/26/2019 14:34", + "loadOlderEmails" : "tg 7/26/2019 14:49", "loadOlderEmailsProcess" : "DH 7/22/2018 22:02", - "modifyFlag:" : "DH 7/19/2018 19:52", - "moveEmail:" : "lvm 7/8/2018 11:46", + "modifyFlag:" : "tg 7/26/2019 13:52", + "moveEmail:" : "tg 7/26/2019 21:41", "numberOfFetchedFolders" : "C.G. 7/12/2018 08:14", - "numberOfFetchedFolders:" : "C.G. 7/12/2018 08:14", + "numberOfFetchedFolders:" : "pm 6/9/2019 17:03", "numberOfFolders" : "C.G. 7/12/2018 08:15", - "numberOfFolders:" : "C.G. 7/12/2018 08:15", - "openEmail:" : "C.G. 7/25/2018 14:20", - "progressCallback" : "C.G. 7/12/2018 08:15", + "numberOfFolders:" : "pm 6/9/2019 17:03", + "openEmail:" : "tg 7/26/2019 16:19", + "passwordPromtCallback:" : "tg 7/26/2019 21:41", + "progressCallback" : "tg 7/26/2019 16:21", "rootFolder" : "ms 6/26/2016 14:05", - "rootFolder:" : "C.G. 7/12/2018 08:15", - "selectedAccount" : "C.G. 7/25/2018 14:20", - "selectedAccount:" : "C.G. 7/25/2018 14:20", + "rootFolder:" : "pm 6/9/2019 17:03", "selectedEmail" : "ms 6/28/2016 11:17", - "selectedEmail:" : "C.G. 7/25/2018 14:20", + "selectedEmail:" : "pm 6/14/2019 14:45", + "selectedEndpoint" : "tg 7/25/2019 20:19", + "selectedEndpoint:" : "tg 7/25/2019 20:25", "selectedFolder" : "ms 6/28/2016 11:44", "selectedFolder:" : "DH 7/24/2018 23:59", "subFoldersOf:" : "ms 6/26/2016 14:10", - "uninitializedAccounts" : "C.G. 7/25/2018 14:21", + "switchToNewEndpoint" : "tg 7/26/2019 15:49", + "triggerBasicChanges" : "tg 7/26/2019 15:49", + "uninitializedAccounts" : "pm 6/9/2019 13:16", "uninitializedAccounts:" : "C.G. 7/25/2018 14:21", - "update" : "C.G. 7/12/2018 08:16", + "update" : "tg 7/25/2019 11:38", "updateProcess" : "C.G. 7/12/2018 08:16", - "userListMenu:" : "C.G. 6/21/2018 10:56" } } + "userListMenu:" : "tg 7/25/2019 20:27" } } diff --git a/packages/IMAPClient-UI.package/ICFolderDialog.class/properties.json b/packages/IMAPClient-UI.package/ICFolderDialog.class/properties.json index ecb491ea..75d0d4f3 100644 --- a/packages/IMAPClient-UI.package/ICFolderDialog.class/properties.json +++ b/packages/IMAPClient-UI.package/ICFolderDialog.class/properties.json @@ -8,7 +8,7 @@ "instvars" : [ "rootFolder", "selectedEmail", - "selectedAccount", + "selectedEndpoint", "selectedFolder", "emailAccounts", "uninitializedAccounts", diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/README.md b/packages/IMAPClient-UI.package/ICLoginDialog.class/README.md index ed856d02..8d000bb1 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/README.md +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/README.md @@ -1,4 +1,4 @@ -An ICLoginDialog is a toolbuilder-based UI for logging into an ICEndPoint and subsequently opening an ICFolderDialog. +An ICLoginDialog is a toolbuilder-based UI for adding new account configuration to the client which then can be authorized by the ICPasswordDialog. Instance Variables ssl: A boolean flag indicating whether SSL is enabled. \ No newline at end of file diff --git a/packages/IMAPClient-Core.package/ICServerInfo.class/class/defaultPort.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/class/defaultPort.st similarity index 79% rename from packages/IMAPClient-Core.package/ICServerInfo.class/class/defaultPort.st rename to packages/IMAPClient-UI.package/ICLoginDialog.class/class/defaultPort.st index 602a5a35..39383260 100644 --- a/packages/IMAPClient-Core.package/ICServerInfo.class/class/defaultPort.st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/class/defaultPort.st @@ -1,4 +1,4 @@ constants defaultPort - ^ -1 \ No newline at end of file + ^ 993 \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/class/failureLoginMessage.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/class/failureLoginMessage.st deleted file mode 100644 index 27135c7e..00000000 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/class/failureLoginMessage.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -failureLoginMessage - - ^ 'Login failed, please try again.' \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/class/getConfigNameFile.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/class/getConfigNameFile.st deleted file mode 100644 index 365453b0..00000000 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/class/getConfigNameFile.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -getConfigNameFile - - ^ 'config.txt' \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/class/inputParameterOrder.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/class/inputParameterOrder.st new file mode 100644 index 00000000..edf10301 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/class/inputParameterOrder.st @@ -0,0 +1,4 @@ +constants +inputParameterOrder + + ^ {'accountName'. 'address'. 'port'. 'username'. 'password'. 'ssl'} \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/class/open.with..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/class/open.with..st index 7d4d18f3..55e2de97 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/class/open.with..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/class/open.with..st @@ -6,7 +6,7 @@ open: aFolderDialogInstance with: anEndpoint instance := self new. instance folderDialogInstance: aFolderDialogInstance. - instance loadData: anEndpoint asDictionary. + instance loadData: anEndpoint asAccountInfoDictionary. instance updateMode: true. instance endpoint: anEndpoint. diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/class/successLoginMessage.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/class/successLoginMessage.st deleted file mode 100644 index 77821ef4..00000000 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/class/successLoginMessage.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -successLoginMessage - - ^ 'Successfully logged in!' \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/accountName..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/accountName..st index 23831192..1d5ff602 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/accountName..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/accountName..st @@ -1,8 +1,8 @@ accessing -accountName: anObject +accountName: aText - (self checkIfLastCharacterIsTab: anObject string) - ifFalse: [accountName := anObject string] + (self lastCharacterIsTab: aText string) + ifFalse: [accountName := aText string] ifTrue: [self changeInputField: 1]. self changed: #accountName \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/accountnameUnused..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/accountnameUnused..st new file mode 100644 index 00000000..82b020bc --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/accountnameUnused..st @@ -0,0 +1,8 @@ +helper +accountnameUnused: anAccountInfo + + ICEndPoint connectionConfigurations + detect: [:credDict | (anAccountInfo accountName) = (credDict at: 'accountName')] + ifFound: [:credDict | self displayAccountnameExistsErrorMessage. ^false] + ifNone: [^true]. + ^ false \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/allFieldsFilled..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/allFieldsFilled..st new file mode 100644 index 00000000..4fc39339 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/allFieldsFilled..st @@ -0,0 +1,9 @@ +helper +allFieldsFilled: anAccountInfo + + | possiblyEmptyParameters | + + possiblyEmptyParameters := self emptyParametersIn: anAccountInfo asDictionary. + self displayEmptyFieldErrorMessageIfNecessary: possiblyEmptyParameters. + + ^ possiblyEmptyParameters isEmpty \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildLoginButton..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildLoginButton..st new file mode 100644 index 00000000..fde2c3da --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildLoginButton..st @@ -0,0 +1,9 @@ +toolbuilder +buildLoginButton: builder + + ^ builder pluggableButtonSpec new + model: self; + label: #buttonLabel; + action: #login; + frame: (self guiElementXOffset @ (self guiElementYOffsetOf: 6) + extent: self guiElementWidth @ (self guiElementHeight * 1.0)) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildNameInputField..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildNameInputField..st new file mode 100644 index 00000000..9f1d5d49 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildNameInputField..st @@ -0,0 +1,12 @@ +toolbuilder +buildNameInputField: builder + + ^ builder pluggableInputFieldSpec new + model: self; + askBeforeDiscardingEdits: false; + indicateUnacceptedChanges: false; + getText: #accountName; + setText: #accountName:; + editText: #accountName:; + help: #nameHelpText; + frame: (self guiElementXOffset @ (self guiElementYOffsetOf: 0) extent: self guiElementWidth @ self guiElementHeight) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildPasswordInputField..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildPasswordInputField..st new file mode 100644 index 00000000..4c9ef8a7 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildPasswordInputField..st @@ -0,0 +1,13 @@ +toolbuilder +buildPasswordInputField: builder + + ^ builder pluggableInputFieldSpec new + model: self; + askBeforeDiscardingEdits: false; + indicateUnacceptedChanges: false; + getText: #password; + setText: #password:; + editText: #password:; + help: #passwordHelpText; + font: (StrikeFont passwordFontSize: 12); + frame: (self guiElementXOffset @ (self guiElementYOffsetOf: 4) extent: self guiElementWidth @ self guiElementHeight) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildServerAdressInputField..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildServerAdressInputField..st new file mode 100644 index 00000000..65ab6d6c --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildServerAdressInputField..st @@ -0,0 +1,12 @@ +toolbuilder +buildServerAdressInputField: builder + + ^ builder pluggableInputFieldSpec new + model: self; + askBeforeDiscardingEdits: false; + indicateUnacceptedChanges: false; + getText: #serverAddress; + setText: #serverAddress:; + editText: #serverAddress:; + help: #serverAdressHelpText; + frame: (self guiElementXOffset @ (self guiElementYOffsetOf: 1) extent: self guiElementWidth @ self guiElementHeight) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildServerPortInputField..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildServerPortInputField..st new file mode 100644 index 00000000..44ee3546 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildServerPortInputField..st @@ -0,0 +1,12 @@ +toolbuilder +buildServerPortInputField: builder + + ^ builder pluggableInputFieldSpec new + model: self; + askBeforeDiscardingEdits: false; + indicateUnacceptedChanges: false; + getText: #serverPort; + setText: #serverPort:; + editText: #serverPort:; + help: #serverPortHelpText; + frame: (self guiElementXOffset @ (self guiElementYOffsetOf: 2) extent: self guiElementWidth @ self guiElementHeight) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildSslCheckBox..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildSslCheckBox..st new file mode 100644 index 00000000..733b6dda --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildSslCheckBox..st @@ -0,0 +1,10 @@ +toolbuilder +buildSslCheckBox: builder + + ^ builder pluggableCheckBoxSpec new + model: self; + label: #sslCheckBoxLabel; + color: #checkBoxColor; + state: #ssl; + action: #toggleSSL; + frame: (self guiElementXOffset @ (self guiElementYOffsetOf: 5) extent: self guiElementWidth @ self guiElementHeight) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildUserInputField..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildUserInputField..st new file mode 100644 index 00000000..70e9799c --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildUserInputField..st @@ -0,0 +1,12 @@ +toolbuilder +buildUserInputField: builder + + ^ builder pluggableInputFieldSpec new + model: self; + askBeforeDiscardingEdits: false; + indicateUnacceptedChanges: false; + getText: #username; + setText: #username:; + editText: #username:; + help: #usernameHelpText; + frame: (self guiElementXOffset @ (self guiElementYOffsetOf: 3) extent: self guiElementWidth @ self guiElementHeight) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildWith..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildWith..st index b5cdf43b..e3fea289 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildWith..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buildWith..st @@ -1,120 +1,34 @@ toolbuilder buildWith: builder - | windowSpec nameInputFieldSpec serverAdressInputFieldSpec serverPortInputFieldSpec userInputFieldSpec passwordInputFieldSpec sslCheckBoxSpec loginButtonSpec window | + | window | - windowSpec := builder pluggableWindowSpec new. - windowSpec - model: self; - label: self dialogTitle; - extent: 300 @ 200; - children: OrderedCollection new. - - nameInputFieldSpec := builder pluggableInputFieldSpec new. - nameInputFieldSpec - model: self; - askBeforeDiscardingEdits: false; - indicateUnacceptedChanges: false; - getText: #accountName; - setText: #accountName:; - editText: #accountName:; - help: #nameHelpText; - frame: - (self guiElementXOffset @ (self guiElementYOffsetOf: 0) - extent: self guiElementWidth @ self guiElementHeight). - - serverAdressInputFieldSpec := builder pluggableInputFieldSpec new. - serverAdressInputFieldSpec - model: self; - askBeforeDiscardingEdits: false; - indicateUnacceptedChanges: false; - getText: #serverAddress; - setText: #serverAddress:; - editText: #serverAddress:; - help: #serverAdressHelpText; - frame: (self guiElementXOffset @ (self guiElementYOffsetOf: 1) extent: self guiElementWidth @ self guiElementHeight). - - serverPortInputFieldSpec := builder pluggableInputFieldSpec new. - serverPortInputFieldSpec - model: self; - askBeforeDiscardingEdits: false; - indicateUnacceptedChanges: false; - getText: #serverPort; - setText: #serverPort:; - editText: #serverPort:; - help: #serverPortHelpText; - frame: - (self guiElementXOffset @ (self guiElementYOffsetOf: 2) - extent: self guiElementWidth @ self guiElementHeight). - - userInputFieldSpec := builder pluggableInputFieldSpec new. - userInputFieldSpec - model: self; - askBeforeDiscardingEdits: false; - indicateUnacceptedChanges: false; - getText: #username; - setText: #username:; - editText: #username:; - help: #usernameHelpText; - frame: - (self guiElementXOffset @ (self guiElementYOffsetOf: 3) - extent: self guiElementWidth @ self guiElementHeight). - - passwordInputFieldSpec := builder pluggableInputFieldSpec new. - passwordInputFieldSpec - model: self; - askBeforeDiscardingEdits: false; - indicateUnacceptedChanges: false; - getText: #password; - setText: #password:; - editText: #password:; - help: #passwordHelpText; - font: (StrikeFont passwordFontSize: 12); - frame: - (self guiElementXOffset @ (self guiElementYOffsetOf: 4) - extent: self guiElementWidth @ self guiElementHeight). - - sslCheckBoxSpec := builder pluggableCheckBoxSpec new. - sslCheckBoxSpec - model: self; - frame: - (self guiElementXOffset @ (self guiElementYOffsetOf: 5) - extent: self guiElementWidth @ self guiElementHeight); - label: #sslCheckBoxLabel; - color: #checkBoxColor; - state: #ssl; - action: #toggleSSL. - - - loginButtonSpec := builder pluggableButtonSpec new. - loginButtonSpec - model: self; - frame: - (self guiElementXOffset @ (self guiElementYOffsetOf: 6) - extent: self guiElementWidth @ (self guiElementHeight * 1.0)); - label: #getButtonLabel; - action: #login. - - windowSpec children - addAll: {loginButtonSpec . serverAdressInputFieldSpec . serverPortInputFieldSpec . userInputFieldSpec . - nameInputFieldSpec . passwordInputFieldSpec . sslCheckBoxSpec}. - - window := builder build: windowSpec. - - window on: #keyStroke send: #keyEvent: to: self. - self loginMorph: window. self inputCollection: OrderedCollection new. - - "add listener to text fields - and hack to make the checkbox background transparent - can be removed once PluggableCheckBoxMorph starts using its color selector instead of default mint green - (bug in squeak)" - - window submorphsDo: [:m | + + window := (builder build: (builder pluggableWindowSpec new + model: self; + label: self dialogTitle; + extent: 300 @ 200; + children: { + self buildLoginButton: builder. + self buildServerAdressInputField: builder. + self buildServerPortInputField: builder. + self buildUserInputField: builder. + self buildNameInputField: builder. + self buildPasswordInputField: builder. + self buildSslCheckBox: builder})) + on: #keyStroke send: #keyEvent: to: self; + "add listener to text fields + and hack to make the checkbox background transparent + can be removed once PluggableCheckBoxMorph starts using its color selector instead of default mint green + (bug in squeak)" + submorphsDo: [:m | (m class == PluggableTextMorphPlus) ifTrue: [self inputCollection add: m. m textMorph on: #keyDown send: #keyEvent: to: self]. (m class == PluggableCheckBoxMorph) ifTrue: [m color: Color transparent]]. + self loginMorph: window. + ^ window \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/getButtonLabel.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buttonLabel.st similarity index 82% rename from packages/IMAPClient-UI.package/ICLoginDialog.class/instance/getButtonLabel.st rename to packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buttonLabel.st index 76c7e03c..6358aaab 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/getButtonLabel.st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/buttonLabel.st @@ -1,5 +1,5 @@ accessing -getButtonLabel +buttonLabel (self updateMode) ifTrue: [^ 'Update'] diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/changeInputField..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/changeInputField..st index e5e63c55..e9626a25 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/changeInputField..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/changeInputField..st @@ -13,8 +13,7 @@ changeInputField: currentIndex "get text of next input field - to select it" text := self perform: (correctSubmorph getTextSelector). text ifNotNil:[ - text size > 0 - ifTrue: [ + text ifNotEmpty: [ "select text of morph" correctSubmorph textMorph editor selectInterval: (1 to: (text size))]]. diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/checkForEmptyParameter..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/checkForEmptyParameter..st deleted file mode 100644 index c5e230f1..00000000 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/checkForEmptyParameter..st +++ /dev/null @@ -1,12 +0,0 @@ -as yet unclassified -checkForEmptyParameter: aCollection - - | possiblyEmptyParameters | - - possiblyEmptyParameters := self emptyParameterFrom: aCollection. - (possiblyEmptyParameters isEmpty) - ifFalse: [ - self displayEmptyFieldErrorMessage: possiblyEmptyParameters. - ^ false]. - - ^ true \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/checkIfLastCharacterIsTab..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/checkIfLastCharacterIsTab..st deleted file mode 100644 index 426173b1..00000000 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/checkIfLastCharacterIsTab..st +++ /dev/null @@ -1,6 +0,0 @@ -helper -checkIfLastCharacterIsTab: aString - - aString isEmpty ifTrue: [^ false]. - - ^ (aString last asciiValue == 9) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/constructEmptyFieldsErrorMessage..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/constructEmptyFieldsErrorMessage..st new file mode 100644 index 00000000..625b1ef8 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/constructEmptyFieldsErrorMessage..st @@ -0,0 +1,8 @@ +toasts +constructEmptyFieldsErrorMessage: aCollection + + aCollection sort: [:first :second | + (self class inputParameterOrder indexOf: first) < + (self class inputParameterOrder indexOf: second)]. + + ^ 'Please put in ', (aCollection fold: [:a :b | a, ', ', b]) , ' data' \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/createAccountInfo.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/createAccountInfo.st new file mode 100644 index 00000000..f9dd3c18 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/createAccountInfo.st @@ -0,0 +1,10 @@ +helper +createAccountInfo + + ^ ICAccountInfo new + accountName: self accountName asString; + host: self serverAddress asString; + port: self serverPort asNumber; + username: self username asString; + password: self password asString; + ssl: self ssl \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/displayAccountnameExistsErrorMessage.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/displayAccountnameExistsErrorMessage.st new file mode 100644 index 00000000..df9a2488 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/displayAccountnameExistsErrorMessage.st @@ -0,0 +1,4 @@ +toasts +displayAccountnameExistsErrorMessage + + UserDialogBoxMorph inform: 'This account name already exists.' title: 'Note' \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/displayEmptyFieldErrorMessage..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/displayEmptyFieldErrorMessage..st deleted file mode 100644 index d9345fef..00000000 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/displayEmptyFieldErrorMessage..st +++ /dev/null @@ -1,14 +0,0 @@ -as yet unclassified -displayEmptyFieldErrorMessage: aCollection - - | errorMessage | - - errorMessage := 'Please put in '. - - (ICHelper makeParameterCollection: aCollection) do: [:parameter | - errorMessage := errorMessage, parameter asString. - (parameter ~= (ICHelper makeParameterCollection: aCollection) last) - ifTrue: [errorMessage := errorMessage, ', ']]. - - errorMessage := errorMessage, ' data'. - UserDialogBoxMorph inform: errorMessage title: '' \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/displayEmptyFieldErrorMessageIfNecessary..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/displayEmptyFieldErrorMessageIfNecessary..st new file mode 100644 index 00000000..521899a2 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/displayEmptyFieldErrorMessageIfNecessary..st @@ -0,0 +1,7 @@ +toasts +displayEmptyFieldErrorMessageIfNecessary: aCollection + + (aCollection isEmpty) + ifFalse: [ + UserDialogBoxMorph inform: (self constructEmptyFieldsErrorMessage: aCollection) title: 'Note' + ] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/emptyParameterFrom..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/emptyParameterFrom..st deleted file mode 100644 index be272f1b..00000000 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/emptyParameterFrom..st +++ /dev/null @@ -1,12 +0,0 @@ -as yet unclassified -emptyParameterFrom: aCollection - - | emptyParameters | - - emptyParameters := OrderedCollection new. - - aCollection keysAndValuesDo: [:key :value | - (value = nil asString) - ifTrue: [emptyParameters add: key]]. - - ^ emptyParameters \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/emptyParametersIn..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/emptyParametersIn..st new file mode 100644 index 00000000..264da637 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/emptyParametersIn..st @@ -0,0 +1,4 @@ +helper +emptyParametersIn: aDictionary + + ^ (aDictionary select: [ :value | (value asString isEmpty) | (value = nil asString) ]) keys \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/endpoint..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/endpoint..st index b41cab06..9da1aa2d 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/endpoint..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/endpoint..st @@ -1,4 +1,4 @@ accessing -endpoint: anObject +endpoint: anICEndPoint - endpoint := anObject \ No newline at end of file + endpoint := anICEndPoint \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/folderDialogInstance..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/folderDialogInstance..st index 60e7bc32..ac607751 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/folderDialogInstance..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/folderDialogInstance..st @@ -1,4 +1,4 @@ accessing -folderDialogInstance: anObject +folderDialogInstance: anICFolderDialog - folderDialogInstance := anObject \ No newline at end of file + folderDialogInstance := anICFolderDialog \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/initialize.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/initialize.st deleted file mode 100644 index 056db793..00000000 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/initialize.st +++ /dev/null @@ -1,12 +0,0 @@ -initialization -initialize - - super initialize. - self ssl: false. - self updateMode: false. - self symbolArray: OrderedCollection new. - self symbolArray add: #name. - self symbolArray add: #serverAddress. - self symbolArray add: #serverPort. - self symbolArray add: #username. - self symbolArray add: #password \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/inputCollection..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/inputCollection..st index c821494b..6d9daada 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/inputCollection..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/inputCollection..st @@ -1,4 +1,4 @@ accessing -inputCollection: anObject +inputCollection: anOrderedCollection - inputCollection := anObject \ No newline at end of file + inputCollection := anOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/insertDefaults.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/insertDefaults.st new file mode 100644 index 00000000..7e1957e6 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/insertDefaults.st @@ -0,0 +1,5 @@ +login +insertDefaults + + ((self serverPort isNil) or: [(self serverPort asString isEmpty)]) + ifTrue: [self serverPort: self class defaultPort asString asText]. \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/keyEvent..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/keyEvent..st index 043e5012..157d2feb 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/keyEvent..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/keyEvent..st @@ -1,7 +1,5 @@ helper keyEvent: aKey - - " keyEvent listener attached to morph and input fields" | shouldLogin | diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/lastCharacterIsTab..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/lastCharacterIsTab..st new file mode 100644 index 00000000..e6f94ee2 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/lastCharacterIsTab..st @@ -0,0 +1,4 @@ +helper +lastCharacterIsTab: aString + + ^ aString notEmpty and: [aString last asciiValue == 9] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/loadData..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/loadData..st index 220781f7..e2fec747 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/loadData..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/loadData..st @@ -1,7 +1,7 @@ accessing loadData: dataDictionary - self accountName: (dataDictionary at: 'name:'). + self accountName: (dataDictionary at: 'accountName'). self serverAddress: (dataDictionary at: 'address'). self serverPort: (dataDictionary at: 'port') asString. self username: (dataDictionary at: 'username'). diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/login.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/login.st index ed3b8c78..3463bf9a 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/login.st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/login.st @@ -1,17 +1,18 @@ login login - - "create a dictionary with data and return it" - | dataDictionary | + | accountInfo | - dataDictionary := self makeDataDictionary. - (self checkForEmptyParameter: dataDictionary) + self insertDefaults. + accountInfo := self createAccountInfo. + (self allFieldsFilled: accountInfo) + ifFalse: [^ self]. + (self accountnameUnused: accountInfo) ifFalse: [^ self]. - ((ICEndPoint new) testAccountWith: dataDictionary) + ((ICEndPoint new) testAccountWith: accountInfo) ifTrue: [ self loginMorph abandon. (self updateMode) - ifFalse: [folderDialogInstance addAccount: dataDictionary] - ifTrue: [folderDialogInstance editAccount: dataDictionary with: (self endpoint)]] \ No newline at end of file + ifFalse: [self folderDialogInstance addAccount: accountInfo] + ifTrue: [self folderDialogInstance editAccount: accountInfo with: (self endpoint)]] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/loginMorph..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/loginMorph..st index 90dcf65c..39993a7d 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/loginMorph..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/loginMorph..st @@ -1,4 +1,4 @@ accessing -loginMorph: anObject +loginMorph: aMorph - loginMorph := anObject \ No newline at end of file + loginMorph := aMorph \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/makeDataDictionary.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/makeDataDictionary.st deleted file mode 100644 index cc02f7bb..00000000 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/makeDataDictionary.st +++ /dev/null @@ -1,15 +0,0 @@ -as yet unclassified -makeDataDictionary - - | dataDictionary | - - dataDictionary := Dictionary new. - - dataDictionary at: 'name' put: self accountName asString. - dataDictionary at: 'address' put: self serverAddress asString. - dataDictionary at: 'port' put: self serverPort asString. - dataDictionary at: 'username' put: self username asString. - dataDictionary at: 'password' put: self password asString. - dataDictionary at: 'ssl' put: self ssl. - - ^ dataDictionary \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/parseStringToBool..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/parseStringToBool..st deleted file mode 100644 index 8f757675..00000000 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/parseStringToBool..st +++ /dev/null @@ -1,6 +0,0 @@ -helper -parseStringToBool: aString - - aString = 'true' - ifTrue: [^ true] - ifFalse: [ ^ false] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/password..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/password..st index 028eecef..1bbb4954 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/password..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/password..st @@ -1,8 +1,8 @@ accessing -password: anObject +password: aText - (self checkIfLastCharacterIsTab: anObject string) - ifFalse: [password := anObject] + (self lastCharacterIsTab: aText string) + ifFalse: [password := aText] ifTrue: [self changeInputField: 5]. self changed: #password \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/serverAddress..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/serverAddress..st index e2db0885..1c7c59fa 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/serverAddress..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/serverAddress..st @@ -1,8 +1,8 @@ accessing -serverAddress: anObject +serverAddress: aText - (self checkIfLastCharacterIsTab: anObject string) - ifFalse: [serverAddress := anObject withBlanksTrimmed] + (self lastCharacterIsTab: aText string) + ifFalse: [serverAddress := aText withBlanksTrimmed] ifTrue: [self changeInputField: 2]. self changed: #serverAddress \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/serverPort..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/serverPort..st index 5d2bd874..83c241c9 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/serverPort..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/serverPort..st @@ -1,11 +1,8 @@ accessing -serverPort: anObject +serverPort: aText - (anObject isString) - ifTrue: [Transcript show: anObject]. - - (self checkIfLastCharacterIsTab: anObject string) - ifFalse: [serverPort := anObject withBlanksTrimmed] + (self lastCharacterIsTab: aText string) + ifFalse: [serverPort := aText withBlanksTrimmed] ifTrue: [self changeInputField: 3]. self changed: #serverPort \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/serverPortHelpText.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/serverPortHelpText.st index bebc2732..a684f6e5 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/serverPortHelpText.st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/serverPortHelpText.st @@ -1,4 +1,4 @@ user interface serverPortHelpText - ^ 'server port' \ No newline at end of file + ^ 'server port (default: 993)' \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/ssl..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/ssl..st index c3eefb0d..cc34cd4d 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/ssl..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/ssl..st @@ -1,5 +1,5 @@ accessing -ssl: anObject +ssl: aBool - ssl := anObject. + ssl := aBool. self changed: #ssl \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/ssl.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/ssl.st index 39da286d..604d8b48 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/ssl.st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/ssl.st @@ -1,3 +1,4 @@ accessing ssl - ^ ssl \ No newline at end of file + + ^ ssl ifNil: [ssl := true] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/symbolArray..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/symbolArray..st index 41e58285..57d84306 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/symbolArray..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/symbolArray..st @@ -1,4 +1,4 @@ accessing -symbolArray: anObject +symbolArray: anOrderedCollection - symbolArray := anObject \ No newline at end of file + symbolArray := anOrderedCollection \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/symbolArray.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/symbolArray.st index 115dfaf0..72a974e0 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/symbolArray.st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/symbolArray.st @@ -1,4 +1,9 @@ accessing symbolArray - - ^ symbolArray \ No newline at end of file + + ^ symbolArray ifNil: [symbolArray := { + #accountName. + #serverAddress. + #serverPort. + #username. + #password} as: OrderedCollection] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/updateMode..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/updateMode..st index 825ee0c7..7d136c2a 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/updateMode..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/updateMode..st @@ -1,4 +1,4 @@ accessing -updateMode: anObject +updateMode: aBool - updateMode := anObject \ No newline at end of file + updateMode := aBool \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/updateMode.st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/updateMode.st index cff8e1e8..3cea66ae 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/updateMode.st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/updateMode.st @@ -1,4 +1,4 @@ accessing updateMode - ^ updateMode \ No newline at end of file + ^ updateMode ifNil: [updateMode := false] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/username..st b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/username..st index 90fc3d5f..ce03a9df 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/username..st +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/instance/username..st @@ -1,8 +1,8 @@ accessing -username: anObject +username: aText - (self checkIfLastCharacterIsTab: anObject string) - ifFalse: [username := anObject withBlanksTrimmed] + (self lastCharacterIsTab: aText string) + ifFalse: [username := aText withBlanksTrimmed] ifTrue: [self changeInputField: 4]. self changed: #username \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/methodProperties.json b/packages/IMAPClient-UI.package/ICLoginDialog.class/methodProperties.json index 8cb2f2db..057a18cc 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/methodProperties.json +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/methodProperties.json @@ -1,61 +1,69 @@ { "class" : { - "failureLoginMessage" : "jwe 6/14/2016 23:41", - "getConfigNameFile" : "C.G. 6/21/2018 00:34", + "defaultPort" : "ok 7/9/2019 19:05", + "inputParameterOrder" : "tg 7/25/2019 10:48", "open:" : "C.G. 6/21/2018 10:56", - "open:with:" : "C.G. 7/25/2018 14:26", - "successLoginMessage" : "jwe 6/14/2016 23:40" }, + "open:with:" : "tg 7/15/2019 12:19" }, "instance" : { "accountName" : "C.G. 7/25/2018 14:21", - "accountName:" : "C.G. 7/25/2018 14:21", - "buildWith:" : "C.G. 7/25/2018 14:22", - "changeInputField:" : "DH 7/25/2018 00:10", + "accountName:" : "tg 7/26/2019 15:55", + "accountnameUnused:" : "tg 7/26/2019 15:54", + "allFieldsFilled:" : "tg 7/26/2019 15:55", + "buildLoginButton:" : "tg 7/26/2019 15:43", + "buildNameInputField:" : "pm 6/25/2019 16:42", + "buildPasswordInputField:" : "pm 6/25/2019 16:44", + "buildServerAdressInputField:" : "pm 6/25/2019 16:43", + "buildServerPortInputField:" : "pm 6/25/2019 16:43", + "buildSslCheckBox:" : "pm 6/25/2019 16:45", + "buildUserInputField:" : "pm 6/25/2019 16:43", + "buildWith:" : "pm 6/25/2019 16:51", + "buttonLabel" : "pm 6/3/2019 18:47", + "changeInputField:" : "tg 7/26/2019 16:45", "checkBoxColor" : "ms 7/13/2016 17:34", - "checkForEmptyParameter:" : "C.G. 7/25/2018 12:20", - "checkIfLastCharacterIsTab:" : "C.G. 7/25/2018 14:22", + "constructEmptyFieldsErrorMessage:" : "tg 7/25/2019 12:59", + "createAccountInfo" : "mt 7/26/2019 14:24", "defaultBackgroundColor" : "C.G. 6/21/2018 00:28", "dialogTitle" : "ms 6/14/2016 09:53", - "displayEmptyFieldErrorMessage:" : "C.G. 7/25/2018 12:20", - "emptyParameterFrom:" : "C.G. 7/25/2018 12:18", + "displayAccountnameExistsErrorMessage" : "ok 6/25/2019 00:26", + "displayEmptyFieldErrorMessageIfNecessary:" : "ok 6/25/2019 00:26", + "emptyParametersIn:" : "ok 6/6/2019 20:05", "endpoint" : "C.G. 7/25/2018 14:22", - "endpoint:" : "C.G. 7/25/2018 14:23", + "endpoint:" : "pm 6/9/2019 17:13", "folderDialogInstance" : "C.G. 7/25/2018 14:23", - "folderDialogInstance:" : "C.G. 7/25/2018 14:23", - "getButtonLabel" : "C.G. 7/25/2018 14:23", + "folderDialogInstance:" : "pm 6/9/2019 17:13", "guiElementHeight" : "ms 6/3/2016 19:32", "guiElementWidth" : "ms 6/3/2016 19:36", "guiElementXOffset" : "ms 6/3/2016 19:36", "guiElementYOffset" : "ms 7/12/2016 10:45", "guiElementYOffsetOf:" : "C.G. 7/25/2018 14:23", "guiElementYSpacing" : "ms 6/14/2016 10:05", - "initialize" : "C.G. 7/25/2018 14:23", "inputCollection" : "C.G. 7/25/2018 14:23", - "inputCollection:" : "C.G. 7/25/2018 14:23", - "keyEvent:" : "DH 7/25/2018 00:08", - "loadData:" : "C.G. 6/21/2018 10:58", - "login" : "C.G. 7/25/2018 12:23", + "inputCollection:" : "pm 6/9/2019 17:12", + "insertDefaults" : "tg 7/26/2019 22:07", + "keyEvent:" : "tg 7/26/2019 16:21", + "lastCharacterIsTab:" : "tg 7/26/2019 21:47", + "loadData:" : "tg 7/19/2019 09:56", + "login" : "tg 7/26/2019 21:41", "loginMorph" : "C.G. 7/25/2018 14:24", - "loginMorph:" : "C.G. 7/25/2018 14:24", - "makeDataDictionary" : "C.G. 7/25/2018 12:16", + "loginMorph:" : "pm 6/9/2019 17:12", "nameHelpText" : "DH 6/12/2018 22:36", - "parseStringToBool:" : "C.G. 6/21/2018 00:32", "password" : "C.G. 7/25/2018 14:24", - "password:" : "DH 6/12/2018 22:32", + "password:" : "tg 7/26/2019 15:55", "passwordHelpText" : "ms 6/14/2016 09:21", "serverAddress" : "ms 6/14/2016 09:21", - "serverAddress:" : "C.G. 7/25/2018 14:24", + "serverAddress:" : "tg 7/26/2019 15:55", "serverAdressHelpText" : "ms 6/14/2016 09:21", "serverPort" : "C.G. 7/25/2018 14:24", - "serverPort:" : "C.G. 6/21/2018 00:32", - "serverPortHelpText" : "ms 6/14/2016 09:21", - "ssl" : "C.G. 6/21/2018 00:32", + "serverPort:" : "tg 7/26/2019 16:06", + "serverPortHelpText" : "ok 7/9/2019 18:59", + "ssl" : "ok 7/9/2019 18:58", "ssl:" : "ms 7/13/2016 17:25", "sslCheckBoxLabel" : "ms 7/12/2016 11:00", - "symbolArray" : "C.G. 7/25/2018 14:24", + "symbolArray" : "tg 7/26/2019 15:44", "symbolArray:" : "C.G. 7/25/2018 14:24", "toggleSSL" : "ms 7/13/2016 17:37", - "updateMode" : "C.G. 7/25/2018 14:24", + "updateMode" : "pm 6/9/2019 13:21", "updateMode:" : "C.G. 7/25/2018 14:24", "username" : "ms 6/14/2016 09:22", - "username:" : "C.G. 7/25/2018 14:25", + "username:" : "tg 7/26/2019 15:55", "usernameHelpText" : "ms 6/14/2016 09:21" } } diff --git a/packages/IMAPClient-UI.package/ICLoginDialog.class/properties.json b/packages/IMAPClient-UI.package/ICLoginDialog.class/properties.json index 86d2cd71..7ee9e4c5 100644 --- a/packages/IMAPClient-UI.package/ICLoginDialog.class/properties.json +++ b/packages/IMAPClient-UI.package/ICLoginDialog.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "ms 7/28/2016 11:58", + "commentStamp" : "tg 7/8/2019 15:37", "instvars" : [ "accountName", "serverPort", diff --git a/packages/IMAPClient-UI.package/ICPasswordDialog.class/README.md b/packages/IMAPClient-UI.package/ICPasswordDialog.class/README.md index e69de29b..49652800 100644 --- a/packages/IMAPClient-UI.package/ICPasswordDialog.class/README.md +++ b/packages/IMAPClient-UI.package/ICPasswordDialog.class/README.md @@ -0,0 +1 @@ +An ICLoginDialog is a toolbuilder-based UI for authorizing a user. It is basically a password prompt \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/buildAddPasswordButton..st b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/buildAddPasswordButton..st new file mode 100644 index 00000000..58590a7a --- /dev/null +++ b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/buildAddPasswordButton..st @@ -0,0 +1,8 @@ +toolbuilder +buildAddPasswordButton: builder + + ^ builder pluggableButtonSpec new + model: self; + frame: (0 @ 0.5 extent: 1 @ 0.4); + label: 'login'; + action: #login \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/buildPasswordField..st b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/buildPasswordField..st new file mode 100644 index 00000000..3137a803 --- /dev/null +++ b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/buildPasswordField..st @@ -0,0 +1,13 @@ +toolbuilder +buildPasswordField: builder + + ^ builder pluggableInputFieldSpec new + model: self; + askBeforeDiscardingEdits: false; + indicateUnacceptedChanges: false; + getText: #password; + setText: #loginWithPassword:; + editText: #password:; + font: (StrikeFont passwordFontSize: 12); + help: 'Password'; + frame: (0 @ 0.05 extent: 1 @ 0.4) \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/buildWith..st b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/buildWith..st index a90564cb..1d174749 100644 --- a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/buildWith..st +++ b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/buildWith..st @@ -1,41 +1,15 @@ -as yet unclassified +toolbuilder buildWith: builder - | window windowSpec passwordField addPasswordButton | + | newWindow | - windowSpec := builder pluggableWindowSpec new. - windowSpec + newWindow := builder build: (builder pluggableWindowSpec new model: self; - label: (self data at: 'name'); + label: (self data at: 'accountName'); extent: 200 @ 100; - children: OrderedCollection new. - - passwordField := builder pluggableInputFieldSpec new. - passwordField - model: self; - askBeforeDiscardingEdits: false; - indicateUnacceptedChanges: false; - getText: #password; - setText: #password:; - editText: #password:; - font: (StrikeFont passwordFontSize: 12); - help: 'Password'; - frame: (0 @ 0.05 extent: 1 @ 0.4). - - addPasswordButton := builder pluggableButtonSpec new. - addPasswordButton - model: self; - frame: (0 @ 0.5 extent: 1 @ 0.4); - label: 'login'; - action: #login. + children: { + self buildPasswordField: builder. + self buildAddPasswordButton: builder}). - windowSpec children addAll: { passwordField . addPasswordButton }. - - window := builder build: windowSpec. - self window: window. - - window submorphsDo: [:m | - (m class == PluggableTextMorphPlus) - ifTrue: [m textMorph on: #keyDown send: #keyEvent: to: self]]. - - ^ window \ No newline at end of file + self window: newWindow. + ^ newWindow \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/data..st b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/data..st index f09c4fa1..89877ea1 100644 --- a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/data..st +++ b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/data..st @@ -1,4 +1,4 @@ accessing -data: anObject +data: aDictionary - data := anObject \ No newline at end of file + data := aDictionary \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/folderDialogInstance..st b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/folderDialogInstance..st index 60e7bc32..ac607751 100644 --- a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/folderDialogInstance..st +++ b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/folderDialogInstance..st @@ -1,4 +1,4 @@ accessing -folderDialogInstance: anObject +folderDialogInstance: anICFolderDialog - folderDialogInstance := anObject \ No newline at end of file + folderDialogInstance := anICFolderDialog \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/keyEvent..st b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/keyEvent..st deleted file mode 100644 index f0b0f5f0..00000000 --- a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/keyEvent..st +++ /dev/null @@ -1,13 +0,0 @@ -accessing -keyEvent: aKey - - "global keyEvent listener attached to morph and input fields" - - | shouldLogin | - - Smalltalk os platformName = 'Win32' - ifTrue: [shouldLogin := (aKey keyValue = 13)] - ifFalse: [shouldLogin := (aKey keyValue = 36)]. - - shouldLogin - ifTrue: [self login] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/login.st b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/login.st index 0dfd7dbf..b7cb4977 100644 --- a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/login.st +++ b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/login.st @@ -1,14 +1,18 @@ -as yet unclassified login - - (self password = nil) - ifTrue: [ - UserDialogBoxMorph inform: 'Please put in a password' title: ''. +login + + | accountInfo | + self password ifNil: [ + self inform: 'Please put in a password'. ^ self]. - self data at: 'password' put: (self password). - - ((ICEndPoint new) testAccountWith: data) + self data at: 'password' put: (self password asString). + + [accountInfo := ICAccountInfo newWith: self data.] + on: Error + do: [:e | self inform: e asString. ^ self]. + + ((ICEndPoint new) testAccountWith: accountInfo) ifTrue: [ - self folderDialogInstance addPasswordToCollection: (self data). + self folderDialogInstance passwordPromtCallback: (self data). self window abandon] \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/loginWithPassword..st b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/loginWithPassword..st new file mode 100644 index 00000000..16c9df0d --- /dev/null +++ b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/loginWithPassword..st @@ -0,0 +1,5 @@ +login +loginWithPassword: aText + + self password: aText. + self login \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/password..st b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/password..st index 5e5867f8..d7af466d 100644 --- a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/password..st +++ b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/password..st @@ -1,4 +1,4 @@ accessing -password: anObject +password: aText - password := anObject \ No newline at end of file + password := aText \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/window..st b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/window..st index c2cfa4b6..dc064990 100644 --- a/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/window..st +++ b/packages/IMAPClient-UI.package/ICPasswordDialog.class/instance/window..st @@ -1,4 +1,4 @@ accessing -window: anObject +window: aMorph - window := anObject \ No newline at end of file + window := aMorph \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/ICPasswordDialog.class/methodProperties.json b/packages/IMAPClient-UI.package/ICPasswordDialog.class/methodProperties.json index 2fb3e7e7..f59aa385 100644 --- a/packages/IMAPClient-UI.package/ICPasswordDialog.class/methodProperties.json +++ b/packages/IMAPClient-UI.package/ICPasswordDialog.class/methodProperties.json @@ -2,14 +2,16 @@ "class" : { "openWith:and:" : "C.G. 6/20/2018 21:11" }, "instance" : { - "buildWith:" : "DH 6/21/2018 09:30", + "buildAddPasswordButton:" : "pm 6/25/2019 16:58", + "buildPasswordField:" : "pm 6/25/2019 16:57", + "buildWith:" : "tg 7/26/2019 15:51", "data" : "C.G. 7/25/2018 14:25", - "data:" : "C.G. 7/25/2018 14:25", + "data:" : "pm 6/9/2019 17:14", "folderDialogInstance" : "C.G. 7/25/2018 14:25", - "folderDialogInstance:" : "C.G. 7/25/2018 14:25", - "keyEvent:" : "DH 6/21/2018 09:30", - "login" : "C.G. 7/25/2018 12:24", + "folderDialogInstance:" : "pm 6/9/2019 17:14", + "login" : "tg 7/26/2019 21:41", + "loginWithPassword:" : "fr 6/13/2019 14:39", "password" : "C.G. 7/25/2018 14:25", - "password:" : "C.G. 7/25/2018 14:25", + "password:" : "fr 6/13/2019 14:44", "window" : "C.G. 7/25/2018 14:25", - "window:" : "C.G. 7/25/2018 14:25" } } + "window:" : "pm 6/9/2019 17:15" } } diff --git a/packages/IMAPClient-UI.package/ICPasswordDialog.class/properties.json b/packages/IMAPClient-UI.package/ICPasswordDialog.class/properties.json index 6fad4d61..19317e33 100644 --- a/packages/IMAPClient-UI.package/ICPasswordDialog.class/properties.json +++ b/packages/IMAPClient-UI.package/ICPasswordDialog.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "tg 7/9/2019 14:43", "instvars" : [ "data", "folderDialogInstance", diff --git a/packages/IMAPClient-UI.package/IMAPClientUIServiceProvider.class/README.md b/packages/IMAPClient-UI.package/IMAPClientUIServiceProvider.class/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/IMAPClient-UI.package/IMAPClientUIServiceProvider.class/class/initialize.st b/packages/IMAPClient-UI.package/IMAPClientUIServiceProvider.class/class/initialize.st deleted file mode 100644 index dead3973..00000000 --- a/packages/IMAPClient-UI.package/IMAPClientUIServiceProvider.class/class/initialize.st +++ /dev/null @@ -1,4 +0,0 @@ -initialization -initialize - - ServiceRegistry current buildProvider: self new \ No newline at end of file diff --git a/packages/IMAPClient-UI.package/IMAPClientUIServiceProvider.class/methodProperties.json b/packages/IMAPClient-UI.package/IMAPClientUIServiceProvider.class/methodProperties.json deleted file mode 100644 index d3523a9b..00000000 --- a/packages/IMAPClient-UI.package/IMAPClientUIServiceProvider.class/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - "initialize" : "C.G. 7/25/2018 14:25" }, - "instance" : { - } } diff --git a/packages/IMAPClient-UI.package/IMAPClientUIServiceProvider.class/properties.json b/packages/IMAPClient-UI.package/IMAPClientUIServiceProvider.class/properties.json deleted file mode 100644 index 12c3f2f8..00000000 --- a/packages/IMAPClient-UI.package/IMAPClientUIServiceProvider.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "category" : "IMAPClient-UI", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], - "name" : "IMAPClientUIServiceProvider", - "pools" : [ - ], - "super" : "ServiceProvider", - "type" : "normal" } diff --git a/screenshots/40866916-aaf887fc-6600-11e8-9dc8-847775df210c.png b/screenshots/40866916-aaf887fc-6600-11e8-9dc8-847775df210c.png deleted file mode 100644 index fb68b596..00000000 Binary files a/screenshots/40866916-aaf887fc-6600-11e8-9dc8-847775df210c.png and /dev/null differ diff --git a/screenshots/40867006-45090ee8-6601-11e8-8e89-9d9f6a536792.png b/screenshots/40867006-45090ee8-6601-11e8-8e89-9d9f6a536792.png deleted file mode 100644 index 87dc9192..00000000 Binary files a/screenshots/40867006-45090ee8-6601-11e8-8e89-9d9f6a536792.png and /dev/null differ diff --git a/screenshots/40867029-7fddabc8-6601-11e8-9247-7df69755c6e9.png b/screenshots/40867029-7fddabc8-6601-11e8-9247-7df69755c6e9.png deleted file mode 100644 index 6eb7edc8..00000000 Binary files a/screenshots/40867029-7fddabc8-6601-11e8-9247-7df69755c6e9.png and /dev/null differ diff --git a/screenshots/40867038-95f11300-6601-11e8-9ce6-70933baae984.png b/screenshots/40867038-95f11300-6601-11e8-9ce6-70933baae984.png deleted file mode 100644 index 9a612f7f..00000000 Binary files a/screenshots/40867038-95f11300-6601-11e8-9ce6-70933baae984.png and /dev/null differ diff --git a/screenshots/architecture.png b/screenshots/architecture.png deleted file mode 100644 index 13c0f404..00000000 Binary files a/screenshots/architecture.png and /dev/null differ