Foxit PDF SDK

Class Methods | List of all members
FSTimeStampServerMgr Class Reference

Inherits NSObject.

## Class Methods
(FSTimeStampServer *) | + addServer:server_url:user_name:password:
| Add a time stamp server to the manager. More...
(void) | + destroy
| Release time stamp server manager. More...
(FSTimeStampServer *) | + getDefaultServer
| Get default time stamp server object. More...
(FSTimeStampServer *) | + getServer:
| Get time stamp server with specified index. More...
(int) | + getServerCount
| Get time stamp server count. More...
(int) | + getServerIndex:
| Get the index of a speicified time stamp server object. More...
(FSErrorCode) | + initialize
| Initialize time stamp server manager. More...
(void) | + removeServer:
| Remove a time stamp server from the manager, by index. More...
(void) | + removeServerWithIndex:
| Remove a time stamp server from the manager, by index. More...
(void) | + setDefaultServer:
| Set default time stamp server object by index. More...
(void) | + setDefaultServerWithIndex:
| Set default time stamp server object by index. More...

## Detailed Description

Time stamp server manager is used to manage some time stamp servers. The default time stamp server in this manager will be used in default signature callback for filter "Adobe.PPKLite" with sub filter "ETSI.CAdES.detached" and filter "Adobe.PPKLite" with sub filter "ETSI.RFC3161". So before signing or verifying signatures in these filter-subfitler pair by using default signature callback in Foxit PDF SDK, please ensure that a valid FSTimeStampCallback object has been set through FSLibrary::setTimeStampCallback: or the time stamp server manager has been initialized and the default server is set, if both are set, Foxit PDF SDK will use the FSTimeStampCallback.

## Method Documentation

## ◆ addServer:server_url:user_name:password:()

+ (FSTimeStampServer *) addServer: |  | (NSString *) | server_name
server_url: |  | (NSString *) | server_url
user_name: |  | (NSString *) | user_name
password: |  | (NSString *) | password

Add a time stamp server to the manager.

Parameters

  [in] | server_name | Name of time stamp server. It should not be an empty string.
  [in] | server_url | URL of time stamp server. It should not be an empty string.
  [in] | user_name | User name for the time stamp server. If no need, please pass an empty string.
  [in] | password | Password for the time stamp server. If no need, please pass an empty string.

Returns
  The newly added time stamp server object.

## ◆ destroy()

+ (void) destroy |  |  |

Release time stamp server manager.

User can call this function to release time stamp server manager when no need to use it any more. After this function is called, if user wants to use time stamp server manager again, please call function FSTimeStampServerMgr::initialize again.

Returns
  None.

## ◆ getDefaultServer()

+ (FSTimeStampServer *) getDefaultServer |  |  |

Get default time stamp server object.

Returns
  A time stamp server object which is the default one.

## ◆ getServer:()

+ (FSTimeStampServer *) getServer: |  | (int) | index |

Get time stamp server with specified index.

Parameters

  [in] | index | Time stamp server index. Valid range: from 0 to (count-1). count is returned by function FSTimeStampServerMgr::getServerCount.

Returns
  A time stamp server object.

## ◆ getServerCount()

+ (int) getServerCount |  |  |

Get time stamp server count.

Returns
  Server count.

## ◆ getServerIndex:()

+ (int) getServerIndex: |  | (FSTimeStampServer*) | server |

Get the index of a speicified time stamp server object.

Parameters

  [in] | server | A time stamp server object.

Returns
  Index of specified time stamp server object.

## ◆ initialize()

+ (FSErrorCode) initialize |  |  |

Initialize time stamp server manager.

This function should be called first before any other functions in FSTimeStampServerMgr can be called.

Returns
  FSErrSuccess means success.
  For more information about error code values, please refer to values starting from FSErrSuccess.

## ◆ removeServer:()

+ (void) removeServer: |  | (FSTimeStampServer*) | server |

Remove a time stamp server from the manager, by index.

Parameters

  [in] | server | A time stamp server object to be removed from the manager. If input server object is invalid, this function will do nothing and return directly.

Returns
  None.

## ◆ removeServerWithIndex:()

+ (void) removeServerWithIndex: |  | (int) | index |

Remove a time stamp server from the manager, by index.

Parameters

  [in] | index | Index of the time stamp server which is to be removed from the manager.

Returns
  None.

## ◆ setDefaultServer:()

+ (void) setDefaultServer: |  | (FSTimeStampServer*) | server |

Set default time stamp server object by index.

Parameters

  [in] | server | A time stamp server object to be set as default server. If input server object is invalid, this function wil throw exception FSErrNotFound.

Returns
  None.

## ◆ setDefaultServerWithIndex:()

+ (void) setDefaultServerWithIndex: |  | (int) | index |

Set default time stamp server object by index.

Parameters

  [in] | index | Index of a time stamp server to be set as default one.Valid range: from 0 to (count-1). count is returned by function FSTimeStampServerMgr::getServerCount.

Returns
  None.