This file is indexed.

/usr/include/buteosyncfw5/ProfileField.h is in libbuteosyncfw5-dev 0.7.21+16.04.20151216.1-0ubuntu1.

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
/*
 * This file is part of buteo-syncfw package
 *
 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 *
 * Contact: Sateesh Kavuri <sateesh.kavuri@nokia.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * version 2.1 as published by the Free Software Foundation.
 *
 * 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 library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 *
 */

#ifndef PROFILEFIELD_H
#define PROFILEFIELD_H

#include <QString>
#include <QStringList>

class QDomDocument;
class QDomElement;

namespace Buteo {

class ProfileFieldPrivate;
    
/*! \brief This class represents a profile field.
 *
 * Profile field is a bunch of information about a setting whose value must
 * be defined as a separate key/value pair in some profile. The key name must
 * be same as the profile field name.
 * The class includes functions for accessing the name,
 * type, description and possible values of the setting. Only the name is a
 * mandatory field. The class also has a function for validating a given value
 * against the possible values defined by the field. A ProfileField can be
 * constructed from XML and exported to XML.
 */
class ProfileField
{
public:

    //! Field should be always visible in UI.
    static const QString VISIBLE_ALWAYS;

    //! Field should never be visible in UI.
    static const QString VISIBLE_NEVER;

    //! Field should be visible in UI if a value for the field has not
    // been pre-defined in the sub-profiles loaded by the main profile.
    static const QString VISIBLE_USER;

    //! Field type for boolean fields.
    static const QString TYPE_BOOLEAN;

    /*! \brief Constructs a ProfileField from XML.
     *
     * \param aRoot Root element of the field XML.
     */
    explicit ProfileField(const QDomElement &aRoot);

    /*! \brief Copy constructor.
     *
     * \param aSource Copy source.
     */
    ProfileField(const ProfileField &aSource);

    /*! \brief Destructor.
     */
    ~ProfileField();

    /*! \brief Gets the field name.
     *
     * \return Field name.
     */
    QString name() const;

    /*! \brief Get the field type.
     *
     * \return Field type.
     */
    QString type() const;

    /*! \brief Gets the field default value.
     *
     * \return Field default value.
     */
    QString defaultValue() const;

    /*! \brief Gets the allowed values for the field.
     *
     * \return List of valid values.
     */
    QStringList options() const;

    /*! \brief Gets the field label.
     *
     * The label can be for example displayed in the UI that asks for the field
     * value.
     * \return Field label.
     */
    QString label() const;

    /*! \brief Checks if the given value is in the list of allowed values.
     *
     * If allowed values have not been defined, any value is accepted.
     * \param aValue The value to validate.
     * \return Is the given value in the list of allowed values (options).
     */
    bool validate(const QString &aValue) const;

    /*! \brief Exports the field to XML.
     *
     * \param aDoc Parent document for the created XML elements. The created
     *  elements are not inserted to the document by this function, but the
     *  document is still required for creating the elements.
     * \return The root element of the created XML node tree.
     */
    QDomElement toXml(QDomDocument &aDoc) const;

    /*! \brief Gets the visibility of the field.
     *
     * \return String defining the visibility. See VISIBLE_ constants for
     *  predefined values.
     */
    QString visible() const;

    /*! \brief Checks if the field is read only.
     *
     * UI should not allow modifying the value of a read only field.
     * \return True if readonly.
     */
    bool isReadOnly() const;

private:

    ProfileField& operator=(const ProfileField &aRhs);

    ProfileFieldPrivate *d_ptr;


};

}

#endif // PROFILEFIELD_H