This file is indexed.

/usr/include/scim-1.0/scim_backend.h is in libscim-dev 1.4.18-2.

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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/** @file scim_backend.h
 *  @brief definition of scim::BackEnd class.
 *
 *  Class scim::BackEnd is used to load and manage IMEngine
 *  modules and IMEngineFactories.
 */

/* 
 * Smart Common Input Method
 * 
 * Copyright (c) 2002-2005 James Su <suzhe@tsinghua.org.cn>
 *
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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 Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA  02111-1307  USA
 *
 * $Id: scim_backend.h,v 1.26 2005/10/06 18:02:06 liuspider Exp $
 */

#ifndef __SCIM_BACKEND_H
#define __SCIM_BACKEND_H

namespace scim {

/**
 * @brief An exception class to hold BackEnd related errors.
 *
 * scim::BackEndBase and its derived classes must throw
 * scim::BackEndError object when error.
 */
class BackEndError: public Exception
{
public:
    BackEndError (const String& what_arg)
        : Exception (String("scim::BackEnd: ") + what_arg) { }
};

/**
 * @brief The interface class to manage a set of IMEngineFactory
 * and IMEngineInstance objects.
 *
 * This is mainly an accessory interface class used by scim::FrontEndBase.
 * Its responsibility is to hold a set of IMEngineFactory instances
 * and manage the locales list supported by them. 
 * 
 * Most developer should just use the default implementation
 * scim::CommonBackEnd.
 */
class BackEndBase : public ReferencedObject
{
    class BackEndBaseImpl;

    BackEndBaseImpl *m_impl;

protected:
    /**
     * @brief Default constructor.
     *
     * @param config  Config object to be used.
     */
    BackEndBase (const ConfigPointer &config);

    virtual ~BackEndBase ();

public:
    /**
     * @brief Get a list of all locales supported by all IMEngineFactories.
     * @return A comma separated locales list.
     */
    String get_all_locales () const;

    /**
     * @return Return the pointer of a Factory.
     *
     * @param uuid The uuid of the IMEngineFactory.
     */
    IMEngineFactoryPointer get_factory (const String &uuid) const;

public:
    /**
     * @name Methods to manipulate IMEngine Factories.
     *
     * @{
     */

    /**
     * @brief Get the IMEngine factories list for specific encoding
     *
     * @param factories the vector to store the factories which
     *                  support the encoding.
     * @param encoding  the encoding to be queried. If empty,
     *                  all IMEngine factories will be returned.
     *
     * @return the number of IMEngine factories found.
     */
    uint32 get_factories_for_encoding (std::vector<IMEngineFactoryPointer> &factories, const String &encoding = String ("")) const;

    /**
     * @brief Get the IMEngine factories list for specific language
     *
     * @param factories the vector to store the factories which
     *                  support the encoding.
     * @param language  the language to be queried. If empty,
     *                  all IMEngine factories will be returned.
     *
     * @return the number of IMEngine factories found.
     */
    uint32 get_factories_for_language (std::vector<IMEngineFactoryPointer> &factories, const String &language = String ("")) const;

    /**
     * @brief Get the default IMEngineFactory for a specific language and encoding.
     *
     * @param language the language to be queried.
     * @param encoding the encoding to be queried, if empty then don't match encoding.
     *
     * @return the pointer of the default IMEngineFactory for this language.
     */
    IMEngineFactoryPointer get_default_factory (const String &language, const String &encoding) const;

    /**
     * @brief Set the default IMEngineFactory for a specific language.
     *
     * @param language the language to be set.
     * @param uuid the uuid of the default IMEngineFactory for this language.
     */
    void set_default_factory (const String &language, const String &uuid);

    /**
     * @brief Get the next IMEngineFactory for a specific language and encoding.
     *
     * @param language the language to be queried, if empty then don't match language.
     * @param encoding the encoding to be queried, if empty then don't match encoding.
     * @param cur_uuid the UUID of current IMEngineFactory.
     *
     * @return the pointer of the next IMEngineFactory for this language and encoding
     *         corresponding to the current IMEngineFactory.
     */
    IMEngineFactoryPointer get_next_factory (const String &language, const String &encoding, const String &cur_uuid) const;

    /**
     * @brief Get the previous IMEngineFactory for a specific language and encoding.
     *
     * @param language the language to be queried, if empty then don't match language.
     * @param encoding the encoding to be queried, if empty then don't match encoding.
     * @param cur_uuid the UUID of current IMEngineFactory.
     *
     * @return the pointer of the previous IMEngineFactory for this language and encoding
     *         corresponding to the current IMEngineFactory.
     */
    IMEngineFactoryPointer get_previous_factory (const String &language, const String &encoding, const String &cur_uuid) const;

    /**
     * @}
     */

protected:

    bool add_factory (const IMEngineFactoryPointer &factory);

    void clear ();
};

/**
 * @typedef typedef Pointer <BackEnd> BackEndPointer;
 *
 * A smart pointer for scim::BackEndBase and its derived classes.
 */
typedef Pointer <BackEndBase> BackEndPointer;

/**
 * @brief The default implementation of scim::BackEndBase interface.
 */
class CommonBackEnd : public BackEndBase
{
    class CommonBackEndImpl;
    CommonBackEndImpl *m_impl;

public:
    /**
     * @brief Constructor
     *
     * @param config The pointer to the Config object.
     * @param modules The list of the IMEngine modules to be loaded.
     */
    CommonBackEnd (const ConfigPointer       &config,
                   const std::vector<String> &modules);

    virtual ~CommonBackEnd ();
};

} // namespace scim

#endif //__SCIM_BACKEND_H

/*
vi:ts=4:nowrap:ai:expandtab
*/