This file is indexed.

/usr/include/paraview/pqServerConfigurationImporter.h is in paraview-dev 5.0.1+dfsg1-4.

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
/*=========================================================================

   Program: ParaView
   Module:    $RCSfile$

   Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc.
   All rights reserved.

   ParaView is a free software; you can redistribute it and/or modify it
   under the terms of the ParaView license version 1.2. 
   
   See License_v1.2.txt for the full ParaView license.
   A copy of this license can be obtained by contacting
   Kitware Inc.
   28 Corporate Drive
   Clifton Park, NY 12065
   USA

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

========================================================================*/
#ifndef pqServerConfigurationImporter_h
#define pqServerConfigurationImporter_h

#include <QObject>
#include <QList>
#include "pqComponentsModule.h"
#include "pqServerConfiguration.h"

class QAuthenticator;
class QNetworkReply;
class QUrl;

/// pqServerConfigurationImporter class can be used to import remote server
/// configurations.
class PQCOMPONENTS_EXPORT pqServerConfigurationImporter : public QObject
{
  Q_OBJECT
  typedef QObject Superclass;
public:
  pqServerConfigurationImporter(QObject* parent=0);
  virtual ~pqServerConfigurationImporter();

  enum SourceMode
    {
    PVSC
    };

  /// Add source URL. Currently, we only support pvsc sources. In future we may
  /// support other types of sources.
  /// For every url added, the following locations are tried, in the specific
  /// order:
  /// \li ${url}
  /// \li ${url}/v{major_version}.{minor_version}/[win32|macos|nix]/servers.pvsc
  /// \li ${url}/v{major_version}.{minor_version}/[win32|macos|nix]/servers.xml
  /// \li ${url}/v{major_version}.{minor_version}/servers.pvsc
  /// \li ${url}/v{major_version}.{minor_version}/servers.xml
  /// \li ${url}/servers.pvsc
  /// \li ${url}/servers.xml
  /// The search stops as soon as a url returns a valid servers configuration
  /// file. Note all paths are case-sensitive.
  void addSource(const QString& name, const QUrl& url, SourceMode mode=PVSC);

  /// Remove all added sources.
  void clearSources();

  class Item
    {
  public:
    /// Points to the server configuration.
    pqServerConfiguration Configuration;

    /// Refers to the user-friendly name for the source defined in the
    /// configurations file.
    QString SourceName;
    };

  /// Returns the fetched configurations. If fetchConfigurations() was aborted
  /// using abortFetch(), then this list may be partially filled.
  /// Also, this list include all server configurations fetched, without
  /// checking if some of these configurations are already present in
  /// pqServerConfigurationCollection maintained by pqApplicationCore.
  const QList<Item>& configurations() const;

public slots:
  /// Use this method to fetch server configurations from urls specified.
  /// This call blocks until all configurations are fetched. It uses a
  /// QEventLoop internally to wait for the network communication. One can
  /// abort the waiting by using abortFetch().
  /// Refer to pqServerConnectDialog::fetchServers() for details on using
  /// fetchConfigurations() and abortFetch().
  void fetchConfigurations();

  /// Aborts blocking in fetchConfigurations(). Has any effect only when
  /// fetchConfigurations() has blocked.
  void abortFetch();

signals:
  /// fired as source configurations are fetched. Makes it possible to build
  /// interfaces that are populated as new configurations arrive, rather than
  /// waiting for the entire fetchConfigurations() to complete.
  void incrementalUpdate();

  /// fired at end of fetchConfigurations() call.
  void configurationsUpdated();

  /// this signal is fired whenever the source-url requests authentication
  /// before delivering the contents. Refer to
  /// QNetworkAccessManager::authenticationRequired() for details.
  void authenticationRequired(QNetworkReply*, QAuthenticator*);

  /// fired when abortFetch() is called. An internal signal, not really useful
  /// for external components.
  void abortFetchTriggered();

  /// this class posts miscellaneous information about the network communication
  /// using this signal.
  void message(const QString& message);

protected:
  /// Called after data from each source is fetched fully. This will process the
  /// fetched data and update the configurations list. May fire
  /// incrementalUpdate() if configurations were updated.
  bool processDownloadedContents();

  /// Returns true if valid config was fetched and processed from the URL,
  /// otherwise returns false.
  bool fetch(const QUrl& url);

private slots:
  /// called data is available on the network request.
  void readCurrentData();

private:
  Q_DISABLE_COPY(pqServerConfigurationImporter)

  class pqInternals;
  pqInternals* Internals;
};

#endif