Foxit PDF SDK
foxit.pdf.TimeStampServerMgr类 参考

继承自 SystemIDisposable .

静态 Public 成员函数

static TimeStampServer AddServer (string server_name, string server_url, string user_name, string password)
 向管理器添加时间戳服务器。 更多...
 
static TimeStampServer GetDefaultServer ()
 获取默认时间戳服务器对象。 更多...
 
static TimeStampServer GetServer (int index)
 使用指定索引获取时间戳服务器。 更多...
 
static int GetServerCount ()
 获取时间戳服务器数量。 更多...
 
static int GetServerIndex (TimeStampServer server)
 获取指定时间戳服务器对象的索引。 更多...
 
static ErrorCode Initialize ()
 初始化时间戳服务器管理器。 更多...
 
static void Release ()
 释放时间戳服务器管理器。 更多...
 
static void RemoveServer (int index)
 通过索引从管理器中移除时间戳服务器。 更多...
 
static void RemoveServer (TimeStampServer server)
 通过时间戳服务器对象从管理器中移除时间戳服务器。 更多...
 
static void SetDefaultServer (int index)
 通过索引设置默认时间戳服务器对象。 更多...
 
static void SetDefaultServer (TimeStampServer server)
 通过时间戳服务器对象设置默认时间戳服务器。 更多...
 

详细描述

时间戳服务器管理器用于管理一些时间戳服务器。此管理器中的默认时间戳服务器将 在过滤器"Adobe.PPKLite"与子过滤器"ETSI.CAdES.detached"以及 过滤器"Adobe.PPKLite"与子过滤器"ETSI.RFC3161"的默认签名回调中使用。因此在使用Foxit PDF SDK中的默认签名回调 对这些过滤器-子过滤器对的签名进行签名或验证之前,请确保通过 Library.SetTimeStampCallback 设置了有效的foxit.pdf.TimeStampCallback 对象, 或者时间戳服务器管理器已初始化并设置了默认服务器,如果两者都设置了,Foxit PDF SDK将使用foxit.pdf.TimeStampCallback

成员函数说明

◆ AddServer()

static TimeStampServer foxit.pdf.TimeStampServerMgr.AddServer ( string  server_name,
string  server_url,
string  user_name,
string  password 
)
inlinestatic

向管理器添加时间戳服务器。

参数
[in]server_name时间戳服务器名称。不应为空字符串。
[in]server_url时间戳服务器URL。不应为空字符串。
[in]user_name时间戳服务器的用户名。如果不需要,请传递空字符串。
[in]password时间戳服务器的密码。如果不需要,请传递空字符串。
返回
新添加的时间戳服务器对象。

◆ GetDefaultServer()

static TimeStampServer foxit.pdf.TimeStampServerMgr.GetDefaultServer ( )
inlinestatic

获取默认时间戳服务器对象。

返回
作为默认的时间戳服务器对象。

◆ GetServer()

static TimeStampServer foxit.pdf.TimeStampServerMgr.GetServer ( int  index)
inlinestatic

使用指定索引获取时间戳服务器。

参数
[in]index时间戳服务器索引。有效范围:从0到(count-1)。 count由函数TimeStampServerMgr.GetServerCount 返回。
返回
时间戳服务器对象。

◆ GetServerCount()

static int foxit.pdf.TimeStampServerMgr.GetServerCount ( )
inlinestatic

获取时间戳服务器数量。

返回
服务器数量。

◆ GetServerIndex()

static int foxit.pdf.TimeStampServerMgr.GetServerIndex ( TimeStampServer  server)
inlinestatic

获取指定时间戳服务器对象的索引。

参数
[in]server时间戳服务器对象。
返回
指定时间戳服务器对象的索引。

◆ Initialize()

static ErrorCode foxit.pdf.TimeStampServerMgr.Initialize ( )
inlinestatic

初始化时间戳服务器管理器。

在可以调用TimeStampServerMgr 中的任何其他函数之前,应首先调用此函数。

返回
foxit.common.ErrorCode.e_ErrSuccess 表示成功。
有关错误代码值的更多信息,请参阅从foxit.common.ErrorCode.e_ErrSuccess 开始的值。

◆ Release()

static void foxit.pdf.TimeStampServerMgr.Release ( )
inlinestatic

释放时间戳服务器管理器。

用户可以调用此函数在不再需要使用时间戳服务器管理器时释放它。 调用此函数后,如果用户想再次使用时间戳服务器管理器,请再次调用函数 TimeStampServerMgr.Initialize

返回
None.

◆ RemoveServer() [1/2]

static void foxit.pdf.TimeStampServerMgr.RemoveServer ( int  index)
inlinestatic

通过索引从管理器中移除时间戳服务器。

参数
[in]index要从管理器中移除的时间戳服务器的索引。
返回
None.

◆ RemoveServer() [2/2]

static void foxit.pdf.TimeStampServerMgr.RemoveServer ( TimeStampServer  server)
inlinestatic

通过时间戳服务器对象从管理器中移除时间戳服务器。

参数
[in]server要从管理器中移除的时间戳服务器对象。 如果输入的服务器对象无效,此函数将不执行任何操作 并直接返回。
返回
None.

◆ SetDefaultServer() [1/2]

static void foxit.pdf.TimeStampServerMgr.SetDefaultServer ( int  index)
inlinestatic

通过索引设置默认时间戳服务器对象。

参数
[in]index要设置为默认服务器的时间戳服务器索引。有效范围:从0到(count-1)。 count由函数TimeStampServerMgr.GetServerCount 返回。
返回
None.

◆ SetDefaultServer() [2/2]

static void foxit.pdf.TimeStampServerMgr.SetDefaultServer ( TimeStampServer  server)
inlinestatic

通过时间戳服务器对象设置默认时间戳服务器。

参数
[in]server要设置为默认服务器的时间戳服务器对象。 如果输入的服务器对象无效,此函数将抛出 异常foxit.common.ErrorCode.e_ErrNotFound
返回
None.