/* * This file was generated by the CommonAPI Generators. * Used org.genivi.commonapi.core 2.1.6.v20140519. * 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/. */ /** * The interface towards the Controlling Instance (e.g HMI). It handles the * communication towards the HMI and other system components who need to interact * with the audiomanagement. There are two rules that have to be kept in mind * when implementing against this interface: * @author Christian Mueller */ #ifndef ORG_GENIVI_AM_Command_Control_DBUS_STUB_ADAPTER_H_ #define ORG_GENIVI_AM_Command_Control_DBUS_STUB_ADAPTER_H_ #include #if !defined (COMMONAPI_INTERNAL_COMPILATION) #define COMMONAPI_INTERNAL_COMPILATION #endif #include #include #include #include #undef COMMONAPI_INTERNAL_COMPILATION namespace org { namespace genivi { namespace am { typedef CommonAPI::DBus::DBusStubAdapterHelper CommandControlDBusStubAdapterHelper; class CommandControlDBusStubAdapterInternal: public virtual CommandControlStubAdapter, public CommandControlDBusStubAdapterHelper { public: CommandControlDBusStubAdapterInternal( const std::shared_ptr& factory, const std::string& commonApiAddress, const std::string& dbusInterfaceName, const std::string& dbusBusName, const std::string& dbusObjectPath, const std::shared_ptr& dbusConnection, const std::shared_ptr& stub); ~CommandControlDBusStubAdapterInternal(); virtual const bool hasFreedesktopProperties(); /** * Callback that is called when the number of connections change */ void fireNewMainConnectionEvent(const am_MainConnectionType_s& mainConnection); /** * Callback that is called when the number of connections change */ void fireRemovedMainConnectionEvent(const am_mainConnectionID_t& mainConnection); /** * Callback that is called when the number of sinks change */ void fireNewSinkEvent(const am_SinkType_s& sink); /** * Callback that is called when the number of sinks change */ void fireRemovedSinkEvent(const am_sinkID_t& sinkID); /** * Callback that is called when the number of sources change */ void fireNewSourceEvent(const am_SourceType_s& source); /** * Callback that is called when the number of sources change */ void fireRemovedSourceEvent(const am_sourceID_t& source); /** * this callback is fired if the number of sink classes changed */ void fireNumberOfSinkClassesChangedEvent(); /** * this callback is fired if the number of source classes changed */ void fireNumberOfSourceClassesChangedEvent(); /** * This callback is called when the ConnectionState of a connection changed. */ void fireMainConnectionStateChangedEvent(const am_mainConnectionID_t& connectionID, const am_ConnectionState_e& connectionState); /** * this callback indicates that a sinkSoundProperty has changed. */ void fireMainSinkSoundPropertyChangedEvent(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty); /** * this callback indicates that a sourceSoundProperty has changed. */ void fireMainSourceSoundPropertyChangedEvent(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty); /** * this callback is called when the availability of a sink has changed */ void fireSinkAvailabilityChangedEvent(const am_sinkID_t& sinkID, const am_Availability_s& availability); /** * this callback is called when the availability of source has changed. */ void fireSourceAvailabilityChangedEvent(const am_sourceID_t& sourceID, const am_Availability_s& availability); /** * this callback indicates a volume change on the indicated sink */ void fireVolumeChangedEvent(const am_sinkID_t& sinkID, const am_mainVolume_t& volume); /** * this callback indicates a mute state change on a sink. */ void fireSinkMuteStateChangedEvent(const am_sinkID_t& sinkID, const am_MuteState_e& muteState); /** * is fired if a systemProperty changed */ void fireSystemPropertyChangedEvent(const am_SystemProperty_s& systemProperty); /** * This callback is fired if the timinginformation for a mainConnectionID changed */ void fireTimingInformationChangedEvent(const am_mainConnectionID_t& mainConnectionID, const am_timeSync_t& time); /** * This callback is called when a sink is updated. */ void fireSinkUpdatedEvent(const am_sinkID_t& sinkID, const am_sinkClass_t& sinkClassID, const am_MainSoundProperty_L& listMainSoundProperties); /** * This callback is called when a source is updated. */ void fireSourceUpdatedEvent(const am_sourceID_t& sourceID, const am_sourceClass_t& sourceClassID, const am_MainSoundProperty_L& listMainSoundProperties); /** * This callback is called when a notificated value of a sink changes. */ void fireSinkNotificationEvent(const am_sinkID_t& sinkID, const am_NotificationPayload_s& notification); /** * This callback is called when a notifcated value of a source changes. */ void fireSourceNotificationEvent(const am_sourceID_t& sourceID, const am_NotificationPayload_s& notification); /** * This callback is triggered when a mainNotificationConfiguration is changed. */ void fireMainSinkNotificationConfigurationChangedEvent(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration); /** * This callback is triggered when a mainNotificationConfiguration is changed. */ void fireMainSourceNotificationConfigurationChangedEvent(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration); const CommandControlDBusStubAdapterHelper::StubDispatcherTable& getStubDispatcherTable(); const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); void deactivateManagedInstances(); static CommonAPI::DBus::DBusGetAttributeStubDispatcher< CommandControlStub, CommonAPI::Version > getCommandControlInterfaceVersionStubDispatcher; /** * connects a source to sink (at)return E_OK on success, E_NOT_POSSIBLE on * failure, E_ALREADY_EXISTS if the connection does already exists */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > connectStubDispatcher; /** * disconnects a mainConnection (at)return E_OK on successes, E_NON_EXISTENT if * the connection does not exist, E_NOT_POSSIBLE on error. */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > disconnectStubDispatcher; /** * sets the volume for a sink (at)return E_OK on success, E_UNKOWN on error, * E_OUT_OF_RANGE in case the value is out of range */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > setVolumeStubDispatcher; /** * This function is used to increment or decrement the current volume for a * sink. (at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the * value is not in the given volume range. */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > volumeStepStubDispatcher; /** * sets the mute state of a sink (at)return E_OK on success, E_UNKNOWN on error. * If the mute state is already the desired one, the Daemon will return E_OK. */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > setSinkMuteStateStubDispatcher; /** * This method is used to set sound properties, e.g. Equalizer Values. Since the * capabilities of the system can differ, the exact key value pairs can be * extended in each product (at)return E_OK on success, E_OUT_OF_RANGE if value * exceeds range, E_UNKNOWN in case of an error */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > setMainSinkSoundPropertyStubDispatcher; /** * This method is used to set sound properties, e.g. Equalizer Values. Since the * capabilities of the system can differ, the exact key value pairs can be * extended in each product (at)return E_OK on success, E_OUT_OF_RANGE if value * exceeds range, E_UNKNOWN in case of an error */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > setMainSourceSoundPropertyStubDispatcher; /** * is used to set a specific system property. (at)return E_OK on success, * E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > setSystemPropertyStubDispatcher; /** * returns the actual list of MainConnections (at)return E_OK on success, * E_DATABASE_ERROR on error */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple<>, std::tuple > getListMainConnectionsStubDispatcher; /** * returns the actual list of Sinks (at)return E_OK on success, E_DATABASE_ERROR * on error */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple<>, std::tuple > getListMainSinksStubDispatcher; /** * returns the actual list of Sources (at)return E_OK on success, E_DATABASE_ERROR * on error */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple<>, std::tuple > getListMainSourcesStubDispatcher; /** * This is used to retrieve all source sound properties related to a source. * Returns a vector of the sound properties and values as pair (at)return E_OK on * success, E_DATABASE_ERROR on error */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > getListMainSinkSoundPropertiesStubDispatcher; /** * This is used to retrieve all source sound properties related to a * source. (at)return E_OK on success, E_DATABASE_ERROR on error */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > getListMainSourceSoundPropertiesStubDispatcher; /** * This is used to retrieve SourceClass Information of all source classes * (at)return E_OK on success, E_DATABASE_ERROR on error */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple<>, std::tuple > getListSourceClassesStubDispatcher; /** * This is used to retrieve SinkClass Information of all sink classes (at)return * E_OK on success, E_DATABASE_ERROR on error */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple<>, std::tuple > getListSinkClassesStubDispatcher; /** * Retrieves a complete list of all systemProperties. (at)return E_OK on success, * E_DATABASE_ERROR on error */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple<>, std::tuple > getListSystemPropertiesStubDispatcher; /** * returns the delay in ms that the audiopath for the given mainConnection * has (at)return E_OK on success, E_NOT_POSSIBLE if timing information is not * yet retrieved, E_DATABASE_ERROR on read error on the database */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > getTimingInformationStubDispatcher; /** * Retrieves the list of MainNotifications for a sink. Does not return the * possible ones. */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > getListMainSinkNotificationConfigurationsStubDispatcher; /** * Retrieves the list of MainNotifications for a source. Does not return the * possible ones. */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > getListMainSourceNotificationConfigurationsStubDispatcher; /** * sets a MainNotificationConfiuration. This can be used to turn on an off * notifications an to change the mode of the configuration. (at)return E_OK on * success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > setMainSinkNotificationConfigurationStubDispatcher; /** * sets a MainNotificationConfiuration. This can be used to turn on an off * notifications an to change the mode of the configuration. (at)return E_OK on * success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error */ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple, std::tuple > setMainSourceNotificationConfigurationStubDispatcher; protected: virtual const char* getMethodsDBusIntrospectionXmlData() const; private: CommandControlDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; CommonAPI::DBus::StubAttributeTable stubAttributeTable_; }; class CommandControlDBusStubAdapter: public CommandControlDBusStubAdapterInternal, public std::enable_shared_from_this { public: CommandControlDBusStubAdapter( const std::shared_ptr& factory, const std::string& commonApiAddress, const std::string& dbusInterfaceName, const std::string& dbusBusName, const std::string& dbusObjectPath, const std::shared_ptr& dbusConnection, const std::shared_ptr& stub) : CommonAPI::DBus::DBusStubAdapter( factory, commonApiAddress, dbusInterfaceName, dbusBusName, dbusObjectPath, dbusConnection, false), CommandControlDBusStubAdapterInternal( factory, commonApiAddress, dbusInterfaceName, dbusBusName, dbusObjectPath, dbusConnection, stub) { } }; } // namespace am } // namespace genivi } // namespace org #endif // ORG_GENIVI_AM_Command_Control_DBUS_STUB_ADAPTER_H_