[asterisk-scf-commits] asterisk-scf/release/slice.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Mon Feb 21 12:06:30 CST 2011
branch "master" has been updated
via 030aad466eccb71487a7443a99129d6ccd11502d (commit)
from 3710f1976fa50786ce5d5c5ccf9aa19d01613bf8 (commit)
Summary of changes:
AsteriskSCF/System/Component/ConfigurationIf.ice | 170 ++++++++++++++++++++++
1 files changed, 170 insertions(+), 0 deletions(-)
create mode 100644 AsteriskSCF/System/Component/ConfigurationIf.ice
- Log -----------------------------------------------------------------
commit 030aad466eccb71487a7443a99129d6ccd11502d
Author: Joshua Colp <jcolp at digium.com>
Date: Mon Feb 21 14:05:03 2011 -0400
Add Configuration interface slice file.
diff --git a/AsteriskSCF/System/Component/ConfigurationIf.ice b/AsteriskSCF/System/Component/ConfigurationIf.ice
new file mode 100644
index 0000000..64397e2
--- /dev/null
+++ b/AsteriskSCF/System/Component/ConfigurationIf.ice
@@ -0,0 +1,170 @@
+/*
+ * 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 Configuration
+{
+
+["suppress"]
+module V1
+{
+ /**
+ * Generic configuration item class that can be extended by components.
+ *
+ * This essentially represents a single configurable aspect.
+ */
+ ["preserved"]
+ class ConfigurationItem
+ {
+ /**
+ * Serial number of the configuration item. This number should be incremented each
+ * time an update is sent to the setConfiguration method on the Configuration interface.
+ *
+ * If the serial number is older than is currently presently on the configured item then
+ * an exception will be thrown indicating that the configured item has already been changed
+ * from another source.
+ *
+ * The serial number check can be disabled by passing a serial number of -1. This will force
+ * the update to proceed no matter what.
+ */
+ int serialNumber;
+ };
+
+ /**
+ * A dictionary of configuration items. The key is a string to encourage only having a single
+ * instance of each configuratiom item, and to also provide a value for logging information.
+ */
+ dictionary<string, ConfigurationItem> ConfigurationItemDict;
+
+ /**
+ * Generic configuration group class that can be extended by components.
+ *
+ * This essentially represents a group of configurable items that configure a specific concept.
+ */
+ ["preserved"]
+ class ConfigurationGroup
+ {
+ /**
+ * Dictionary of configuration items for this group.
+ */
+ ConfigurationItemDict configurationItems;
+ };
+
+ /**
+ * A sequence of configuration groups.
+ */
+ sequence<ConfigurationGroup> ConfigurationGroupSeq;
+
+ /**
+ * Exception thrown when a configuration item serial number is older than is currently configured.
+ */
+ exception SerialConflict
+ {
+ /**
+ * The configuration group that the item belongs to. This includes all configuration items so that
+ * they can all be updated and retried.
+ */
+ ConfigurationGroup group;
+
+ /**
+ * The configuration item that the serial conflict applies to.
+ */
+ ConfigurationItem item;
+ };
+
+ /**
+ * The configuration interface provides methods that allow the manipulation of the configuration
+ * data for a specific component.
+ *
+ * This interface purposely does not provide explicit methods for individual group retrieval
+ * or updating to encourage batching updates which reduces RPCs. This also makes it easier to
+ * implement a transaction approach where a configuration update is an all-or-nothing operation.
+ */
+ interface ConfigurationService
+ {
+ /**
+ * Retrieves a sequence of configuration groups containing the configuration items specified
+ * in the ConfigurationGroup classes in the sequence itself and their current values.
+ *
+ * @param groups A sequence of group classes to be retrieved, along with the configuration items to be retrieved
+ * in each class.
+ *
+ * @return A sequence of group classes containing the current values of the configuration items requested.
+ *
+ */
+ idempotent ConfigurationGroupSeq getConfiguration(ConfigurationGroupSeq groups);
+
+ /**
+ * Retrieves a sequence of configuration groups containing all the configuration items and
+ * their current values.
+ *
+ * @param groups A sequence of group classes to be retrieved.
+ *
+ * @return A sequence of group classes containing the current values of the configuration items requested.
+ *
+ */
+ idempotent ConfigurationGroupSeq getConfigurationAll(ConfigurationGroupSeq groups);
+
+ /**
+ * Retrieves a sequence of current configuration groups. This does not return all the configuration items.
+ * If the configuration items are needed the getConfiguration method must be called afterwards.
+ *
+ * @return A sequence of current configuration groups.
+ *
+ */
+ idempotent ConfigurationGroupSeq getConfigurationGroups();
+
+ /**
+ * Update the configuration of one or more configuration groups.
+ *
+ * @param groups The groups and configuration items to update (or add).
+ *
+ * @throws SerialConflict when serial number of a configuration item is out of date.
+ *
+ */
+ idempotent void setConfiguration(ConfigurationGroupSeq groups) throws SerialConflict;
+
+ /**
+ * Remove specific configuration items from a configuration group.
+ *
+ * @param groups The groups or configuration items to remove.
+ *
+ */
+ void removeConfigurationItems(ConfigurationGroupSeq groups);
+
+ /**
+ * Remove a configuration group and all configuration items.
+ *
+ * @param groups The groups or configuration items to remove.
+ *
+ */
+ void removeConfigurationGroups(ConfigurationGroupSeq groups);
+ };
+
+}; /* End of namespace V1 */
+
+}; /* End of namespace Configuration */
+
+}; /* End of namespace System */
+
+}; /* End of namespace AsteriskSCF */
-----------------------------------------------------------------------
--
asterisk-scf/release/slice.git
More information about the asterisk-scf-commits
mailing list