Table of Contents

TTMSFNCWebPushDB Class

Component that stores and manages push subscriptions in a dataset. Exposes the data source, field mapping, delete mode, and lifecycle events for design-time and run-time configuration.

API unit family: TMS.TMSFNCWebPushDB Inherits from: TTMSFNCCustomWebPushDB

Syntax

TTMSFNCWebPushDB = class(TTMSFNCCustomWebPushDB)

Properties

Name Description
DataSource Data source whose dataset backs the subscription store. When unassigned the store creates and persists its own dataset. (inherited from TTMSFNCCustomWebPushDB)
DeleteMode Selects how a subscription is removed: deleting the record or clearing its endpoint and key columns. Defaults to deleting the record. (inherited from TTMSFNCCustomWebPushDB)
Fields Maps the logical subscription values to dataset column names and selects which optional columns are active. (inherited from TTMSFNCCustomWebPushDB)

Methods

Name Description
AddSubscription Adds a subscription identified only by its endpoint and keys, without user or browser identifiers. (inherited from TTMSFNCCustomWebPushDB)
DeleteSubscription Removes every subscription that belongs to the given user. (inherited from TTMSFNCCustomWebPushDB)
GetEnumerator Returns an enumerator that iterates the stored subscriptions, enabling for ... in iteration over the store. (inherited from TTMSFNCCustomWebPushDB)
SetUserActiveState Sets the active state for every subscription that belongs to the given user. (inherited from TTMSFNCCustomWebPushDB)
TryFindSubscriptionByID Attempts to retrieve the subscription payload for the given user. (inherited from TTMSFNCCustomWebPushDB)
UpdateSubscription Replaces the stored subscription payload for the first record matching the given user. (inherited from TTMSFNCCustomWebPushDB)

Events

Name Description
OnBeforeAddSubscription Occurs before a subscription is added and lets the handler veto the addition. (inherited from TTMSFNCCustomWebPushDB)
OnBeforeChangeUserActive Occurs before a user active state changes and lets the handler veto the change. (inherited from TTMSFNCCustomWebPushDB)
OnBeforeDeleteSubscription Occurs before a subscription is removed and lets the handler veto the removal. (inherited from TTMSFNCCustomWebPushDB)
OnBeforeUpdateSubscription Occurs before a subscription payload is updated and lets the handler veto the update. (inherited from TTMSFNCCustomWebPushDB)
OnSubscriptionAdded Occurs after a subscription has been added to the store. (inherited from TTMSFNCCustomWebPushDB)
OnSubscriptionDeleted Occurs after a subscription has been removed from the store. (inherited from TTMSFNCCustomWebPushDB)
OnSubscriptionUpdated Occurs after a subscription payload has been updated. (inherited from TTMSFNCCustomWebPushDB)
OnUserActiveChanged Occurs after the active state of a user has changed. (inherited from TTMSFNCCustomWebPushDB)