-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnewinbox.rho
25 lines (25 loc) · 914 Bytes
/
newinbox.rho
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
new inboxCh, capabilities, ret, $stdout, $lookup, $insertArbitrary in {
lookup!($Inbox, *inboxCh) |
for (inbox <- inboxCh) {
inbox!(*capabilities) |
for (receive, send, peek <- capabilities) {
$peek(*inboxCh) |
for (oldmail <- inboxCh) {
stdout!(["saving oldmail: ",*oldmail]) |
send!(*oldmail) |
lookup!($locker_%%$myusername, *ret) |
for (locker <- ret) {
stdout!(["#define $locker_nonce_" ++ $myusername, $locker_nonce_%%$myusername + 2]) |
locker!("update", $myprivkey.hexToBytes(),$locker_nonce_%%$myusername + 1,
{"inbox": *send, "receive": *receive, "peek": *peek}, *stdout, *ret) |
for (_ <- ret) {
insertArbitrary!(*send,*ret)|
for (uri <- ret) {
stdout!(["#define $inbox_" ++ $myusername, *uri])
}
}
}
}
}
}
}