This file is indexed.

/usr/include/paraview/pqCollaborationManager.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
152
153
/*=========================================================================

   Program: ParaView
   Module:    pqCollaborationManager.h

   Copyright (c) 2005-2008 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 _pqCollaborationManager_h
#define _pqCollaborationManager_h

#include "pqCoreModule.h"
#include "vtkSMMessageMinimal.h"
#include <QObject>

class vtkObject;
class pqServer;
class pqView;
class pqPipelineSource;
class vtkSMCollaborationManager;
class QSignalMapper;
class QMouseEvent;

/// pqCollaborationManager is a QObject that aims to handle the collaboration
/// for the Qt layer. This class is used to synchronize the ActiveObject across
/// client instances as well as managing the rendering request when data has
/// been changed by other clients.
/// This class is responsible to synchronize
///    - rendering request
///    - pqProxy internal state
///    - master/slave (enable/disable edition control in UI)
///    - selected active source

class PQCORE_EXPORT pqCollaborationManager : public  QObject
{
  Q_OBJECT
  typedef QObject Superclass;
public:  
  pqCollaborationManager(QObject* parent);
  virtual ~pqCollaborationManager();

  /// Return the vtkSMCollaborationManager
  vtkSMCollaborationManager* activeCollaborationManager();

signals:
  /// This will be triggered by the remote clients to update any interessting
  /// components. This should be triggered by local client to broadcast to
  /// the other clients
  void triggerChatMessage(pqServer* server, int userId, QString& msgContent);

  /// This will forward client_only message to anyone that may interessted when
  /// not managed locally
  void triggerStateClientOnlyMessage(pqServer* origin, vtkSMMessage* msg);

  /// Signal triggered when user information get updated
  /// regardless the active one
  /// A nice thing TODO could be to just forwared from the pqServer but ONLY IF
  /// (activeServer == sender)
  void triggeredMasterUser(int);
  void triggeredMasterChanged(bool);
  void triggeredUserName(int, QString&);
  void triggeredUserListChanged();

  /// This will be triggered when a remote master client has requested the other
  /// users to follow a given camera
  void triggerFollowCamera(int);

public slots:
  /// Slot used to keep track of all possible vtkSMCollaborationManagers
  /// They are unsed in pqCollaborationBehavior to listen the
  /// ServerManagerModel... (preServerAdded/aboutToRemoveServer)
  void onServerAdded(pqServer*);
  void onServerRemoved(pqServer*);

  /// This will be triggered by the triggerChatMessage() signal and will
  /// broadcast to other client a chat message
  void onChatMessage(pqServer* server, int userId, QString& msgContent);

  /// updates the enabled-state for application wide widgets and actions based
  /// whether the application is a master or not.
  /// Widget/Actions need to set a dynamic property named PV_MUST_BE_MASTER or
  /// PV_MUST_BE_MASTER_TO_SHOW. Only the state for widgets/actions with these
  /// any of properties will be updated by this method.
  void updateEnabledState();

  /// Method called localy when user want to broadcast its pointer to
  /// other users.
  void updateMousePointerLocation(QMouseEvent* e);

  /// Method triggered by the internal collaboration Timer.
  /// This timer prevent a network overload by only sending the latest
  /// mouse location to the other clients every 100 ms
  void sendMousePointerLocationToOtherClients();

  /// Method triggered by the internal collaboration Timer.
  /// This timer prevent a network overload by only sending the latest
  /// modified view location to the other clients every 100 ms
  void sendChartViewBoundsToOtherClients();

  /// Attach a mouse listener if its a 3D view so we can share that
  /// information with other clients
  void attachMouseListenerTo3DViews();

  /// Enable/disable local mouse pointer location
  void enableMousePointerSharing(bool);

private slots:
  /// Called when a message has been sent by another client
  /// This method will trigger signals that will be used by other Qt classes
  /// to synchronize their state.
  void onClientMessage(pqServer* server, vtkSMMessage* msg);

  /// Called when a chart view has changed is view bounds
  void onChartViewChange(vtkTypeUInt32 gid, double* bounds);

  /// Show another mouse pointer as overlay to a 3D view.
  /// x et y are normalized based on height/2 where 0 is the center of the
  /// view.
  /// ratioToUse = [both:0, height:1, width: 2]
  void showMousePointer(vtkTypeUInt32 viewId, double x, double y, int ratioToUse);

private:
  pqCollaborationManager(const pqCollaborationManager&);  // Not implemented.
  pqCollaborationManager& operator=(const pqCollaborationManager&); // Not implemented.

  class pqInternals;
  pqInternals* Internals;
};

#endif // !_pqCollaborationManager_h