Major redesign. All input is handled through XML. Raw input data is first
[gnucomo.git] / src / gcm_input / rpm_filter.h
1
2 /**************************************************************************
3 **  (c) Copyright 2003, Andromeda Technology & Automation
4 ** This is free software; you can redistribute it and/or modify it under the
5 ** terms of the GNU General Public License, see the file COPYING.
6 ***************************************************************************
7 ** MODULE INFORMATION *
8 ***********************
9 **      FILE NAME      : rpm_filter.h
10 **      SYSTEM NAME    : 
11 **      VERSION NUMBER : $Revision: 1.1 $
12 **
13 **  DESCRIPTION      :  
14 **
15 **  EXPORTED OBJECTS : 
16 **  LOCAL    OBJECTS : 
17 **  MODULES  USED    :
18 ***************************************************************************
19 **  ADMINISTRATIVE INFORMATION *
20 ********************************
21 **      ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
22 **      CREATION DATE   : Nov 27, 2003
23 **      LAST UPDATE     : Nov 27, 2003
24 **      MODIFICATIONS   : 
25 **************************************************************************/
26
27 /*****************************
28    $Log: rpm_filter.h,v $
29    Revision 1.1  2003-12-04 10:38:09  arjen
30    Major redesign. All input is handled through XML. Raw input data is first
31    transformed into an XML document for further processing.
32    A collection of polymorphic classes handle the transformation of various
33    input formats into XML.
34    Classifying input data is done with a finite improbability calculation.
35
36 *****************************/
37
38 /* static const char *RCSID = "$Id: rpm_filter.h,v 1.1 2003-12-04 10:38:09 arjen Exp $"; */
39
40 #include "message_filter.h"
41 #include "line_cooker.h"
42
43 /*
44 ///////////////////////////////////////////////////////////////////////////
45 //  NAME           : rpm_filter
46 //  BASECLASS      : 
47 //  MEMBERS        :
48 //  OPERATORS      :
49 //  METHODS        : 
50 //
51 //  DESCRIPTION    : 
52 //
53 //  RELATIONS      :
54 //  SEE ALSO       :
55 //  LAST MODIFIED  : Nov 27, 2003
56 ///////////////////////////////////////////////////////////////////////////
57 */
58
59 class rpm_filter : public message_filter
60 {
61
62 protected:
63
64 public:
65
66    rpm_filter(String host, UTC arriv, String service) : message_filter(host, arriv, service)
67    {
68    }
69
70    virtual void construct_XML(message_buffer &in, std::strstream &xml);
71 };
72
73 /*
74 ///////////////////////////////////////////////////////////////////////////
75 //  NAME           : rpm_cooker
76 //  BASECLASS      : 
77 //  MEMBERS        :
78 //  OPERATORS      :
79 //  METHODS        : 
80 //
81 //  DESCRIPTION    : 
82 //
83 //  RELATIONS      :
84 //  SEE ALSO       :
85 //  LAST MODIFIED  : Nov 27, 2003
86 ///////////////////////////////////////////////////////////////////////////
87 */
88
89 class rpm_cooker : public line_cooker
90 {
91
92 protected:
93
94
95 public:
96
97    rpm_cooker()
98    {
99    }
100
101    bool check_pattern(String logline);
102    bool cook_this(String logline, UTC arrival);
103
104    String message_type()
105    {
106       return "package list";
107    }
108
109 };