This file is indexed.

/usr/include/libindi/alignment/ClientAPIForMathPluginManagement.h is in libindi-dev 1.1.0-1ubuntu1.

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
/*!
 * \file ClientAPIForMathPluginManagement.h
 *
 * \author Roger James
 * \date 13th November 2013
 *
 */

#ifndef INDI_ALIGNMENTSUBSYSTEM_CLIENTAPIFORMATHPLUGINMANAGEMENT_H
#define INDI_ALIGNMENTSUBSYSTEM_CLIENTAPIFORMATHPLUGINMANAGEMENT_H

#include <vector>
#include <string>

#include "indibase/basedevice.h"
#include "indibase/baseclient.h"

namespace INDI {
namespace AlignmentSubsystem {

/*!
 * \class ClientAPIForMathPluginManagement
 * \brief This class provides the client API for driver side math plugin management. It communicates
 * with the driver via the INDI properties interface.
 */
class ClientAPIForMathPluginManagement
{
public:
    /// \brief Virtual destructor
    virtual ~ClientAPIForMathPluginManagement() {}

    typedef std::vector<std::string> MathPluginsList;

    // Public methods

    /*!
     * \brief Return a list of the names of the available math plugins.
     * \param[out] AvailableMathPlugins Reference to a list of the names of the available math plugins.
     * \return False on failure
     */
    bool EnumerateMathPlugins(MathPluginsList& AvailableMathPlugins);

    /// \brief Intialise the API
    /// \param[in] BaseClient Pointer to the INDI:BaseClient class
    void Initialise(INDI::BaseClient *BaseClient);

    /** \brief Process new device message from driver. This routine should be called from within
     the newDevice handler in the client. This routine is not normally called directly but is called by
     the ProcessNewDevice function in INDI::Alignment::AlignmentSubsystemForClients which filters out calls
     from unwanted devices. TODO maybe hide this function.
        \param[in] DevicePointer A pointer to the INDI::BaseDevice object.
    */
    void ProcessNewDevice(INDI::BaseDevice *DevicePointer);

    /** \brief Process new property message from driver. This routine should be called from within
     the newProperty handler in the client. This routine is not normally called directly but is called by
     the ProcessNewProperty function in INDI::Alignment::AlignmentSubsystemForClients which filters out calls
     from unwanted devices. TODO maybe hide this function.
        \param[in] PropertyPointer A pointer to the INDI::Property object.
    */
    void ProcessNewProperty(INDI::Property *PropertyPointer);

    /** \brief Process new switch message from driver. This routine should be called from within
     the newSwitch handler in the client. This routine is not normally called directly but is called by
     the ProcessNewSwitch function in INDI::Alignment::AlignmentSubsystemForClients which filters out calls
     from unwanted devices. TODO maybe hide this function.
        \param[in] SwitchVectorProperty A pointer to the INDI::ISwitchVectorProperty.
    */
    void ProcessNewSwitch(ISwitchVectorProperty *SwitchVectorProperty);

    /*!
     * \brief Selects, loads and initialises the named math plugin.
     * \param[in] MathPluginName The name of the required math plugin.
     * \return False on failure.
     */
    bool SelectMathPlugin(const std::string& MathPluginName);

    /*!
     * \brief Re-initialises the current math plugin.
     * \return False on failure.
     */
    bool ReInitialiseMathPlugin();

private:

    // Private methods

    bool SetDriverBusy();
    bool SignalDriverCompletion();
    bool WaitForDriverCompletion();

    // Private properties

    INDI::BaseClient *BaseClient;
    pthread_cond_t DriverActionCompleteCondition;
    pthread_mutex_t DriverActionCompleteMutex;
    bool DriverActionComplete;
    INDI::BaseDevice *Device;
    INDI::Property *MathPlugins;
    INDI::Property *PluginInitialise;

};

} // namespace AlignmentSubsystem
} // namespace INDI

#endif // INDI_ALIGNMENTSUBSYSTEM_CLIENTAPIFORMATHPLUGINMANAGEMENT_H