
GROUP_CENTRALIZED = 0
GROUP_DECENTRALIZED = 1

PUBLIC_GROUP_ID = 1
NOBODY_ID = -1

SERVER_ID = 0x00

# errors
ERR0R_MAXIMUM_MEMBER_NUMBER = 0
ERROR_USERNAME_ALREADY_TAKEN = 1


# type constants
TYPE_CONNECTION_REQUEST = 0x00
TYPE_CONNECTION_ACCEPT = 0x01
TYPE_CONNECTION_REJECT = 0x02
TYPE_USER_LIST_REQUEST = 0x03
TYPE_USER_LIST_RESPONSE = 0x04
TYPE_DATA_MESSAGE = 0x05
TYPE_GROUP_CREATION_REQUEST = 0x06
TYPE_GROUP_CREATION_ACCEPT = 0x07
TYPE_GROUP_CREATION_REJECT = 0x08
TYPE_GROUP_INVITATION_REQUEST = 0x09
TYPE_GROUP_INVITATION_ACCEPT = 0x0A
TYPE_GROUP_INVITATION_REJECT = 0x0B
TYPE_GROUP_DISJOINT_REQUEST = 0x0C
TYPE_GROUP_DISSOLUTION = 0x0D
TYPE_UPDATE_LIST = 0x0E
TYPE_UPDATE_DISCONNECTION = 0x0F
TYPE_DISCONNECTION_REQUEST = 0x10


''' user commands '''
CMD_PRINT = 'PRINT'
CMD_CONNECT = 'CONNECT'
CMD_SEND = 'SEND'
CMD_USER_LIST = 'USERS'
CMD_HELP = 'HELP'
CMD_DISCONNECT = 'DISCONNECT'
CMD_CREATE_GROUP = 'GCREATE'
CMD_ACCEPT_INVITATION = 'ACCEPT'
CMD_REJECT_INVITATION = 'REJECT'
CMD_DISJOINT = 'DISJOINT'

''' user states '''
ST_DISCONNECTED = 0
ST_CONNECTED = 1