diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/IAmControl.h | 56 | ||||
-rw-r--r-- | include/IAmRouting.h | 48 | ||||
-rwxr-xr-x | include/audiomanagertypes.h | 1 |
3 files changed, 105 insertions, 0 deletions
diff --git a/include/IAmControl.h b/include/IAmControl.h index 32008a0..0dd46e5 100644 --- a/include/IAmControl.h +++ b/include/IAmControl.h @@ -439,6 +439,12 @@ public: */
virtual am_Error_e getCrossfaderInfoDB(const am_crossfaderID_t crossfaderID, am_Crossfader_s& crossfaderData) const =0;
/**
+ * returns details of a connection, including involved sources and sinks
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if
+ * crossfader was not found
+ */
+ virtual am_Error_e getConnectionInfoDB(const am_connectionID_t connectionID, am_Connection_s& connectionData) const =0;
+ /**
* returns sources and the sink of a crossfader
* @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if
* crossfader was not found
@@ -554,6 +560,24 @@ public: * confirmRoutingRundown.
*/
virtual void setRoutingRundown() =0;
+
+ /**
+ * Hand-over to routing-side application any connection meant to survive AM shutdown
+ * (see page @ref early)
+ *
+ * @param handle: composite identifier used to map the response
+ * @param domainID: target domain which shall take over
+ * @param mainConnectionID: subject of this request
+ *
+ * @return E_OK if command was forwarded to routing adapter successfully,
+ * E_COMMUNICATION or other meaningful value otherwise
+ *
+ * @note Success of the responsibility transfer itself is acknowledged through corresponding
+ * function @ref am::IAmControlSend::cbAckTransferConnection "cbAckTransferConnection()".
+ */
+ virtual am_Error_e transferConnection(am_Handle_s &handle
+ , am_mainConnectionID_t mainConnectionID, am_domainID_t domainID) = 0;
+
/**
* acknowledges the setControllerReady call.
*/
@@ -858,6 +882,25 @@ public: * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
*/
virtual am_Error_e hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID) =0;
+
+ /**
+ * Support announcement of audio connections already active at AM startup
+ *
+ * @param domainID: home domain announcing this early connection
+ * @param mainConnectionData: details of main connection
+ * @param route: route details as requested from routing side
+ *
+ * @return success indicator. Controller should use E_OK on success,
+ * E_ALREADY_EXISTS or E_NO_CHANGE if given connection is already registered,
+ * E_DATABASE_ERROR if any of the listed sources or sinks does not exist in the data base,
+ * E_NOT_POSSIBLE if feature is not supported by the controller
+ */
+ virtual am_Error_e hookSystemRegisterEarlyMainConnection(am_domainID_t domainID
+ , const am_MainConnection_s &mainConnectionData, const am_Route_s &route)
+ {
+ return E_NOT_POSSIBLE; // empty default implementation
+ }
+
/**
* volumeticks. therse are used to indicate volumechanges during a ramp
*/
@@ -905,6 +948,19 @@ public: * ack for disconnect
*/
virtual void cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID) =0;
+
+ /**
+ * Hand-over acknowledgment of connections surviving shutdown of the AM,
+ * forwarded from routing side (see @ref IAmRoutingReceive::ackTransferConnection)
+ *
+ * @param handle: composite identifier mirrored from request
+ * @param errorID: success indicator as obtained from routing side application
+ */
+ virtual void cbAckTransferConnection(const am_Handle_s /* handle */, const am_Error_e /* errorID */)
+ {
+ // empty default implementation
+ }
+
/**
* ack for crossfading
*/
diff --git a/include/IAmRouting.h b/include/IAmRouting.h index 1acaac6..b86e782 100644 --- a/include/IAmRouting.h +++ b/include/IAmRouting.h @@ -139,6 +139,34 @@ public: * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
*/
virtual am_Error_e deregisterDomain(const am_domainID_t domainID) =0;
+
+ /**
+ * Support announcement of audio connections already active at AM startup
+ *
+ * @param domainID: home domain announcing this early connection
+ * @param route: list of connection segments
+ * @param state: either stable CS_CONNECTED, CS_DISCONNECTED, CS_SUSPENDED
+ * or transient CS_CONNECTING, CS_DISCONNECTING
+ *
+ * @return success indicator as obtained from the controller
+ *
+ * @note If the connection is announced with one of the transient states
+ * CS_CONNECTING or CS_DISCONNECTING, a secondary registerEarlyConnection()
+ * call is expected once a stable state is reached
+ */
+ virtual am_Error_e registerEarlyConnection(am_domainID_t domainID, const am_Route_s &route
+ , am_ConnectionState_e state) = 0;
+
+ /**
+ * Notify hand-over acknowledgment of connections surviving shutdown of the AM
+ *
+ * @param handle: composite identifier used in the request
+ * @param errorID: success indicator as obtained from the routing-side application,
+ * e.g. E_OK if the application assumes full responsibility,
+ * any meaningful error condition otherwise
+ */
+ virtual void ackTransferConnection(const am_Handle_s handle, const am_Error_e errorID) = 0;
+
/**
* registers a converter. @return E_OK on succes, E_ALREADY_EXISTENT if already
* registered E_UNKOWN on error
@@ -385,6 +413,26 @@ public: * or be ready again.
*/
virtual void setRoutingRundown(const uint16_t handle) =0;
+
+ /**
+ * Forward hand-over of a connection meant to survive AM shutdown
+ * in routing-side application
+ *
+ * @param handle: composite identifier used to map the response
+ * @param domainID: target domain for this offering
+ * @param route: names of involved sources and sinks including intermediate gateways
+ * @param state: either stable CS_CONNECTED, CS_DISCONNECTED, CS_SUSPENDED
+ * or transient CS_CONNECTING, CS_DISCONNECTING
+ *
+ * @return success indicator as obtained from the plugins, e.g E_OK or E_COMMUNICATION
+ */
+ virtual am_Error_e asyncTransferConnection(const am_Handle_s handle, am_domainID_t domainID
+ , const std::vector<std::pair<std::string, std::string>> &route
+ , am_ConnectionState_e state)
+ {
+ return E_NOT_POSSIBLE; // default response if not supported by the plugin
+ }
+
/**
* aborts an asynchronous action.
* @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if handle was not
diff --git a/include/audiomanagertypes.h b/include/audiomanagertypes.h index 99e01e2..469fcd5 100755 --- a/include/audiomanagertypes.h +++ b/include/audiomanagertypes.h @@ -451,6 +451,7 @@ enum am_Handle_e H_SETVOLUMES = 11,
H_SETSINKNOTIFICATION = 12,
H_SETSOURCENOTIFICATION = 13,
+ H_TRANSFERCONNECTION = 14,
H_MAX
};
|