This file is indexed.

/usr/include/mediascanner-1.0/mediascanner/settings.h is in libmediascanner-dev 0.3.93+14.04.20131024.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
/*
 * This file is part of the Ubuntu TV Media Scanner
 * Copyright (C) 2012-2013 Canonical Ltd.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3 as
 * published by the Free Software Foundation.
 *
 * This program 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, see <http://www.gnu.org/licenses/>.
 *
 * Contact: Jim Hodapp <jim.hodapp@canonical.com>
 * Authored by: Mathias Hasselmann <mathias@openismus.com>
 */
#ifndef MEDIASCANNER_SETTINGS_H
#define MEDIASCANNER_SETTINGS_H

// C++ Standard Library
#include <map>
#include <string>
#include <utility>
#include <vector>
#include <functional>

// Media Scanner Library
#include "mediascanner/glibutils.h"

namespace mediascanner {

class Settings {
public:
    class KeyName {
        friend class Settings;

    protected:
        explicit KeyName(const std::string &name)
            : name_(name) {
        }

    private:
        const std::string name_;
    };

    template<typename T> class Key : public KeyName {
        friend class Settings;

    private:
        typedef T value_type;

        explicit Key(const std::string &name)
            : KeyName(name) {
        }
    };

    struct MediaFormat {
        MediaFormat() {
        }

        MediaFormat(const std::string &name,
                    const std::string &caps)
            : name(name)
            , caps(caps) {
        }

        std::string name;
        std::string caps;
    };

    struct MetadataSource {
        typedef std::map<std::string, std::string> Config;

        MetadataSource() {
        }

        MetadataSource(const std::string &plugin_id,
                       const std::string &source_id,
                       const Config &config)
            : plugin_id(plugin_id)
            , source_id(source_id)
            , config(config) {
        }

        std::string plugin_id;
        std::string source_id;
        Config config;
    };

    typedef std::function<void()> ChangeListener;
    typedef std::vector<MediaFormat> MediaFormatList;
    typedef std::vector<MetadataSource> MetadataSourceList;
    typedef std::vector<std::string> StringList;

    static const Key<MediaFormatList> kMandatoryContainers;
    static const Key<MediaFormatList> kMandatoryDecoders;
    static const Key<MetadataSourceList> kMetadataSources;
    static const Key<StringList> kMediaRoots;

    Settings();

    MediaFormatList mandatory_containers() const;
    MediaFormatList mandatory_decoders() const;
    MetadataSourceList metadata_sources() const;
    StringList media_root_urls() const;
    StringList media_root_paths() const;

    template<typename T>
    T lookup(const Key<T> &key) const;

    unsigned connect(const KeyName &key, const ChangeListener &listener) const;
    void disconnect(unsigned handler_id) const;

    std::vector<std::string> LoadMetadataSources() const;
    static std::vector<std::string> LoadMetadataSources
                                        (const MetadataSourceList &sources);

private:
    Wrapper<GSettings> settings_;
};

} // namespace mediascanner

#endif // MEDIASCANNER_SETTINGS_H