LCOV - code coverage report
Current view: top level - eventdispatcher - pipe_buffer_connection.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 1 0.0 %
Date: 2019-08-08 02:52:36 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Copyright (c) 2012-2019  Made to Order Software Corp.  All Rights Reserved
       2             : //
       3             : // This program is free software; you can redistribute it and/or modify
       4             : // it under the terms of the GNU General Public License as published by
       5             : // the Free Software Foundation; either version 2 of the License, or
       6             : // (at your option) any later version.
       7             : //
       8             : // This program is distributed in the hope that it will be useful,
       9             : // but WITHOUT ANY WARRANTY; without even the implied warranty of
      10             : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      11             : // GNU General Public License for more details.
      12             : //
      13             : // You should have received a copy of the GNU General Public License
      14             : // along with this program; if not, write to the Free Software
      15             : // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
      16             : #pragma once
      17             : 
      18             : // self
      19             : //
      20             : #include "eventdispatcher/pipe_connection.h"
      21             : //#include "eventdispatcher/udp_client_server.h"
      22             : //#include "eventdispatcher/utils.h"
      23             : 
      24             : 
      25             : //// cppthread lib
      26             : ////
      27             : //#include "cppthread/thread.h"
      28             : //
      29             : //
      30             : //// snapdev lib
      31             : ////
      32             : //#include "snapdev/not_used.h"
      33             : //
      34             : //
      35             : //// C lib
      36             : ////
      37             : //#include <signal.h>
      38             : //#include <sys/signalfd.h>
      39             : 
      40             : 
      41             : 
      42             : namespace ed
      43             : {
      44             : 
      45             : 
      46             : 
      47           0 : class pipe_buffer_connection
      48             :     : public pipe_connection
      49             : {
      50             : public:
      51             :     typedef std::shared_ptr<pipe_buffer_connection>    pointer_t;
      52             : 
      53             :     // snap::snap_communicator::snap_connection
      54             :     virtual bool                is_writer() const override;
      55             : 
      56             :     // snap::snap_communicator::snap_pipe_connection implementation
      57             :     virtual ssize_t             write(void const * data, size_t length) override;
      58             :     virtual void                process_read() override;
      59             :     virtual void                process_write() override;
      60             :     virtual void                process_hup() override;
      61             : 
      62             :     // new callback
      63             :     virtual void                process_line(std::string const & line) = 0;
      64             : 
      65             : private:
      66             :     std::string                 f_line = std::string(); // do NOT use QString because UTF-8 would break often... (since we may only receive part of messages)
      67             :     std::vector<char>           f_output = std::vector<char>();
      68             :     size_t                      f_position = 0;
      69             : };
      70             : 
      71             : 
      72             : 
      73             : } // namespace ed
      74             : // vim: ts=4 sw=4 et

Generated by: LCOV version 1.12