Changeset 15 in flair-src for trunk/lib/FlairCore/src/unexported/ui_com.h


Ignore:
Timestamp:
Apr 8, 2016, 3:40:57 PM (6 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/unexported/ui_com.h

    r2 r15  
    2525#endif
    2626
    27 namespace flair
    28 {
    29     namespace core
    30     {
    31         class Mutex;
    32         class Object;
    33     }
    34     namespace gui
    35     {
    36         class SendData;
    37     }
     27namespace flair {
     28namespace core {
     29class Mutex;
     30class Object;
     31}
     32namespace gui {
     33class SendData;
     34}
    3835}
    3936
    40 class ui_com: public flair::core::Thread
    41 {
    42     public:
    43         ui_com(const flair::core::Object *parent,UDTSOCKET sock);
    44         ~ui_com();
    45         void Send(char* buf,ssize_t size);
    46         ssize_t Receive(char* buf,ssize_t buf_size);
    47         void AddSendData(const flair::gui::SendData *obj);
    48         void UpdateSendData(const flair::gui::SendData *obj);
    49         void RemoveSendData(const flair::gui::SendData *obj);
    50         void UpdateDataToSendSize(void);
    51         void Block(void);
    52         void UnBlock(void);
    53         bool ConnectionLost(void);
     37class ui_com : public flair::core::Thread {
     38public:
     39  ui_com(const flair::core::Object *parent, UDTSOCKET sock);
     40  ~ui_com();
     41  void Send(char *buf, ssize_t size);
     42  ssize_t Receive(char *buf, ssize_t buf_size);
     43  void AddSendData(const flair::gui::SendData *obj);
     44  void UpdateSendData(const flair::gui::SendData *obj);
     45  void RemoveSendData(const flair::gui::SendData *obj);
     46  void UpdateDataToSendSize(void);
     47  void Block(void);
     48  void UnBlock(void);
     49  bool ConnectionLost(void);
    5450
    55     private:
    56         ssize_t send_size;
    57         char *send_buffer;
    58         std::vector<const flair::gui::SendData*> data_to_send;
    59         std::vector<flair::core::Time> resume_time;
    60         flair::core::Mutex *send_mutex;
    61         UDTSOCKET socket_fd;
    62         bool connection_lost;
    63         void Run(void);
    64         void SendDatas(void);
    65         static int compressBuffer(char *in, ssize_t in_size,char **out,ssize_t *out_size, int level);
    66         static int uncompressBuffer(unsigned char *in, ssize_t in_size,unsigned char **out,ssize_t *out_size);
     51private:
     52  ssize_t send_size;
     53  char *send_buffer;
     54  std::vector<const flair::gui::SendData *> data_to_send;
     55  std::vector<flair::core::Time> resume_time;
     56  flair::core::Mutex *send_mutex;
     57  UDTSOCKET socket_fd;
     58  bool connection_lost;
     59  void Run(void);
     60  void SendDatas(void);
     61  static int compressBuffer(char *in, ssize_t in_size, char **out,
     62                            ssize_t *out_size, int level);
     63  static int uncompressBuffer(unsigned char *in, ssize_t in_size,
     64                              unsigned char **out, ssize_t *out_size);
    6765#ifdef __XENO__
    68         bool is_running;
    69         static void* user_thread(void * arg);
    70         pthread_t thread;
    71         RT_PIPE pipe;
     66  bool is_running;
     67  static void *user_thread(void *arg);
     68  pthread_t thread;
     69  RT_PIPE pipe;
    7270#endif
    73 
    7471};
    7572
Note: See TracChangeset for help on using the changeset viewer.