Community articleUFLGetSigLockCount function
Added by IBM contributorIBM on May 2, 2012
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.



Description

This function returns the signature lock count of a node. If 0 is returned, the node is not signed by any digital signature, but it may have descendants that are signed.

Function

   r_short UFLGetSigLockCount(
      formNodeP theNode
   );


Parameters

Table 1. Function parameters
ExpressionTypeDescription
theNodeformNodePThe node to query. This can be NULL, in which case 0 is returned.


Returns

The number of locks on the given node or NOTOK on error.

Example

In the following example, UFLDereferenceEx is used to locate the name field node. UFLGetSigLockCount is then used to verify that the node is signed.
   r_error checkSigLocks(formNodeP form)
   {
   formNodeP tempNode;
   r_error numLocks;
      if ((tempNode = UFLDereferenceEx(form, NULL, "PAGE1.NAMEFIELD", 0,
         UFL_ITEM_REFERENCE, NULL)) == NULL)
      {
         fprintf(stderr, "Could not locate NAMEFIELD node.\n");
         return(NOTOK);
      }
      numLocks = UFLGetSigLockCount(tempNode);
      if (numLocks == NOTOK)
      {
         fprintf(stderr, "UFLGetSigLock error %hd.\n", numLocks);
         return(NOTOK);
      }
      if (numLocks != 1)
      {
         fprintf(stderr, "NAMEFIELD not locked.");
         return(NOTOK);
      }
      return(OK);
   }


Parent topic:
FormNodeP functions