# Events

# Election Daemon
NEW_PEER = 'new peers'
RE_ELECTION = 're election'
ALIVE = 'alive'
BCAST_LEDGER = 'Broadcast ledger'
HANDLE_PING = 'handle ping'
HANDLE_ALIVE = 'alive handler'
NEW_LEADER = 'new leader'
HANDLE_PONG = 'handle pong'
DEAD = 'dead'
REMOVE_LEADER = 'remove leader'
PING = 'ping'
PONG = 'pong'
SECRET_VAL = 'secret value'
FACE_OFF = 'face off'
WITH_LEADER = 'WL'
WITHOUT_LEADER = 'WTL'
PEER_DEAD = 'peer dead'

# Server Daemon
HANDSHAKE = 'handshake'
FILE_SYS_EVENT = 'filesys-modified'
FILE = 'file'
LIST_ALL_FILES = 'listAll'
ERROR_LIST_ALL_FILES = 'ErrorListingAll'
LEADER = 'leader'
HASH_DUMP = 'hashdump'
SEARCH_REQ = 'searchreq'
LOOKUP = 'lookup'
SEARCH_RES = 'searchresult'
LEADER_NOT_READY = 'leadernotready'
LOAD_FILE_REQ = 'loadfilereq'
PEER_LOOKUP_RESPONSE = 'peerlookupresp'
IWANT_PEER_FILE = 'iwantpeerfile'
SEND_PEER_DETAILS = 'sendpeerdetails'
FILE_DETAILS_RESP = 'filedetailsresp'
INIT_FILE_REQ = 'initfilereq'
IWANT = 'iwant'
START_TRANSFER = 'start-transfer'
FILE_TO_BE_DOWNLOADED = 'filetobedownloaded'
INDEXED = 'indexed'
REQ_CHUNK = 'req-chunk'
END_GAME = 'end-game'
FILE_CONFIRMATION_MESSAGE = 'file-confirmation-message'
INTERESTED = 'interested'
UNCHOKE = 'unchoke'
CHANGE = 'change'
SHARE = 'share'
NEW_SHARED_FOLDER_RES = 'new-shared-folder-response'
NEW_DOWNLOAD_FOLDER_RES = 'new-download-folder-response'
GET_HASH_IDENTITY = 'get-hash-identity'
HASH_IDENTITY_RESPONSE = 'hash-identity-response'
HASH_NOT_PRESENT = 'hash-not-present'
# Server States
READY = 1
NOT_READY = 0
# File chunk size
CHUNK_SIZE = 2 ** 14
FILE_RESP_FMT = '!III'
