/*
* Copyright 2017 Yann Weber
*
* This file is part of Ttail.
*
* Ttail is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* Ttail is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Ttail. If not, see .
*/
#ifndef _ttail_search_std_h__
#define _ttail_search_std_h__
#include
#include
#include
typedef struct _ttail_search_stdin_s ttail_search_stdin_t;
/*session->std.buff), &(TTAIL->session->std.buff_sz), stdin))
/*session->std.buff)
/**@brief init private session members
*@patam ttail_t* t
*@return -1 on error else 0
*@todo checks
*/
int _ttail_search_closest_std_init(ttail_t* t);
/**@brief @ref ttail_search_closest() implementation for stdin
*@note when returns ttail->session->std.buff contains the first
*line to print
*@param ttail_t*
*@param struct tm* tmin
*@return 0 if ok -1 if fatal error 1 if not found
*@todo checks
*/
int _ttail_search_closest_stdin(ttail_t*);
/**@brief Output result loglines to stdout
*@param ttail_t*
*@param int fd
*@todo checks
*/
void _ttail_search_print_stdin(ttail_t*, int);
/**@brief free private session members
*@patam ttail_t* t
*/
void _ttail_search_stdin_free(ttail_t* t);
#endif