LCOV - code coverage report
Current view: top level - eventdispatcher - utils.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 1 0.0 %
Date: 2021-09-19 09:06:58 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Copyright (c) 2012-2021  Made to Order Software Corp.  All Rights Reserved
       2             : //
       3             : // https://snapwebsites.org/project/eventdispatcher
       4             : // contact@m2osw.com
       5             : //
       6             : // This program is free software; you can redistribute it and/or modify
       7             : // it under the terms of the GNU General Public License as published by
       8             : // the Free Software Foundation; either version 2 of the License, or
       9             : // (at your option) any later version.
      10             : //
      11             : // This program is distributed in the hope that it will be useful,
      12             : // but WITHOUT ANY WARRANTY; without even the implied warranty of
      13             : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14             : // GNU General Public License for more details.
      15             : //
      16             : // You should have received a copy of the GNU General Public License
      17             : // along with this program; if not, write to the Free Software
      18             : // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
      19             : #pragma once
      20             : 
      21             : /** \file
      22             :  * \brief Various useful functions and declarations.
      23             :  *
      24             :  * Some functions/declarations that are used throughout the library.
      25             :  */
      26             : 
      27             : 
      28             : // snapdev lib
      29             : //
      30             : #include    <snapdev/raii_generic_deleter.h>
      31             : 
      32             : 
      33             : // C++ lib
      34             : //
      35             : #include    <cstdint>
      36             : #include    <map>
      37             : #include    <string>
      38             : #include    <vector>
      39             : 
      40             : 
      41             : // C lib
      42             : //
      43             : #include    <netdb.h>
      44             : 
      45             : 
      46             : 
      47             : namespace ed
      48             : {
      49             : 
      50             : 
      51             : 
      52             : typedef std::vector<std::string>            string_list_t;
      53             : typedef std::map<std::string, std::string>  string_map_t;
      54             : 
      55             : 
      56             : /** \brief Address info pointer which auto-frees the structures.
      57             :  *
      58             :  * This smart pointer is used so the addrinfo structure is automatically
      59             :  * freed once done with the concerned variable.
      60             :  *
      61             :  * The pointer is exception safe as well.
      62             :  */
      63             : typedef std::unique_ptr<
      64             :                   addrinfo
      65             :                 , snap::raii_pointer_deleter<
      66             :                                       addrinfo
      67             :                                     , decltype(&::freeaddrinfo)
      68           0 :                                     , &::freeaddrinfo>> raii_addrinfo_t;
      69             : 
      70             : 
      71             : constexpr int const                 MAX_CONNECTIONS = 50;
      72             : 
      73             : 
      74             : std::int64_t                        get_current_date();
      75             : std::int64_t                        get_current_date_ns();
      76             : 
      77             : 
      78             : 
      79             : 
      80             : } // namespace ed
      81             : // vim: ts=4 sw=4 et

Generated by: LCOV version 1.13