|
ITK Function Reference
(V10000.1.0.60_20160308.00) |
#include <pom/pom/pom_tokens.h>#include <sub_mgr/libsub_mgr_exports.h>#include <sub_mgr/iman_subscription.h>#include <sub_mgr/libsub_mgr_undef.h>Go to the source code of this file.
Data Structures | |
| struct | TcSubscriptionActionMsg_s |
Macros | |
| #define | SCM_class_name_c "ImanSubscription" |
| #define | SCM_enquiry_daily "Daily" |
| #define | SCM_enquiry_friday "Friday" |
| #define | SCM_enquiry_immediately "Immediately" |
| #define | SCM_enquiry_monday "Monday" |
| #define | SCM_enquiry_saturday "Saturday" |
| #define | SCM_enquiry_sunday "Sunday" |
| #define | SCM_enquiry_thursday "Thursday" |
| #define | SCM_enquiry_tuesday "Tuesday" |
| #define | SCM_enquiry_wednesday "Wednesday" |
| #define | SCM_enquiry_weekly "Weekly" |
Defines the notifications priorities on subscription object | |
| #define | SCM_enquiry_normal "Normal" |
| #define | SCM_enquiry_high "High" |
| #define | SCM_enquiry_low "Low" |
Typedefs | |
| typedef enum SCM_condition_math_operator_e | SCM_condition_math_operator_t |
| typedef enum SCM_subscribe_to_rev_option_e | SCM_subscribe_to_rev_option_t |
| typedef struct TcSubscriptionActionMsg_s * | TcSubscriptionActionMsg_p_t |
| typedef struct TcSubscriptionActionMsg_s | TcSubscriptionActionMsg_t |
Enumerations | |
| enum | SCM_condition_math_operator_e { SCM_equal = POM_enquiry_equal, SCM_not_equal = POM_enquiry_not_equal } |
| enum | SCM_subscribe_to_rev_option_e { SCM_subscribe_to_rev_none, SCM_subscribe_to_all_revs, SCM_subscribe_to_item_revs, SCM_subscribe_to_baseline_revs } |
Functions | |
| SUB_MGR_API int | SCM_ask_event_type (tag_t subscription, tag_t *event_type) |
| SUB_MGR_API int | SCM_ask_execution_period (tag_t subscription, char **execution_frequency, date_t *execution_time, char **execution_day) |
| SUB_MGR_API int | SCM_ask_execution_time (tag_t subscription, date_t *execution_time) |
| SUB_MGR_API int | SCM_ask_expiration_date (tag_t subscription, date_t *expiration_date) |
| SUB_MGR_API int | SCM_ask_handler (tag_t subscription, tag_t *handler) |
| SUB_MGR_API int | SCM_ask_handler_parameters (tag_t subscription, int *count, char ***parameters) |
| SUB_MGR_API int | SCM_ask_is_active (tag_t subscription, logical *is_active) |
| SUB_MGR_API int | SCM_ask_name (tag_t subscription, char **name) |
| SUB_MGR_API int | SCM_ask_notification (tag_t subscription, tag_t *notification) |
| SUB_MGR_API int | SCM_ask_notification_message (tag_t subscription, char **message) |
| SUB_MGR_API int | SCM_ask_notification_properties (tag_t subscription, int *count, char ***properties) |
| SUB_MGR_API int | SCM_ask_notification_subject (tag_t subscription, char **subject) |
| SUB_MGR_API int | SCM_ask_priority (tag_t subscription, char **priority) |
| SUB_MGR_API int | SCM_ask_subscriber (tag_t subscription, tag_t *subscriber) |
| SUB_MGR_API int | SCM_ask_target (tag_t subscription, tag_t *target) |
| SUB_MGR_API int | SCM_build_subscription_msg (tag_t subscriber, tag_t targetObject, char *objStrOfTarget, tag_t targetObjectType, tag_t eventType, date_t eventTime, TcSubscriptionActionMsg_t *subscriptionMsg) |
| SUB_MGR_API int | SCM_find_subscription (tag_t target, tag_t subscriber, tag_t event_type, tag_t handler, tag_t *subscription) |
| SUB_MGR_API int | SCM_get_subscrible_types (const char *childTypeOption, int *count, tag_t **typesTags) |
| SUB_MGR_API int | SCM_set_event_type (tag_t subscription, tag_t event_type) |
| SUB_MGR_API int | SCM_set_execution_period (tag_t subscription, const char *execution_frequency, date_t execution_time, const char *execution_day) |
| SUB_MGR_API int | SCM_set_execution_time (tag_t subscription, date_t execution_time) |
| SUB_MGR_API int | SCM_set_expiration_date (tag_t subscription, date_t expiration_date) |
| SUB_MGR_API int | SCM_set_handler (tag_t subscriptioni, tag_t handler) |
| SUB_MGR_API int | SCM_set_handler_parameters (tag_t subscription, int count, char **parameters) |
| SUB_MGR_API int | SCM_set_is_active (tag_t subscription, logical is_active) |
| SUB_MGR_API int | SCM_set_name (tag_t subscription, const char *name) |
| SUB_MGR_API int | SCM_set_notification (tag_t subscription, tag_t notification) |
| SUB_MGR_API int | SCM_set_notification_message (tag_t subscription, char *message) |
| SUB_MGR_API int | SCM_set_notification_properties (tag_t subscription, int count, char **properties) |
| SUB_MGR_API int | SCM_set_notification_subject (tag_t subscription, char *subject) |
| SUB_MGR_API int | SCM_set_permanent_transfer (tag_t subscription, tag_t transferred_to) |
| SUB_MGR_API int | SCM_set_priority (tag_t subscription, const char *execution_priority) |
| SUB_MGR_API int | SCM_set_subscriber (tag_t subscription, tag_t subscriber) |
| SUB_MGR_API int | SCM_set_target (tag_t subscription, tag_t target) |
| SUB_MGR_API int | SCM_set_temporary_notifier (tag_t subscription, tag_t temp_notifier, date_t transfer_start_date, date_t transfer_end_date) |
| SUB_MGR_API int | SCM_subscribe (tag_t target, tag_t subscriber, tag_t event_type, tag_t handler, date_t execution_time, date_t expiration_date, int parameter_count, const char **handler_parameters, tag_t *subscription) |
| SUB_MGR_API int | SCM_subscribe_assign_status_event (tag_t target, tag_t subscriber, tag_t handler, date_t execution_time, date_t expiration_date, int parameter_count, const char **parameters, const char *release_status_type_name, logical all_rev_flag, tag_t *subscription) |
| SUB_MGR_API int | SCM_subscribe_attach_event (tag_t target, tag_t subscriber, tag_t handler, date_t execution_time, date_t expiration_date, int parameter_count, const char **parameters, const char *relation_type_name, const char *secondary_object_type_name, logical all_rev_flag, tag_t *subscription) |
| SUB_MGR_API int | SCM_subscribe_to_rev_create_event (tag_t target, tag_t subscriber, tag_t handler, date_t execution_time, date_t expiration_date, int parameter_count, const char **parameters, SCM_subscribe_to_rev_option_t rev_option, tag_t *subscription) |
| SUB_MGR_API int | SCM_subscribe_to_status_event (tag_t target, tag_t subscriber, tag_t handler, date_t execution_time, date_t expiration_date, int parameter_count, const char **parameters, SCM_condition_math_operator_t math_operator, const char *release_status_type_name, SCM_subscribe_to_rev_option_t rev_option, tag_t *subscription) |
| SUB_MGR_API int | SCM_subscribe_with_notification (tag_t target, tag_t subscriber, tag_t event_type, tag_t handler, date_t execution_time, date_t expiration_date, int parameter_count, const char **handler_parameters, tag_t notification, tag_t *subscription) |
| SUB_MGR_API int | SCM_subscribe_with_notification_options (tag_t target, tag_t subscriber, tag_t event_type, tag_t handler, date_t execution_time, date_t expiration_date, int parameter_count, const char **handler_parameters, const char *subject, const char *message, int properties_count, const char **properties, tag_t *subscription) |
| SUB_MGR_API int | SCM_subscribe_with_options (tag_t target, tag_t subscriber, tag_t event_type, tag_t handler, date_t execution_time, date_t expiration_date, int parameter_count, const char **handler_parameters, const char *name, logical isactive, const char *execution_priority, tag_t notification, const char *execution_frequency, const char *execution_day, tag_t *subscription) |
| SUB_MGR_API int | SCM_unsubscribe (tag_t subscription) |
| SUB_MGR_API void | write_Attributexml_keyword (const char *prefix, const char *keyword1, const char *value1, const char *keyword2, const char *value2, char **buffer) |
This header file declares all data types and constants to be used by clients of the Subscription Manager.
Definition in file subscription.h.
| #define SCM_enquiry_friday "Friday" |
execution day is set to friday
Definition at line 65 of file subscription.h.
| #define SCM_enquiry_monday "Monday" |
execution day is set to monday
Definition at line 61 of file subscription.h.
| #define SCM_enquiry_saturday "Saturday" |
execution day is set to saturday
Definition at line 66 of file subscription.h.
| #define SCM_enquiry_sunday "Sunday" |
execution day is set to sunday
Definition at line 60 of file subscription.h.
| #define SCM_enquiry_thursday "Thursday" |
execution day is set to thursday
Definition at line 64 of file subscription.h.
| #define SCM_enquiry_tuesday "Tuesday" |
execution day is set to tuesday
Definition at line 62 of file subscription.h.
| #define SCM_enquiry_wednesday "Wednesday" |
execution day is set to wednesday
Definition at line 63 of file subscription.h.
Defines the math operators to be used by SCM_subscribe_to_status_event
| typedef struct TcSubscriptionActionMsg_s * TcSubscriptionActionMsg_p_t |
| typedef struct TcSubscriptionActionMsg_s TcSubscriptionActionMsg_t |
Subscription message struct
Defines the math operators to be used by SCM_subscribe_to_status_event
| Enumerator | |
|---|---|
| SCM_equal |
Math operators "are equal" |
| SCM_not_equal |
Math operators "are not equal" |
Definition at line 102 of file subscription.h.
| Enumerator | |
|---|---|
| SCM_subscribe_to_rev_none | |
| SCM_subscribe_to_all_revs | |
| SCM_subscribe_to_item_revs | |
| SCM_subscribe_to_baseline_revs | |
Definition at line 91 of file subscription.h.
| subscription | (I) |
| event_type | (O) |
| SUB_MGR_API int SCM_ask_execution_period | ( | tag_t | subscription, |
| char ** | execution_frequency, | ||
| date_t * | execution_time, | ||
| char ** | execution_day | ||
| ) |
Retrieves frequency, execution time and execution day of a subscription.
| subscription | (I) Subscription object. |
| execution_frequency | (OF) one of following value SCM_enquiry_immediately SCM_enquiry_daily SCM_enquiry_weekly |
| execution_time | (O) time hh:mm format. |
| execution_day | (OF) one of following values SCM_enquiry_sunday SCM_enquiry_monday SCM_enquiry_tuesday SCM_enquiry_wednesday SCM_enquiry_thursday SCM_enquiry_friday SCM_enquiry_saturday It can be a null pointer in case execution day is not set |
| subscription | (I) |
| execution_time | (O) |
| subscription | (I) |
| expiration_date | (O) |
| subscription | (I) |
| handler | (O) |
| SUB_MGR_API int SCM_ask_handler_parameters | ( | tag_t | subscription, |
| int * | count, | ||
| char *** | parameters | ||
| ) |
| subscription | (I) |
| count | (O) |
| parameters | (OF) count |
Retrieves subscription active or inactive status.
| subscription | (I) Subscription object |
| is_active | (O) true for active, false for inactive |
| SUB_MGR_API int SCM_ask_name | ( | tag_t | subscription, |
| char ** | name | ||
| ) |
Retrieve susbscription name if any, otherwise null
| subscription | (I) Subscription object |
| name | (OF) Name of Subscription It can be a null pointer in case name is not set |
| SUB_MGR_API int SCM_ask_notification_message | ( | tag_t | subscription, |
| char ** | message | ||
| ) |
Retrieves the e-mail message to be displayed in notifications for the given subscription.
This function returns:
| subscription | (I) Subscription object |
| message | (OF) Message body of the notification e-mail |
| SUB_MGR_API int SCM_ask_notification_properties | ( | tag_t | subscription, |
| int * | count, | ||
| char *** | properties | ||
| ) |
Retrieves the object properties to be displayed in notifications for the given subscription.
The returned array of properties should be freed with a single #SM_free call.
This function returns:
| subscription | (I) Subscription object |
| count | (O) Number of properties |
| properties | (OF) count Object properties to be displayed in the body of the notification e-mail |
| SUB_MGR_API int SCM_ask_notification_subject | ( | tag_t | subscription, |
| char ** | subject | ||
| ) |
Retrieves the e-mail subject to be displayed in notifications for the given subscription.
This function returns:
| subscription | (I) Subscription object |
| subject | (OF) Subject of the notification e-mail |
| SUB_MGR_API int SCM_ask_priority | ( | tag_t | subscription, |
| char ** | priority | ||
| ) |
Retrieves priority on notifications.
| subscription | (I) Subscription object |
| priority | (OF) return values can be SCM_enquiry_normal SCM_enquiry_high SCM_enquiry_low It can be a null pointer in case if not set. |
| subscription | (I) |
| subscriber | (O) |
| subscription | (I) |
| target | (O) |
| SUB_MGR_API int SCM_build_subscription_msg | ( | tag_t | subscriber, |
| tag_t | targetObject, | ||
| char * | objStrOfTarget, | ||
| tag_t | targetObjectType, | ||
| tag_t | eventType, | ||
| date_t | eventTime, | ||
| TcSubscriptionActionMsg_t * | subscriptionMsg | ||
| ) |
| subscriber | (I) |
| targetObject | (I) |
| objStrOfTarget | (I) |
| targetObjectType | (I) |
| eventType | (I) |
| eventTime | (I) |
| subscriptionMsg | (O) |
| SUB_MGR_API int SCM_find_subscription | ( | tag_t | target, |
| tag_t | subscriber, | ||
| tag_t | event_type, | ||
| tag_t | handler, | ||
| tag_t * | subscription | ||
| ) |
| target | (I) |
| subscriber | (I) |
| event_type | (I) |
| handler | (I) |
| subscription | (O) |
| SUB_MGR_API int SCM_get_subscrible_types | ( | const char * | childTypeOption, |
| int * | count, | ||
| tag_t ** | typesTags | ||
| ) |
| subscription | (I) |
| event_type | (I) |
| SUB_MGR_API int SCM_set_execution_period | ( | tag_t | subscription, |
| const char * | execution_frequency, | ||
| date_t | execution_time, | ||
| const char * | execution_day | ||
| ) |
Sets the notification frequency on events generated from subscriptions object, as well as the execution period.
execution_frequency is SCM_enquiry_immediately, execution_time and execution_day shall be ignored. execution_frequency is SCM_enquiry_daily, execution_day shall be ignored. execution_frequency is SCM_enquiry_weekly, execution_time and execution_day both should have valid values. execution_day is an invalid day. | subscription | (I) Subscription object. |
| execution_frequency | (I) Frequency can be one of values SCM_enquiry_immediately SCM_enquiry_daily SCM_enquiry_weekly If NULL pass throws SCM_invalid_frequency error |
| execution_time | (I) Only the hour and minutes are useful. |
| execution_day | (I) 7 days of week can be one of following SCM_enquiry_sunday SCM_enquiry_monday SCM_enquiry_tuesday SCM_enquiry_wednesday SCM_enquiry_thursday SCM_enquiry_friday SCM_enquiry_saturday it can be null in case execution_frequency is SCM_enquiry_immediately,SCM_enquiry_daily |
| subscription | (I) |
| execution_time | (I) |
| subscription | (I) |
| expiration_date | (I) |
| subscriptioni | (I) |
| handler | (I) |
| SUB_MGR_API int SCM_set_handler_parameters | ( | tag_t | subscription, |
| int | count, | ||
| char ** | parameters | ||
| ) |
| subscription | (I) |
| count | (I) |
| parameters | (I) count |
Sets the susbscription active or inactive state.
| subscription | (I) Subscription object |
| is_active | (I) True for active, false for inactive |
| SUB_MGR_API int SCM_set_name | ( | tag_t | subscription, |
| const char * | name | ||
| ) |
Sets the name of a Subscription object. The name parameter can be a NULL pointer, if the Subscription does not have any name.
| subscription | (I) Subscription object |
| name | (I) Name of the Subscription object, |
| SUB_MGR_API int SCM_set_notification_message | ( | tag_t | subscription, |
| char * | message | ||
| ) |
Sets the e-mail message to be displayed in notifications for the given subscription.
This function returns:
| subscription | (I) Subscription object |
| message | (I) Message body of the notification e-mail |
| SUB_MGR_API int SCM_set_notification_properties | ( | tag_t | subscription, |
| int | count, | ||
| char ** | properties | ||
| ) |
Sets the object properties to be displayed in notifications for the given subscription.
This function returns:
| subscription | (I) Subscription object |
| count | (I) Number of properties. Can be zero. |
| properties | (I) Object properties to be displayed in the body of the notification e-mail |
| SUB_MGR_API int SCM_set_notification_subject | ( | tag_t | subscription, |
| char * | subject | ||
| ) |
Sets the e-mail subject to be displayed in notifications for the given subscription.
This function returns:
| subscription | (I) Subscription object |
| subject | (I) Subject of the notification e-mail |
Sets the subscription to new user permanently.
The susbcriber and the user in the notifier list will be replaced with the transferred_to user.
transferred_to is not a valid notifier. transferred_to does not have an access to modify the subscription. transferred_to user does not have privilege to susbcribe. | subscription | (I) Subscription object |
| transferred_to | (I) new owner of subscription |
| SUB_MGR_API int SCM_set_priority | ( | tag_t | subscription, |
| const char * | execution_priority | ||
| ) |
Sets the priority on subscription notification.
| subscription | (I) Subscription object |
| execution_priority | (I) Use one of following SCM_enquiry_normal SCM_enquiry_high SCM_enquiry_low It can be a null pointer in case of execution_priority to be ignored. |
| subscription | (I) |
| subscriber | (I) |
| subscription | (I) |
| target | (I) |
| SUB_MGR_API int SCM_set_temporary_notifier | ( | tag_t | subscription, |
| tag_t | temp_notifier, | ||
| date_t | transfer_start_date, | ||
| date_t | transfer_end_date | ||
| ) |
Sets the temproary notifier based on date range.
temp_notifier is invalid notifier. transfer_end_date anterior to transfer_start_date. temp_notifier does not have modify permission. | subscription | (I) Subscription object |
| temp_notifier | (I) User to notify for temporary period |
| transfer_start_date | (I) Temporary trasfer start date, only year, month, day is important |
| transfer_end_date | (I) Temporary trasfer end date, only year, month, day is important |
| SUB_MGR_API int SCM_subscribe | ( | tag_t | target, |
| tag_t | subscriber, | ||
| tag_t | event_type, | ||
| tag_t | handler, | ||
| date_t | execution_time, | ||
| date_t | expiration_date, | ||
| int | parameter_count, | ||
| const char ** | handler_parameters, | ||
| tag_t * | subscription | ||
| ) |
Creates a new subscription object against the target object.
Subscriptions created from this ITK do not function as notification subscriptions. This API is intended for triggering custom handlers or handlers that do not specifically notify the user. In order to create Notification subscriptions, use SCM_subscribe_with_notification_options and the STDHANDLER_MAIL_NOTIFY_ID handler.
Use TCACTIONHANDLER_find_handler to retrieve the handler tag.
Retrieve the event tag with TCEVENTTYPE_find.
This function returns:
| target | (I) The object to monitor for the specified event type |
| subscriber | (I) User that is subscribing to the change |
| event_type | (I) Type of event that will trigger the subscription |
| handler | (I) Handler that will process the subscription |
| execution_time | (I) When the subscription should be processed. NULLDATE will trigger immediate processing. |
| expiration_date | (I) When the subscription expires. NULLDATE specifies no expiration. |
| parameter_count | (I) Number of parameters being passed to the handler |
| handler_parameters | (I) Parameters being passed to the handler |
| subscription | (O) New subscription object |
| SUB_MGR_API int SCM_subscribe_assign_status_event | ( | tag_t | target, |
| tag_t | subscriber, | ||
| tag_t | handler, | ||
| date_t | execution_time, | ||
| date_t | expiration_date, | ||
| int | parameter_count, | ||
| const char ** | parameters, | ||
| const char * | release_status_type_name, | ||
| logical | all_rev_flag, | ||
| tag_t * | subscription | ||
| ) |
This function is used for creating a subscription for Assign Status event type.
Restrictions:
This ITK function is used only for Assign Status event type.
| target | (I) Tag of the target object |
| subscriber | (I) User tag for the subscriber |
| handler | (I) Tag of the action handler |
| execution_time | (I) Time when the event needs to be processed by the daemon |
| expiration_date | (I) Date when the subscription expires |
| parameter_count | (I) Number of action handler parameters |
| parameters | (I) parameter_count String array of action handler parameters |
| release_status_type_name | (I) This is the name of a release status type. If the string is an empty string, it means any status. |
| all_rev_flag | (I) If this flag is true, the target object subscribed must be an Item object so that when release status is assigned to an ItemRevision object under the Item object, proper action gets carried out. If this flag is false, then proper action gets carried out when the target object itself is assigned a release status. |
| subscription | (O) The tag of created subscription |
| SUB_MGR_API int SCM_subscribe_attach_event | ( | tag_t | target, |
| tag_t | subscriber, | ||
| tag_t | handler, | ||
| date_t | execution_time, | ||
| date_t | expiration_date, | ||
| int | parameter_count, | ||
| const char ** | parameters, | ||
| const char * | relation_type_name, | ||
| const char * | secondary_object_type_name, | ||
| logical | all_rev_flag, | ||
| tag_t * | subscription | ||
| ) |
This function is used for creating a subscription for Attach event type.
Restrictions:
This ITK function is used only for Attach event type.
| target | (I) Tag of the target object |
| subscriber | (I) User tag for the subscriber |
| handler | (I) Tag of the action handler |
| execution_time | (I) Time when the event is processed by the daemon |
| expiration_date | (I) Date when the subscription expires |
| parameter_count | (I) Number of action handler parameters |
| parameters | (I) parameter_count String array of action handler parameters |
| relation_type_name | (I) This is the name of a Teamcenter Engineering relation. If the string is an empty string, it means any relation. |
| secondary_object_type_name | (I) This is the name of a secondary object type. If the string is an empty string, it means any object type. |
| all_rev_flag | (I) If this flag is true, the target object subscribed must be an Item object so that when a secondary object is attached to an ItemRevision object under the Item object, proper action gets carried out. If this flag is false, then proper action gets carried out when the target object itself gets a secondary object attached. |
| subscription | (O) The tag of created subscription |
| SUB_MGR_API int SCM_subscribe_to_rev_create_event | ( | tag_t | target, |
| tag_t | subscriber, | ||
| tag_t | handler, | ||
| date_t | execution_time, | ||
| date_t | expiration_date, | ||
| int | parameter_count, | ||
| const char ** | parameters, | ||
| SCM_subscribe_to_rev_option_t | rev_option, | ||
| tag_t * | subscription | ||
| ) |
This function is used for creating a subscription for New IR event type.
Restrictions:
This ITK function is used only for New IR event type.
| target | (I) Tag of the target object that must be an item |
| subscriber | (I) User tag for the subscriber |
| handler | (I) Tag of the action handler |
| execution_time | (I) Time when the event needs to be processed by the daemon |
| expiration_date | (I) Date when the subscription expires |
| parameter_count | (I) Number of action handler parameters |
| parameters | (I) parameter_count String array of action handler parameters |
| rev_option | (I) if SCM_subscribe_to_all_revs, a new IR event is fired when any item revision is created for the target item. if SCM_subscribe_to_item_revs, a new IR event is fired when any Base item revision is created for the target item. if SCM_subscribe_to_baseline_revs, a new IR event is fired when any Baseline item revision is created for the target item. SCM_subscribe_to_rev_none option is NOT applicable and the target must be an item |
| subscription | (O) The tag of created subscription |
| SUB_MGR_API int SCM_subscribe_to_status_event | ( | tag_t | target, |
| tag_t | subscriber, | ||
| tag_t | handler, | ||
| date_t | execution_time, | ||
| date_t | expiration_date, | ||
| int | parameter_count, | ||
| const char ** | parameters, | ||
| SCM_condition_math_operator_t | math_operator, | ||
| const char * | release_status_type_name, | ||
| SCM_subscribe_to_rev_option_t | rev_option, | ||
| tag_t * | subscription | ||
| ) |
This function is used for creating a subscription for Assign Status event type.
Restrictions:
This ITK function is used only for Assign Status event type.
| target | (I) Tag of the target object |
| subscriber | (I) User tag for the subscriber |
| handler | (I) Tag of the action handler |
| execution_time | (I) Time when the event needs to be processed by the daemon |
| expiration_date | (I) Date when the subscription expires |
| parameter_count | (I) Number of action handler parameters |
| parameters | (I) parameter_count String array of action handler parameters |
| math_operator | (I) math operator for subscription condition, if SCM_equal, event fired for the target has the given status assigned if SCM_not_equal, event fired if the target has an assigned status different from the given status. SCM_not_equal math operator is NOT appliable if release status type name input is empty |
| release_status_type_name | (I) This is the name of a release status type. If the string is an empty string, it means any status. |
| rev_option | (I)if SCM_subscribe_to_rev_none, no event is fired when a status event occurs on any item revision of the target item, but the event is fired only when a status event occurs on the target item. if SCM_subscribe_to_all_revs, a status event is also fired when a status event occurs on any item revision of the target item. if SCM_subscribe_to_item_revs, a status event is also fired when a status event occurs on any Base item revision of the target item. if SCM_subscribe_to_baseline_revs, a status event is also fired when a status event occurs on any Baseline item revision of the target item. this option is applicable only if the target is an item |
| subscription | (O) The tag of created subscription |
| SUB_MGR_API int SCM_subscribe_with_notification | ( | tag_t | target, |
| tag_t | subscriber, | ||
| tag_t | event_type, | ||
| tag_t | handler, | ||
| date_t | execution_time, | ||
| date_t | expiration_date, | ||
| int | parameter_count, | ||
| const char ** | handler_parameters, | ||
| tag_t | notification, | ||
| tag_t * | subscription | ||
| ) |
| target | (I) |
| subscriber | (I) |
| event_type | (I) |
| handler | (I) |
| execution_time | (I) |
| expiration_date | (I) |
| parameter_count | (I) |
| handler_parameters | (I) parameter_count |
| notification | (I) |
| subscription | (O) |
| SUB_MGR_API int SCM_subscribe_with_notification_options | ( | tag_t | target, |
| tag_t | subscriber, | ||
| tag_t | event_type, | ||
| tag_t | handler, | ||
| date_t | execution_time, | ||
| date_t | expiration_date, | ||
| int | parameter_count, | ||
| const char ** | handler_parameters, | ||
| const char * | subject, | ||
| const char * | message, | ||
| int | properties_count, | ||
| const char ** | properties, | ||
| tag_t * | subscription | ||
| ) |
Creates a new object subscription against the target object.
This API allows the parameters of the notification e-mail to be specified.
Use TCACTIONHANDLER_find_handler to retrieve the handler tag. For e-mail notification, use the STDHANDLER_MAIL_NOTIFY_ID handler. The handler parameters are the IDs of the users to be notified.
Retrieve the event tag with TCEVENTTYPE_find.
This function returns:
| target | (I) The object to monitor for the specified event type |
| subscriber | (I) User that is subscribing to the change |
| event_type | (I) Type of event that will trigger the subscription |
| handler | (I) Handler that will process the notification |
| execution_time | (I) When the subscription should be processed. NULLDATE will trigger immediate processing. |
| expiration_date | (I) When the subscription expires. NULLDATE specifies no expiration. |
| parameter_count | (I) Number of parameters being passed to the handler |
| handler_parameters | (I) Parameters being passed to the handler. For the STDHANDLER_MAIL_NOTIFY_ID handler, the user IDs of the people to be notified. |
| subject | (I) Subject of the notification e-mail |
| message | (I) Message body of the notification e-mail |
| properties_count | (I) Number of properties to include in the notification e-mail |
| properties | (I) Properties to include in the notification e-mail |
| subscription | (O) New subscription object |
| SUB_MGR_API int SCM_subscribe_with_options | ( | tag_t | target, |
| tag_t | subscriber, | ||
| tag_t | event_type, | ||
| tag_t | handler, | ||
| date_t | execution_time, | ||
| date_t | expiration_date, | ||
| int | parameter_count, | ||
| const char ** | handler_parameters, | ||
| const char * | name, | ||
| logical | isactive, | ||
| const char * | execution_priority, | ||
| tag_t | notification, | ||
| const char * | execution_frequency, | ||
| const char * | execution_day, | ||
| tag_t * | subscription | ||
| ) |
Sets the named subscription object with inactive or active subscription.
It also provides the way to specify the frequency at which the notification is to be set.
Notification tag should be created before passing to API, Use NULLTAG to ignore the parameter.
| target | (I) The object to monitor for the specified event type |
| subscriber | (I) User that is subscribing to the change |
| event_type | (I) Type of event that will trigger the subscription |
| handler | (I) Handler that will process the subscription |
| execution_time | (I) When the subscription should be processed. NULLDATE will trigger immediate processing . |
| expiration_date | (I) When the subscription expires. NULLDATE specifies no expiration. |
| parameter_count | (I) Number of parameters being passed to the handler |
| handler_parameters | (I) Parameters being passed to the handler |
| name | (I) Name of subscription. It can be a null pointer if the Subscription does not have any name. |
| isactive | (I) If this flag is true- Subscriptions are active. If this flag is false Subscriptions are inactive. |
| execution_priority | (I) Subscription priority SCM_enquiry_normal SCM_enquiry_high SCM_enquiry_low |
| notification | (I) Notification object attached with this subscription |
| execution_frequency | (I) Frequency of executing Subscription notifications If SCM_enquiry_immediately, then execution_time & execution_day parameters will be ignored If SCM_enquiry_daily, then execution_day parameters will be ignored If SCM_enquiry_weekly then notification will be triggered on execution_day |
| execution_day | (I) Execution day of Subscription notification configured for weekly execution SCM_enquiry_sunday SCM_enquiry_monday SCM_enquiry_tuesday SCM_enquiry_wednesday SCM_enquiry_thursday SCM_enquiry_friday SCM_enquiry_saturday |
| subscription | (O) New subscription object |
| SUB_MGR_API int SCM_unsubscribe | ( | tag_t | subscription | ) |
| subscription | (I) |
| SUB_MGR_API void write_Attributexml_keyword | ( | const char * | prefix, |
| const char * | keyword1, | ||
| const char * | value1, | ||
| const char * | keyword2, | ||
| const char * | value2, | ||
| char ** | buffer | ||
| ) |