#ifndef __PROCESSOR_H_
#define __PROCESSOR_H_

#include "message.h"
#include "request_handler_entry.h"

typedef struct s_Processor Processor;

Processor * processor_new (const key_t ipcKey, bool isClient);
void processor_destroy (void *ptr);

bool processor_sendMessage (Processor *proc, Message *msg, Message **receiveMessage);
Message * processor_getMessage (Processor *proc);

bool processor_sendMessageResponse (Processor *proc, Message *msg);

void processor_addRequestHandler (Processor *processor, const CommandHandler *handler, void *context);

void processor_finishedInit (Processor *processor);


#endif
