瀏覽代碼

Added plugin constant SERVICE_PID.

Sascha Zelzer 15 年之前
父節點
當前提交
7cb9862a08
共有 2 個文件被更改,包括 22 次插入0 次删除
  1. 1 0
      Libs/PluginFramework/ctkPluginConstants.cpp
  2. 21 0
      Libs/PluginFramework/ctkPluginConstants.h

+ 1 - 0
Libs/PluginFramework/ctkPluginConstants.cpp

@@ -46,5 +46,6 @@ const QString ctkPluginConstants::RESOLUTION_OPTIONAL = "optional";
 
 const QString ctkPluginConstants::OBJECTCLASS = "objectclass";
 const QString ctkPluginConstants::SERVICE_ID = "service.id";
+const QString ctkPluginConstants::SERVICE_PID = "service.pid";
 const QString ctkPluginConstants::SERVICE_RANKING = "service.ranking";
 

+ 21 - 0
Libs/PluginFramework/ctkPluginConstants.h

@@ -273,6 +273,27 @@ struct CTK_PLUGINFW_EXPORT ctkPluginConstants {
   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 {@link ctkPlugin#getPluginId}) and followed by
+   * a dot (.). A plugin may use this as the prefix of the persistent
+   * identifiers for the services it registers.
+   */
+  static const QString SERVICE_PID; // = "service.pid"
+
+  /**
    * Service property identifying a service's ranking number.
    *
    * <p>