/* * 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/. */ /** * 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 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(); /** * 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(); void deactivateManagedInstances(); protected: virtual const char* getMethodsDBusIntrospectionXmlData() const; private: CommandControlDBusStubAdapterHelper::StubDispatcherTable stubDispatcherTable_; }; 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_