-
Notifications
You must be signed in to change notification settings - Fork 1
/
bmail.hpp
41 lines (31 loc) · 953 Bytes
/
bmail.hpp
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* @file
* @copyright defined in eos/LICENSE.txt
*/
#include <eosiolib/eosio.hpp>
#include <string>
namespace eosio {
using std::string;
using ipfshash_t = unsigned char[34];
class bmail : public contract {
public:
bmail( account_name self ):contract(self){}
void sendmail( account_name from,
account_name to,
string mailhash );
private:
struct mail {
account_name owner;
ipfshash_t mailhash;
bool is_sender = false;
bool is_cc = false;
bool is_bcc = false;
uint32_t status = 0;
time create_date;
time update_date;
uint64_t primary_key()const { return owner; }
};
typedef eosio::multi_index<N(mails), mail> mails;
void add_mail( account_name owner, string mailhash, bool is_sender, account_name ram_payer );
};
} /// namespace eosio