This file is indexed.

/usr/include/x86_64-linux-gnu/alljoyn/controlpanel/ControlPanelDevice.h is in liballjoynservices-dev-1604 16.04-3.

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
/******************************************************************************
 * Copyright AllSeen Alliance. All rights reserved.
 *
 *    Permission to use, copy, modify, and/or distribute this software for any
 *    purpose with or without fee is hereby granted, provided that the above
 *    copyright notice and this permission notice appear in all copies.
 *
 *    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 *    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 *    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 *    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 *    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 *    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 *    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 ******************************************************************************/

#ifndef CONTROLPANELDEVICE2_H_
#define CONTROLPANELDEVICE2_H_

#include <alljoyn/controlpanel/ControlPanelSessionHandler.h>
#include <alljoyn/controlpanel/ControlPanelControllerUnit.h>
#include <alljoyn/controlpanel/NotificationAction.h>
#include <map>

namespace ajn {
namespace services {

class ControlPanelListener;

/**
 * ControlPanelDevice
 */
class ControlPanelDevice {
  public:

    friend class ControlPanelSessionHandler;

    /**
     * Constructor for ControlPanelDevice
     * @param deviceBusName
     */
    ControlPanelDevice(qcc::String const& deviceBusName);

    /**
     * Destructor for ControlPanelDevice
     */
    virtual ~ControlPanelDevice();

    /**
     * startSessionAsync - start a session with Device Asynchronously
     * @return status - success/failure
     */
    QStatus startSessionAsync();

    /**
     * startSession - start session with device synchronously
     * @return status - success/failure
     */
    QStatus startSession();

    /**
     * endSession - endSession with device
     * @return status - success/failure
     */
    QStatus endSession();

    /**
     * ShutDown device - end Session and release units
     * @return status - success/failure
     */
    QStatus shutdownDevice();

    /**
     * getDeviceBusName - get the busName of the device
     * @return deviceBusName - busName of device
     */
    const qcc::String& getDeviceBusName() const;

    /**
     * getSessionId - get the SessionId of the remote Session with device
     * @return const ajn::SessionId
     */
    const ajn::SessionId getSessionId() const;

    /**
     * getDeviceUnits
     * @return the ControlPanelUnits of this Device
     */
    const std::map<qcc::String, ControlPanelControllerUnit*>& getDeviceUnits() const;

    /**
     * getAllControlPanels - fills the passed in vector with all controlPanels contained by this device
     * @param controlPanelsVec - a vector with all the controlPanel defined as children of this DeviceUnit
     */
    void getAllControlPanels(std::vector<ControlPanel*>& controlPanelsVec);

    /**
     * Get an existing unit using the objectPath
     * @param objectPath - objectPath of unit
     * @return ControlPanelUnit pointer
     */
    ControlPanelControllerUnit* getControlPanelUnit(qcc::String const& objectPath);

    /**
     * addControlPanelUnit - add a ControlPanel unit using the objectPath and interfaces passed in
     * @param objectPath - objectPath received in the announce
     * @param interfaces - interfaces received in the announce
     * @return ControlPanelUnit pointer
     */
    ControlPanelControllerUnit* addControlPanelUnit(qcc::String const& objectPath, std::vector<qcc::String> const& interfaces);

    /**
     * addNotificationAction - add a Notification using an objectPath received in a notification
     * @param objectPath - objectPath used to create the NotificationAction
     * @return NotificationAction pointer
     */
    NotificationAction* addNotificationAction(qcc::String const& objectPath);

    /**
     * Delete and shutdown the NotificationAction
     * @param notificationAction - notificationAction to remove
     * @return status - success/failure
     */
    QStatus removeNotificationAction(NotificationAction* notificationAction);

    /**
     * Get the Listener defined for this SessionHandler
     * @return
     */
    ControlPanelListener* getListener() const;

    /**
     * Set the Listener defined for this SessionHandler
     * @param listener
     * @return status - success/failure
     */
    QStatus setListener(ControlPanelListener* listener);

  private:

    /**
     * Private function to handle a Session being joined with this Device
     */
    void handleSessionJoined();

    /**
     * Parse ObjectPath and create a Control Panel unit using the unitName and panel
     * @param objectPath - objectPath to parse
     * @param unitName - unitname will be filled based on the objectPath
     * @param panel - panel will be filled based on the objectPath
     * @param createIfNotFound - create Unit if it is not found in map
     * @return a ControlPanelUnit
     */
    ControlPanelControllerUnit* getControlPanelUnit(qcc::String const& objectPath, qcc::String& unitName, qcc::String& panel, bool createIfNotFound = true);

    /**
     * The Device's BusName
     */
    qcc::String m_DeviceBusName;

    /**
     * SessionHandler for Device
     */
    ControlPanelSessionHandler m_SessionHandler;

    /**
     * Map containing the Devices Units
     */
    std::map<qcc::String, ControlPanelControllerUnit*> m_DeviceUnits;

    /**
     * Listener - can be used to override the default ControlPanelListener of the Device
     */
    ControlPanelListener* m_Listener;

};

} /* namespace services */
} /* namespace ajn */
#endif /* CONTROLPANELDEVICE2_H_ */