[asterisk-scf-commits] asterisk-scf/integration/slice.git branch "operation-context" created.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Fri Jan 20 13:13:56 CST 2012
branch "operation-context" has been created
at 822d3bbf08cf015c720ce5204503d7e1e33e4f30 (commit)
- Log -----------------------------------------------------------------
commit 822d3bbf08cf015c720ce5204503d7e1e33e4f30
Author: Brent Eagles <beagles at digium.com>
Date: Fri Jan 20 15:43:11 2012 -0330
Adding a file containing an initial definition for an OperationContext class.
diff --git a/slice/AsteriskSCF/System/OperationsIf.ice b/slice/AsteriskSCF/System/OperationsIf.ice
new file mode 100644
index 0000000..7df02b9
--- /dev/null
+++ b/slice/AsteriskSCF/System/OperationsIf.ice
@@ -0,0 +1,83 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2010, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk SCF project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+
+#pragma once
+
+module AsteriskSCF
+{
+
+module System
+{
+
+module V1
+{
+
+/**
+ *
+ * The OperationContext and related Slice definitions are part of a design approach to ensure that operations may be
+ * made idempotent where there might not normally be sufficient information to ensure the required semantics.
+ *
+ */
+
+/**
+ *
+ * The CancellationReason enumeration covers the basic reasons why an operation might be cancelled. An Ice object may
+ * communicate the reason an operation might be cancelled through the OperationCancelledOperation.
+ *
+ */
+enum CancellationReason
+{
+ Duplicate, /* The operation has already been initiated and cannot be replaced. */
+ TimedOut, /* The operation has been cancelled because it was unable to completed within the configured time
+ * constraints */
+ Superseded /* The operation has been re-initiated by another party, so this instance has been cancelled */
+};
+
+/**
+ *
+ * An OperationCancelledException may be included in an Slice interface method definition and thrown by an Ice object
+ * if it were participating in a logical operation.
+ *
+ */
+exception OperationCancelledException
+{
+ string operationId;
+ CancellationReason reason;
+};
+
+/**
+ *
+ * An abstraction of a logical operational context. May be used to identify a group of operations as being related to
+ * each other, allowing a normally non-idempotent operation to be made idempotent, etc. Interface methods that accept
+ * an OperationContext instance may throw a OperationCancelled exception.
+ *
+ * Note: possible uses of extension include rudimentary transactional context, etc.
+ *
+ **/
+unsliceable class OperationContext
+{
+ /**
+ * A relatively unique identifier.
+ */
+ string id;
+};
+
+
+}; /* End of V1 */
+
+}; /* End of System */
+
+}; /* End of AsteriskSCF */
commit bbc3e68660a5f699b0e7df4209b5733e5c755d28
Author: Joshua Colp <jcolp at digium.com>
Date: Thu Jan 5 17:56:41 2012 -0400
Add interfaces for media extraction and injection. (issue ASTSCF-23)
diff --git a/slice/AsteriskSCF/Media/MediaExtractionIf.ice b/slice/AsteriskSCF/Media/MediaExtractionIf.ice
new file mode 100644
index 0000000..16b7d86
--- /dev/null
+++ b/slice/AsteriskSCF/Media/MediaExtractionIf.ice
@@ -0,0 +1,127 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2011, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk SCF project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+
+#pragma once
+
+#include <AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice>
+#include <AsteriskSCF/Media/MediaIf.ice>
+
+module AsteriskSCF
+{
+
+module Media
+{
+
+module V1
+{
+ /**
+ * Class which contains the specific session and stream that is part of the extraction request.
+ */
+ class ExtractSessionStreamInfo
+ {
+ /**
+ * Session that the stream belongs to.
+ */
+ AsteriskSCF::SessionCommunications::V1::Session* session;
+
+ /**
+ * The specific stream to extract.
+ */
+ string stream;
+ };
+
+ /**
+ * Sequence of session stream information classes.
+ */
+ sequence<ExtractSessionStreamInfo> ExtractSessionStreamInfoSeq;
+
+ /**
+ * Class which describes the sessions and streams to be extracted.
+ */
+ class ExtractRequestInfo
+ {
+ /**
+ * A sequence of sessions and streams. Frames from the streams will be mixed
+ * together and sent to the provided sink. The extraction request will not proceed
+ * if the streams are incompatible with each other or if the frames can not be mixed.
+ */
+ ExtractSessionStreamInfoSeq streams;
+
+ /**
+ * Format that the mixed media should be provided in. If not specified the media will be
+ * passed through without translation.
+ */
+ AsteriskSCF::Media::V1::Format format;
+ };
+
+ /**
+ * A dictionary of extractions.
+ *
+ * The key is a unique identifier for the extraction request that will be provided with the
+ * ExtractInstance if the extraction request was successful.
+ *
+ */
+ dictionary<int, ExtractRequestInfo> ExtractRequestInfoDict;
+
+ /**
+ * Class which is populated with extraction details if the request could successfully
+ * be achieved.
+ */
+ unsliceable class ExtractInstance
+ {
+ /**
+ * The source that will provide media of the streams requested for extraction.
+ */
+ AsteriskSCF::Media::V1::StreamSource* source;
+ };
+
+ /**
+ * A dictionary of extraction instances.
+ *
+ * The key is the unique identifier provided with the extraction request.
+ */
+ dictionary<int, ExtractInstance> ExtractInstanceDict;
+
+ /**
+ * A sequence of extraction instances.
+ */
+ sequence<ExtractInstance> ExtractInstanceSeq;
+
+ /**
+ * Interface used to request media extraction.
+ */
+ interface Extractor
+ {
+ /**
+ * Method used to request that media extraction occurs.
+ *
+ * @param requests The media extraction requests.
+ *
+ * @return ExtractInstanceDict A dictionary of media extraction instances.
+ */
+ ExtractInstanceDict startExtraction(ExtractRequestInfoDict requests);
+
+ /**
+ * Method used to request that media extraction stop.
+ *
+ * @param instances The media extraction instances that should stop.
+ */
+ void stopExtraction(ExtractInstanceSeq instances);
+ };
+
+}; /* end module V1 */
+}; /* end module Media */
+}; /* end module AsteriskSCF */
diff --git a/slice/AsteriskSCF/Media/MediaInjectionIf.ice b/slice/AsteriskSCF/Media/MediaInjectionIf.ice
new file mode 100644
index 0000000..714e0e9
--- /dev/null
+++ b/slice/AsteriskSCF/Media/MediaInjectionIf.ice
@@ -0,0 +1,126 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2011, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk SCF project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+
+#pragma once
+
+#include <AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice>
+#include <AsteriskSCF/Media/MediaIf.ice>
+
+module AsteriskSCF
+{
+
+module Media
+{
+
+module V1
+{
+ /**
+ * Class which contains the specific session and stream that is part of the injection request.
+ */
+ class InjectSessionStreamInfo
+ {
+ /**
+ * Session that the stream belongs to.
+ */
+ AsteriskSCF::SessionCommunications::V1::Session* session;
+
+ /**
+ * The specific stream to extract.
+ */
+ string stream;
+ };
+
+ /**
+ * Sequence of session stream information classes.
+ */
+ sequence<InjectSessionStreamInfo> InjectSessionStreamInfoSeq;
+
+ /**
+ * Class which describes the sessions and streams that will receive injected media.
+ */
+ class InjectRequestInfo
+ {
+ /**
+ * A sequence of sessions and streams. Frames from the injection source will be mixed
+ * with media destined for the streams. If this can not occur the injection request will
+ * not proceed.
+ */
+ InjectSessionStreamInfoSeq streams;
+
+ /**
+ * Format that the injected media should be provided in. This must be specified.
+ */
+ AsteriskSCF::Media::V1::Format format;
+ };
+
+ /**
+ * A dictionary of injections.
+ *
+ * The key is a unique identifier for the injection request that will be provided with the
+ * InjectInstance if the injection request was successful.
+ *
+ */
+ dictionary<int, InjectRequestInfo> InjectRequestInfoDict;
+
+ /**
+ * Class which is populated with injection details if the request could successfully
+ * be achieved.
+ */
+ unsliceable class InjectInstance
+ {
+ /**
+ * The sink that is expecting the injected media.
+ */
+ AsteriskSCF::Media::V1::StreamSink* sink;
+ };
+
+ /**
+ * A dictionary of injection instances.
+ *
+ * The key is the unique identifier provided with the injection request.
+ */
+ dictionary<int, InjectInstance> InjectInstanceDict;
+
+ /**
+ * A sequence of injection instances.
+ */
+ sequence<InjectInstance> InjectInstanceSeq;
+
+ /**
+ * Interface used to request media injection.
+ */
+ interface Injector
+ {
+ /**
+ * Method used to request that media injection occurs.
+ *
+ * @param requests The media injection requests.
+ *
+ * @return InjectInstanceDict A dictionary of media injection instances.
+ */
+ InjectInstanceDict startInjection(InjectRequestInfoDict requests);
+
+ /**
+ * Method used to request that media injection stop.
+ *
+ * @param instances The media injection instances that should stop.
+ */
+ void stopInjection(InjectInstanceSeq instances);
+ };
+
+}; /* end module V1 */
+}; /* end module Media */
+}; /* end module AsteriskSCF */
-----------------------------------------------------------------------
--
asterisk-scf/integration/slice.git
More information about the asterisk-scf-commits
mailing list