This file is indexed.

/usr/include/nemiver/dynmods/nmv-i-conf-mgr.h is in nemiver 0.9.6-1build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
// Author: Dodji Seketeli
/*
 *This file is part of the Nemiver project
 *
 *Nemiver 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 2,
 *or (at your option) any later version.
 *
 *Nemiver 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 Nemiver;
 *see the file COPYING.
 *If not, write to the Free Software Foundation,
 *Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 *See COPYRIGHT file copyright information.
 */
#ifndef __NMV_CONF_MGR_H__
#define __NMV_CONF_MGR_H__

#include "config.h"
#include <boost/variant.hpp>
#include <list>
#include "common/nmv-dynamic-module.h"
#include "common/nmv-env.h"

using nemiver::common::SafePtr;
using nemiver::common::DynamicModule;
using nemiver::common::DynamicModuleSafePtr;
using nemiver::common::DynModIface;
using nemiver::common::ObjectRef;
using nemiver::common::ObjectUnref;
using nemiver::common::UString;

NEMIVER_BEGIN_NAMESPACE (nemiver)

class IConfMgr;
typedef SafePtr<IConfMgr, ObjectRef, ObjectUnref> IConfMgrSafePtr;

class NEMIVER_API IConfMgr : public DynModIface {
    //non copyable
    IConfMgr (const IConfMgr &);
    IConfMgr& operator= (const IConfMgr &);

protected:

    IConfMgr (DynamicModule *a_dynmod) : DynModIface (a_dynmod)
    {
    }

public:

    virtual ~IConfMgr () {}

    virtual const UString& get_default_namespace () const = 0;

    virtual void register_namespace
        (const UString &a_namespace = /*default namespace*/"") = 0;

    virtual bool get_key_value (const UString &a_key,
                                UString &a_value,
                                const UString &a_namespace = "") = 0;
    virtual void set_key_value (const UString &a_key,
                                const UString &a_value,
                                const UString &a_namespace = "") = 0;

    virtual bool get_key_value (const UString &a_key,
                                bool &a_value,
                                const UString &a_namespace = "") = 0;
    virtual void set_key_value (const UString &a_key,
                                bool a_value,
                                const UString &a_namespace = "") = 0;

    virtual bool get_key_value (const UString &a_key,
                                int &a_value,
                                const UString &a_namespace = "") = 0;
    virtual void set_key_value (const UString &a_key,
                                int a_value,
                                const UString &a_namespace = "") = 0;

    virtual bool get_key_value (const UString &a_key,
                                double &a_value,
                                const UString &a_namespace = "") = 0;
    virtual void set_key_value (const UString &a_key,
                                double a_value,
                                const UString &a_namespace = "") = 0;

    virtual bool get_key_value (const UString &a_key,
                                std::list<UString> &a_value,
                                const UString &a_namespace = "") = 0;
    virtual void set_key_value (const UString &a_key,
                                const std::list<UString> &a_value,
                                const UString &a_namespace = "") = 0;

    virtual sigc::signal<void,
                         const UString&,
                         const UString&>& value_changed_signal () = 0;

};//end class IConfMgr

/// Load a dynamic module of a given name, query it for an interface
/// and return it.  But before that, load the proper configuration
/// manager dynamic module and query its interface.
///
/// \param a_dynmod_name the name of dynamic module to load
///
/// \param a_iface_name the name of the interface to query from the 
/// loaded dynamic module
///
/// \param a_confmgr an output argument set to a pointer to the
/// interface of configuration manager that was loaded.
template<class T>
SafePtr<T, ObjectRef, ObjectUnref>
load_iface_and_confmgr (const UString &a_dynmod_name,
                        const UString &a_iface_name,
                        IConfMgrSafePtr &a_confmgr)
{
    typedef SafePtr<T, ObjectRef, ObjectUnref> TSafePtr;

    // Load the confmgr interface
    a_confmgr =
      common::DynamicModuleManager::load_iface_with_default_manager<IConfMgr>
      (CONFIG_MGR_MODULE_NAME, "IConfMgr");

    //Load the IDebugger iterface
    TSafePtr iface =
        common::DynamicModuleManager::load_iface_with_default_manager<T>
        (a_dynmod_name, a_iface_name);
    THROW_IF_FAIL (iface);
    return iface;
}

/// Load a dynamic module of a given name, query it for an interface
/// and return it.  But before that, load the proper configuration
/// manager dynamic module and query its interface.  Initialize the
/// former interface with the interface of the dynamic module.  This
/// function template requires that T has an
/// T::do_init(IConfMgrSafePtr) method.
///
/// \param a_dynmod_name the name of dynamic module to load
///
/// \param a_iface_name the name of the interface to query from the 
/// loaded dynamic module
///
/// \return a pointer (wrapped in a SafePtr) to the interface which
/// name is a_iface_name, initialized with the proper interface of the
/// configuration manager.
template<class T>
SafePtr<T, ObjectRef, ObjectUnref>
load_iface_and_confmgr (const UString &a_dynmod_name,
                        const UString &a_iface_name)
{
    IConfMgrSafePtr m;
    SafePtr<T, ObjectRef, ObjectUnref> result;
    result = load_iface_and_confmgr<T> (a_dynmod_name, a_iface_name, m);
    result->do_init (m);
    return result;
}


NEMIVER_END_NAMESPACE(nemiver)

#endif //__NMV_CONF_MGR_H__