/**
@file client.h
@brief Offers the network functionality for the client
*/

#ifndef VOICETRANS_CLIENT_H
#define VOICETRANS_CLIENT_H

#include "network.h"
//#include <string>
//using namespace std;


namespace iwear{
    namespace voicetransmission{

class CLIENT
{

 public:

    int sock;
    char *userAddr;
    int ipAddr[12];
    int portAddr;
    bool server;
    int counter;
    bool debug;



#define BUFFER_SIZE 1024

       	
    int DATA_BUFFER;
    
    CLIENT();
    ~CLIENT();

    bool isServer();
    
    /** activate\deactivate debug mode */
    void setDebugMode(bool);
    int getCounter();
    int setCounter(int c);
    void setDATABUFFER(int db);
    int getDATABUFFER();

    /** start the client */
    int clientStart(char *input, int port, bool isServer, int counter, bool debug);
	
    
    int empfangeText();

 

    /** offers the functionality of getting data from a server */
    int empfangeDaten();

    /** offers sending data from file to the server which will send the data to other clients */
    int sendeDaten();
    /** offers sending textual data to the server which will send them to other clients connected */
    int sendeDaten(char *);
    
    
};


} // namespace voicetransmission
} // namespace iwear

#endif
