summaryrefslogtreecommitdiff
path: root/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlStubDefault.h
blob: f4111123653fe733b1dc02b27b3d1f769f206477 (plain)
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
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 2.1.5.201312121915.
* Used org.franca.core 0.8.11.201401091023.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at
* http://mozilla.org/MPL/2.0/.
*/
/**
 * This class implements everything from Audiomanager -> RoutingAdapter
 * @author Christian Mueller
 */
#ifndef ORG_GENIVI_AM_Routing_Control_STUB_DEFAULT_H_
#define ORG_GENIVI_AM_Routing_Control_STUB_DEFAULT_H_


#include <org/genivi/am/RoutingControlStub.h>
#include <sstream>

namespace org {
namespace genivi {
namespace am {

/**
 * Provides a default implementation for RoutingControlStubRemoteEvent and
 * RoutingControlStub. Method callbacks have an empty implementation,
 * remote set calls on attributes will always change the value of the attribute
 * to the one received.
 *
 * Override this stub if you only want to provide a subset of the functionality
 * that would be defined for this service, and/or if you do not need any non-default
 * behaviour.
 */
class RoutingControlStubDefault : public virtual RoutingControlStub {
public:
    RoutingControlStubDefault();

    RoutingControlStubRemoteEvent* initStubAdapter(const std::shared_ptr<RoutingControlStubAdapter>& stubAdapter);

    const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId);


    /**
     * aborts an asynchronous action.
    (at)return E_OK on success, E_UNKNOWN on error,
     *  E_NON_EXISTENT if handle was not found
     */
    virtual void asyncAbort(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle);
    virtual void asyncAbort(am_Handle_s handle);

    /**
     * connects a source to a sink
    (at)return E_OK on success, E_UNKNOWN on error,
     *  E_WRONG_FORMAT in case am_CustomConnectionFormat_t does not match
     */
    virtual void asyncConnect(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle, am_connectionID_t connectionID, am_sourceID_t sourceID, am_sinkID_t sinkID, am_CustomConnectionFormat_t connectionFormat);
    virtual void asyncConnect(am_Handle_s handle, am_connectionID_t connectionID, am_sourceID_t sourceID, am_sinkID_t sinkID, am_CustomConnectionFormat_t connectionFormat);

    /**
     * disconnect a connection with given connectionID
    (at)return E_OK on success,
     *  E_UNKNOWN on error, E_NON_EXISTENT if connection was not found
     */
    virtual void asyncDisconnect(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle, am_connectionID_t connectionID);
    virtual void asyncDisconnect(am_Handle_s handle, am_connectionID_t connectionID);

    /**
     * this method is used to set the volume of a sink. This function is used to drive
     *  ramps, to mute or unmute or directly set the value. The difference is made
     *  through the ramptype.
    (at)return E_OK on success, E_UNKNOWN on error,
     *  E_OUT_OF_RANGE if new volume is out of range
     */
    virtual void asyncSetSinkVolume(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle, am_sinkID_t sinkID, am_volume_t volume, am_CustomRampType_t ramp, am_time_t time);
    virtual void asyncSetSinkVolume(am_Handle_s handle, am_sinkID_t sinkID, am_volume_t volume, am_CustomRampType_t ramp, am_time_t time);

    /**
     * sets the volume of a source. This method is used to set the volume of a sink.
     *  This function is used to drive ramps, to mute or unmute or directly set the
     *  value. The difference is made through the ramptype.
    (at)return E_OK on
     *  success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of
     *  range.
    triggers the acknowledge ackSourceVolumeChange
     */
    virtual void asyncSetSourceVolume(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle, am_sourceID_t sourceID, am_volume_t volume, am_CustomRampType_t ramp, am_time_t time);
    virtual void asyncSetSourceVolume(am_Handle_s handle, am_sourceID_t sourceID, am_volume_t volume, am_CustomRampType_t ramp, am_time_t time);

    /**
     * This function is used to set the source state of a particular
     *  source.
    (at)return E_OK on success, E_UNKNOWN on error
     */
    virtual void asyncSetSourceState(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle, am_sourceID_t sourceID, am_SourceState_e state);
    virtual void asyncSetSourceState(am_Handle_s handle, am_sourceID_t sourceID, am_SourceState_e state);

    /**
     * this function sets the sinksoundproperty.
    (at)return E_OK on success,
     *  E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
     */
    virtual void asyncSetSinkSoundProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle, am_sinkID_t sinkID, am_SoundProperty_L listSoundProperties);
    virtual void asyncSetSinkSoundProperties(am_Handle_s handle, am_sinkID_t sinkID, am_SoundProperty_L listSoundProperties);

    /**
     * this function sets the sinksoundproperty.
    (at)return E_OK on success,
     *  E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
     */
    virtual void asyncSetSinkSoundProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle, am_sinkID_t sinkID, am_SoundProperty_s soundProperty);
    virtual void asyncSetSinkSoundProperty(am_Handle_s handle, am_sinkID_t sinkID, am_SoundProperty_s soundProperty);

    /**
     * this function sets the sourcesoundproperty.
    (at)return E_OK on success,
     *  E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
     */
    virtual void asyncSetSourceSoundProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle, am_sourceID_t sourceID, am_SoundProperty_L listSoundProperties);
    virtual void asyncSetSourceSoundProperties(am_Handle_s handle, am_sourceID_t sourceID, am_SoundProperty_L listSoundProperties);

    /**
     * this function sets the sourcesoundproperty.
    (at)return E_OK on success,
     *  E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range
     */
    virtual void asyncSetSourceSoundProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle, am_sourceID_t sourceID, am_SoundProperty_s soundProperty);
    virtual void asyncSetSourceSoundProperty(am_Handle_s handle, am_sourceID_t sourceID, am_SoundProperty_s soundProperty);

    /**
     * this function triggers crossfading.
    (at)return E_OK on success, E_UNKNOWN on
     *  error
     */
    virtual void asyncCrossFade(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle, am_crossfaderID_t crossfaderID, am_HotSink_e hotSink, am_CustomRampType_t rampType, am_time_t time);
    virtual void asyncCrossFade(am_Handle_s handle, am_crossfaderID_t crossfaderID, am_HotSink_e hotSink, am_CustomRampType_t rampType, am_time_t time);

    /**
     * this function is used for early and late audio functions to set the domain
     *  state
    (at)return E_OK on success, E_UNKNOWN on error
     */
    virtual void setDomainState(const std::shared_ptr<CommonAPI::ClientId> clientId, am_domainID_t domainID, am_DomainState_e domainState, am_Error_e& error);
    virtual void setDomainState(am_domainID_t domainID, am_DomainState_e domainState, am_Error_e& error);

    virtual void asyncSetVolumes(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle, am_Volumes_L volumes);
    virtual void asyncSetVolumes(am_Handle_s handle, am_Volumes_L volumes);

    virtual void asyncSetSinkNotificationConfiguration(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle, am_sinkID_t sinkID, am_NotificationConfiguration_s notificationConfiguration);
    virtual void asyncSetSinkNotificationConfiguration(am_Handle_s handle, am_sinkID_t sinkID, am_NotificationConfiguration_s notificationConfiguration);

    virtual void asyncSetSourceNotificationConfiguration(const std::shared_ptr<CommonAPI::ClientId> clientId, am_Handle_s handle, am_sourceID_t sourceID, am_NotificationConfiguration_s notificationConfiguration);
    virtual void asyncSetSourceNotificationConfiguration(am_Handle_s handle, am_sourceID_t sourceID, am_NotificationConfiguration_s notificationConfiguration);




protected:
private:
    class RemoteEventHandler: public RoutingControlStubRemoteEvent {
     public:
        RemoteEventHandler(RoutingControlStubDefault* defaultStub);


     private:
        RoutingControlStubDefault* defaultStub_;
    };

    RemoteEventHandler remoteEventHandler_;


    CommonAPI::Version interfaceVersion_;
};

} // namespace am
} // namespace genivi
} // namespace org

#endif // ORG_GENIVI_AM_Routing_Control_STUB_DEFAULT_H_