#ifndef SWISSDEF_H
#define SWISSDEF_H

#define SWISSPORT (10003)
#define SWISSSOCK socket(PF_INET, SOCK_STREAM, 0)

#define SW_MSG_STORE (0x01)
#define SW_MSG_RETR  (0x02)
#define SW_MSG_SREP  (0x04)
#define SW_MSG_RREP  (0x14)
#define SW_MSG_ERR   (0x08)

#define SW_ERR_NOACCOUNT (0xff)
#define SW_ERR_SRV       (0xf0)
#define SW_ERR_AUTH      (0x0f)
#define SW_ERR_CLIENTMSG (0x00)

#define DB_FILE_PERMS (S_IRUSR|S_IWUSR)

#define SW_RET_REMOTE_ERR  (0)
#define SW_RET_NOFLAG     (-1)
#define SW_RET_SUCCESS    (-2)
#define SW_RET_INT_ERR    (-3)

struct account {
      char *data;
      int dsize;

      char *auth;
      int asize;
      int ttl; //how often does this auth work

      int acc_id;

};

#define ID_TYPE int

#endif
