| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405 | 
							- /*=============================================================================
 
-   Library: CTK
 
-   Copyright (c) German Cancer Research Center,
 
-     Division of Medical and Biological Informatics
 
-   Licensed under the Apache License, Version 2.0 (the "License");
 
-   you may not use this file except in compliance with the License.
 
-   You may obtain a copy of the License at
 
-     http://www.apache.org/licenses/LICENSE-2.0
 
-   Unless required by applicable law or agreed to in writing, software
 
-   distributed under the License is distributed on an "AS IS" BASIS,
 
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
-   See the License for the specific language governing permissions and
 
-   limitations under the License.
 
- =============================================================================*/
 
- #ifndef CTKPLUGINCONSTANTS_H
 
- #define CTKPLUGINCONSTANTS_H
 
- #include <QString>
 
- #include "ctkPluginFrameworkExport.h"
 
- /**
 
-  * \ingroup PluginFramework
 
-  */
 
- struct CTK_PLUGINFW_EXPORT ctkPluginConstants {
 
-   /**
 
-    * Location identifier of the CTK <i>system plugin</i>, which is defined
 
-    * to be "System Plugin".
 
-    */
 
-   static const QString SYSTEM_PLUGIN_LOCATION; // = "System Plugin"
 
-   /**
 
-    * Alias for the symbolic name of the CTK <i>system plugin</i>. It is
 
-    * defined to be "system.plugin".
 
-    *
 
-    */
 
-   static const QString SYSTEM_PLUGIN_SYMBOLICNAME; // = "system.plugin"
 
-   /**
 
-    * Framework environment property identifying the Framework version.
 
-    *
 
-    * <p>
 
-    * The value of this property may be retrieved by calling the
 
-    * <code>ctkPluginContext::getProperty</code> method.
 
-    */
 
-   static const QString FRAMEWORK_VERSION; // = "org.commontk.pluginfw.version"
 
-   /**
 
-    * Framework environment property identifying the Framework implementation
 
-    * vendor.
 
-    *
 
-    * <p>
 
-    * The value of this property may be retrieved by calling the
 
-    * <code>ctkPluginContext::getProperty</code> method.
 
-    */
 
-   static const QString FRAMEWORK_VENDOR; // = "org.commontk.pluginfw.vendor"
 
-   /**
 
-    * Specifies the persistent storage area used by the framework. The value of
 
-    * this property must be a valid file path in the file system to a
 
-    * directory. If the specified directory does not exist then the framework
 
-    * will create the directory. If the specified path exists but is not a
 
-    * directory or if the framework fails to create the storage directory, then
 
-    * framework initialization must fail. The framework is free to use this
 
-    * directory as it sees fit. This area can not be shared with anything else.
 
-    * <p>
 
-    * If this property is not set, the framework should use a reasonable
 
-    * platform default for the persistent storage area.
 
-    */
 
-   static const QString FRAMEWORK_STORAGE; // = "org.commontk.pluginfw.storage"
 
-   /**
 
-    * Specifies if and when the persistent storage area for the framework
 
-    * should be cleaned. If this property is not set, then the framework
 
-    * storage area must not be cleaned.
 
-    *
 
-    * @see #FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT
 
-    */
 
-   static const QString FRAMEWORK_STORAGE_CLEAN; // = "org.commontk.pluginfw.storage.clean";
 
-   /**
 
-    * Specifies that the framework storage area must be cleaned before the
 
-    * framework is initialized for the first time. Subsequent inits, starts or
 
-    * updates of the framework will not result in cleaning the framework
 
-    * storage area.
 
-    */
 
-   static const QString FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT; //	= "onFirstInit";
 
-   /**
 
-    * Manifest header identifying the plugin's symbolic name.
 
-    *
 
-    * <p>
 
-    * The attribute value may be retrieved from the <code>QHash</code>
 
-    * object returned by the <code>Plugin::getHeaders()</code> method.
 
-    */
 
-   static const QString PLUGIN_SYMBOLICNAME; // = "Plugin-SymbolicName"
 
-   /**
 
-    * Manifest header identifying the plugin's copyright information.
 
-    * <p>
 
-    * The attribute value may be retrieved from the <code>QHash</code>
 
-    * object returned by the <code>ctkPlugin::getHeaders</code> method.
 
-    */
 
-   static const QString PLUGIN_COPYRIGHT; // = "Plugin-Copyright"
 
-   /**
 
-    * Manifest header containing a brief description of the plugin's
 
-    * functionality.
 
-    * <p>
 
-    * The attribute value may be retrieved from the <code>QHash</code>
 
-    * object returned by the <code>ctkPlugin::getHeaders</code> method.
 
-    */
 
-   static const QString PLUGIN_DESCRIPTION; // = "Plugin-Description"
 
-   /**
 
-    * Manifest header identifying the plugin's name.
 
-    * <p>
 
-    * The attribute value may be retrieved from the <code>QHash</code>
 
-    * object returned by the <code>ctkPlugin::getHeaders</code> method.
 
-    */
 
-   static const QString PLUGIN_NAME; // = "Plugin-Name"
 
-   /**
 
-    * Manifest header identifying the plugin's vendor.
 
-    *
 
-    * <p>
 
-    * The header value may be retrieved from the <code>QHash</code> object
 
-    * returned by the <code>ctkPlugin::getHeaders</code> method.
 
-    */
 
-   static const QString PLUGIN_VENDOR; // = "Plugin-Vendor"
 
-   /**
 
-    * Manifest header identifying the base name of the plugin's Qt .qm
 
-    * files.
 
-    *
 
-    * <p>
 
-    * The attribute value may be retrieved from the <code>QHash</code>
 
-    * object returned by the <code>ctkPlugin::getHeaders</code> method.
 
-    *
 
-    * @see #PLUGIN_LOCALIZATION_DEFAULT_BASENAME
 
-    */
 
-   static const QString PLUGIN_LOCALIZATION; // = "Plugin-Localization"
 
-   /**
 
-    * Default value for the <code>Plugin-Localization</code> manifest header.
 
-    *
 
-    * @see #PLUGIN_LOCALIZATION
 
-    */
 
-   static const QString PLUGIN_LOCALIZATION_DEFAULT_BASENAME; // = "CTK-INF/l10n/plugin"
 
-   /**
 
-    * Manifest header identifying the symbolic names of other plugins required
 
-    * by the plugin.
 
-    *
 
-    * <p>
 
-    * The attribute value may be retrieved from the <code>QHash</code>
 
-    * object returned by the <code>ctkPlugin::getHeaders</code> method.
 
-    *
 
-    */
 
-   static const QString REQUIRE_PLUGIN; // = "Require-Plugin"
 
-   /**
 
-    * Manifest header attribute identifying a range of versions for a plugin
 
-    * specified in the <code>Require-Plugin</code> manifest headers.
 
-    * The default value is <code>0.0.0</code>.
 
-    *
 
-    * <p>
 
-    * The attribute value is encoded in the Require-Plugin manifest header
 
-    * like:
 
-    *
 
-    * <pre>
 
-    *     Require-Plugin: com.acme.module.test; plugin-version="1.1"
 
-    *     Require-Plugin: com.acme.module.test; plugin-version="[1.0,2.0)"
 
-    * </pre>
 
-    *
 
-    * <p>
 
-    * The plugin-version attribute value uses a mathematical interval notation
 
-    * to specify a range of plugin versions. A plugin-version attribute value
 
-    * specified as a single version means a version range that includes any
 
-    * plugin version greater than or equal to the specified version.
 
-    *
 
-    * @see #REQUIRE_PLUGIN
 
-    */
 
-   static const QString PLUGIN_VERSION_ATTRIBUTE; // = "plugin-version"
 
-   /**
 
-    * Manifest header identifying the plugin's version.
 
-    *
 
-    * <p>
 
-    * The attribute value may be retrieved from the <code>QHash</code>
 
-    * object returned by the <code>ctkPlugin::getHeaders()</code> method.
 
-    */
 
-   static const QString PLUGIN_VERSION; // = "Plugin-Version"
 
-   /**
 
-    * Manifest header identifying the plugin's activation policy.
 
-    * <p>
 
-    * The attribute value may be retrieved from the <code>QHash</code>
 
-    * object returned by the <code>Plugin::getHeaders()</code> method.
 
-    *
 
-    * @see #ACTIVATION_EAGER
 
-    */
 
-   static const QString PLUGIN_ACTIVATIONPOLICY; // = "Plugin-ActivationPolicy"
 
-   /**
 
-    * Plugin activation policy declaring the plugin must be activated immediately.
 
-    *
 
-    * <p>
 
-    * A plugin with the eager activation policy that is started with the
 
-    * ctkPlugin#START_ACTIVATION_POLICY option will be activating immediately when
 
-    * the framework is started.
 
-    * <p>
 
-    * The activation policy value is specified as in the
 
-    * Plugin-ActivationPolicy manifest header like:
 
-    *
 
-    * <pre>
 
-    *       Plugin-ActivationPolicy: eager
 
-    * </pre>
 
-    *
 
-    * @see #PLUGIN_ACTIVATIONPOLICY
 
-    * @see ctkPlugin#start(int)
 
-    * @see ctkPlugin#START_ACTIVATION_POLICY
 
-    */
 
-   static const QString ACTIVATION_EAGER; // = "eager"
 
-   /**
 
-    * Plugin activation policy declaring the plugin must be activated when the
 
-    * first object is instantiated from the plugin.
 
-    * <p>
 
-    * A plugin with the lazy activation policy that is started with the
 
-    * {@link ctkPlugin#START_ACTIVATION_POLICY START_ACTIVATION_POLICY} option
 
-    * will wait in the ctkPlugin#STARTING state until the first
 
-    * class instantiation from the plugin occurs. The plugin will then be activated
 
-    * before the instance is returned to the requester.
 
-    * <p>
 
-    * The lazy activation policy is the default for every plugin.
 
-    *
 
-    * @see #PLUGIN_ACTIVATIONPOLICY
 
-    * @see ctkPlugin#start(int)
 
-    * @see ctkPlugin#START_ACTIVATION_POLICY
 
-    */
 
-   static const QString ACTIVATION_LAZY; // = "lazy"
 
-   /**
 
-    * Manifest header directive identifying the resolution type in the
 
-    * Require-Plugin manifest header. The default value is
 
-    * {@link #RESOLUTION_MANDATORY mandatory}.
 
-    *
 
-    * <p>
 
-    * The directive value is encoded in the Require-Plugin
 
-    * manifest header like:
 
-    *
 
-    * <pre>
 
-    *     Require-Plugin: com.acme.module.test; resolution:="optional"
 
-    * </pre>
 
-    *
 
-    * @see #REQUIRE_PLUGIN
 
-    * @see #RESOLUTION_MANDATORY
 
-    * @see #RESOLUTION_OPTIONAL
 
-    */
 
-   static const QString RESOLUTION_DIRECTIVE; // = "resolution"
 
-   /**
 
-    * Manifest header directive value identifying a mandatory resolution type.
 
-    * A mandatory resolution type indicates that the required plugin
 
-    * must be resolved when the plugin is resolved. If such a
 
-    * require plugin cannot be resolved, the module fails to resolve.
 
-    *
 
-    * <p>
 
-    * The directive value is encoded in the Require-Plugin
 
-    * manifest header like:
 
-    *
 
-    * <pre>
 
-    *     Require-Plugin: com.acme.module.test; resolution:="manditory"
 
-    * </pre>
 
-    *
 
-    * @see #RESOLUTION_DIRECTIVE
 
-    */
 
-   static const QString RESOLUTION_MANDATORY; // = "mandatory"
 
-   /**
 
-    * Manifest header directive value identifying an optional resolution type.
 
-    * An optional resolution type indicates that the require plugin
 
-    * is optional and the plugin may be resolved without the require
 
-    * plugin being resolved. If the require plugin is not resolved
 
-    * when the plugin is resolved, therequire plugin may not be
 
-    * resolved before the plugin is refreshed.
 
-    *
 
-    * <p>
 
-    * The directive value is encoded in the Require-Plugin
 
-    * manifest header like:
 
-    *
 
-    * <pre>
 
-    *     Require-Plugin: com.acme.module.test; resolution:="optional"
 
-    * </pre>
 
-    *
 
-    * @see #RESOLUTION_DIRECTIVE
 
-    */
 
-   static const QString RESOLUTION_OPTIONAL; // = "optional"
 
-   /**
 
-    * Service property identifying all of the class names under which a service
 
-    * was registered in the Framework. The value of this property must be of
 
-    * type <code>QStringList</code>.
 
-    *
 
-    * <p>
 
-    * This property is set by the Framework when a service is registered.
 
-    */
 
-   static const QString OBJECTCLASS; // = "objectclass"
 
-   /**
 
-    * Service property identifying a service's registration number. The value
 
-    * of this property must be of type <code>qlonglong</code>.
 
-    *
 
-    * <p>
 
-    * The value of this property is assigned by the Framework when a service is
 
-    * registered. The Framework assigns a unique value that is larger than all
 
-    * previously assigned values since the Framework was started. These values
 
-    * are NOT persistent across restarts of the Framework.
 
-    */
 
-   // ATTENTION!!! If the value is changed, change also ctkEventConstants::SERVICE_ID
 
-   static const QString SERVICE_ID; // = "service.id"
 
-   /**
 
-    * Service property identifying a service's persistent identifier.
 
-    *
 
-    * <p>
 
-    * This property may be supplied in the <code>properties</code>
 
-    * <code>ctkDictionary</code> object passed to the
 
-    * <code>ctkPluginContext#registerService</code> method. The value of this
 
-    * property must be of type <code>QString</code> or <code>QStringList</code>.
 
-    *
 
-    * <p>
 
-    * A service's persistent identifier uniquely identifies the service and
 
-    * persists across multiple Framework invocations.
 
-    *
 
-    * <p>
 
-    * By convention, every plugin has its own unique namespace, starting with
 
-    * the plugin's identifier (see ctkPlugin::getPluginId) and followed by
 
-    * a dot (.). A plugin may use this as the prefix of the persistent
 
-    * identifiers for the services it registers.
 
-    */
 
-   // ATTENTION!!! If the value is changed, change also ctkEventConstants::SERVICE_PID
 
-   static const QString SERVICE_PID; // = "service.pid"
 
-   /**
 
-    * Service property identifying a service's ranking number.
 
-    *
 
-    * <p>
 
-    * This property may be supplied in the
 
-    * <code>ctkDictionary</code> object passed to the
 
-    * <code>ctkPluginContext::registerService</code> method. The value of this
 
-    * property must be of type <code>int</code>.
 
-    *
 
-    * <p>
 
-    * The service ranking is used by the Framework to determine the <i>natural
 
-    * order</i> of services, see ctkServiceReference::operator<(const ctkServiceReference&),
 
-    * and the <i>default</i> service to be returned from a call to the
 
-    * {@link ctkPluginContext::getServiceReference} method.
 
-    *
 
-    * <p>
 
-    * The default ranking is zero (0). A service with a ranking of
 
-    * <code>std::numeric_limits<int>::max()</code> is very likely to be returned as the
 
-    * default service, whereas a service with a ranking of
 
-    * <code>std::numeric_limits<int>::min()</code> is very unlikely to be returned.
 
-    *
 
-    * <p>
 
-    * If the supplied property value is not of type <code>int</code>, it is
 
-    * deemed to have a ranking value of zero.
 
-    */
 
-   static const QString SERVICE_RANKING; // = "service.ranking"
 
-   /**
 
-    * Service property identifying a service's vendor.
 
-    *
 
-    * <p>
 
-    * This property may be supplied in the properties <code>ctkDictionary</code> object
 
-    * passed to the <code>ctkPluginContext::registerService()</code> method.
 
-    */
 
-   static const QString SERVICE_VENDOR; // = "service.vendor"
 
-   /**
 
-    * Service property identifying a service's description.
 
-    *
 
-    * <p>
 
-    * This property may be supplied in the properties <code>ctkDictionary</code> object
 
-    * passed to the <code>ctkPluginContext::registerService()</code> method.
 
-    */
 
-   static const QString SERVICE_DESCRIPTION; // = "service.description"
 
- };
 
- #endif // CTKPLUGINCONSTANTS_H
 
 
  |