~ubuntu-branches/ubuntu/trusty/libprelude/trusty

« back to all changes in this revision

Viewing changes to bindings/c++/include/idmef-path.hxx

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2009-04-29 11:31:50 UTC
  • mfrom: (1.1.12 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090429113150-qw9oxc1e50ldljck
Tags: 0.9.22-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Build-Depend on libltdl7-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****
 
2
*
 
3
* Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved.
 
4
* Author: Yoann Vandoorselaere <yoann@prelude-ids.com>
 
5
*
 
6
* This file is part of the Prelude library.
 
7
*
 
8
* This program is free software; you can redistribute it and/or modify
 
9
* it under the terms of the GNU General Public License as published by
 
10
* the Free Software Foundation; either version 2, or (at your option)
 
11
* any later version.
 
12
*
 
13
* This program is distributed in the hope that it will be useful,
 
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
* GNU General Public License for more details.
 
17
*
 
18
* You should have received a copy of the GNU General Public License
 
19
* along with this program; see the file COPYING.  If not, write to
 
20
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
21
*
 
22
*****/
 
23
 
 
24
#ifndef _LIBPRELUDE_IDMEF_PATH_HXX
 
25
#define _LIBPRELUDE_IDMEF_PATH_HXX
 
26
 
 
27
#include "prelude.h"
 
28
#include "idmef-path.h"
 
29
 
 
30
#include "idmef.hxx"
 
31
#include "prelude-error.hxx"
 
32
#include "idmef-value.hxx"
 
33
 
 
34
 
 
35
namespace Prelude {
 
36
        class IDMEFPath {
 
37
            private:
 
38
                idmef_path_t *_path;
 
39
 
 
40
            public:
 
41
                IDMEFPath(const char *buffer);
 
42
                IDMEFPath(idmef_path_t *path);
 
43
                IDMEFPath(const IDMEFPath &path);
 
44
                ~IDMEFPath();
 
45
 
 
46
                Prelude::IDMEFValue Get(Prelude::IDMEF &message);
 
47
                void Set(Prelude::IDMEF &message, Prelude::IDMEFValue *value);
 
48
                void Set(Prelude::IDMEF &message, Prelude::IDMEFValue &value);
 
49
                void Set(Prelude::IDMEF &message, Prelude::IDMEFTime &time);
 
50
                void Set(Prelude::IDMEF &message, std::string value);
 
51
                void Set(Prelude::IDMEF &message, const char *value);
 
52
                void Set(Prelude::IDMEF &message, int8_t value);
 
53
                void Set(Prelude::IDMEF &message, uint8_t value);
 
54
                void Set(Prelude::IDMEF &message, int16_t value);
 
55
                void Set(Prelude::IDMEF &message, uint16_t value);
 
56
                void Set(Prelude::IDMEF &message, int32_t value);
 
57
                void Set(Prelude::IDMEF &message, uint32_t value);
 
58
                void Set(Prelude::IDMEF &message, int64_t value);
 
59
                void Set(Prelude::IDMEF &message, uint64_t value);
 
60
                void Set(Prelude::IDMEF &message, float value);
 
61
                void Set(Prelude::IDMEF &message, double value);
 
62
 
 
63
                idmef_class_id_t GetClass(int depth=-1);
 
64
                idmef_value_type_id_t GetValueType(int depth=-1);
 
65
                int SetIndex(unsigned int index, int depth=-1);
 
66
                int UndefineIndex(int depth=-1);
 
67
                int GetIndex(int depth=-1);
 
68
                int MakeChild(const char *child_name, unsigned int index);
 
69
                int MakeParent();
 
70
                int Compare(IDMEFPath *path, int depth=-1);
 
71
                IDMEFPath Clone();
 
72
 
 
73
                //ref ?
 
74
                const char *GetName(int depth=-1);
 
75
                bool IsAmbiguous();
 
76
                int HasLists();
 
77
                bool IsList(int depth=-1);
 
78
                unsigned int GetDepth();
 
79
 
 
80
                IDMEFPath &operator = (const IDMEFPath &path);
 
81
        };
 
82
};
 
83
 
 
84
#endif