Foxit PDF SDK

构造函数 | 所有成员列表
<FSAppProviderCallback>协议 参考

继承自 <NSObject> .

## 构造函数
(void) | - beep:
| A callback function used to beep for specified beep type. 更多...
(id< FSFileReaderCallback >) | - downLoadUrl:
| A callback function used to download from specified URL. 更多...
(NSString *) | - getAppInfo:
| A callback function used to get application information for a specified information type. 更多...
(NSString *) | - loadString:
| A callback function used to load a string in local language for a specified case. 更多...
(FSAppProviderCallbackMsgBoxButtonID) | - msgBox:title:icon_type:button_type:
| A callback function used to set message box. 更多...
(NSString *) | - postRequestURL:data:content_type:encode:header:
| A callback function used to post data to the given URL. 更多...
(BOOL) | - putRequestURL:data:encode:
| A callback function used to put data to the given URL. 更多...
(NSString *) | - response:title:default_answer:is_mask:
| A callback function used to response. 更多...
(NSArray< NSString * > *) | - showFileDialog:string_filter:is_openfile_dialog:
| A callback function used to show file dialog. 更多...

## 详细描述

This class represents a callback object as an XFA application provider. All the functions in this class are used as callback functions. Pure virtual functions should be implemented by user.

## 函数文档

## ◆ beep:()

- (void) beep: |  | (FSAppProviderCallbackBeepType) | type |
| required

A callback function used to beep for specified beep type.

参数

  [in] | type | The beep type. Please refer to values starting from FSAppProviderCallbackBeepTypeError and this would be one of these values.

返回
  None.

## ◆ downLoadUrl:()

- (id<FSFileReaderCallback>) downLoadUrl: |  | (NSString *) | url |
| required

A callback function used to download from specified URL.

参数

  [in] | url | A URL to be downloaded.

返回
  Pointer to a ReaderCallback object which can be used to read the downloading result.

## ◆ getAppInfo:()

- (NSString*) getAppInfo: |  | (FSActionCallbackAppInfoType) | app_info |
| required

A callback function used to get application information for a specified information type.

参数

  [in] | app_info | The type of application information, whose information is to retrieved. Please refer to values starting from FSAppProviderCallbackAppInfoType and this would be one of these values.

返回
  A string of application information.

## ◆ loadString:()

- (NSString*) loadString: |  | (FSAppProviderCallbackStringID) | string_id |
| required

A callback function used to load a string in local language for a specified case.

This function is very useful for user to use local language for message of specified cases. User can re-write or translate the sample message (which is defined in the comment of values starting from FSAppProviderCallbackStringIDValidateFailed) into local language for the specified case, and return the result string to Foxit PDF SDK. Specially, Foxit PDF SDK will add some necessary information/data to the format part in the sample message, in order to make the message more useful. User is recommended to keep these format part in the re-written or translated result string; otherwise, these information/data will not be lost and will not be added to the message offered by user.

参数

  [in] | string_id | A string ID to specify a case. Please refer to values starting from FSAppProviderCallbackStringIDValidateFailed and this would be one of these values.

返回
  A string used for the specified case.

## ◆ msgBox:title:icon_type:button_type:()

- (FSAppProviderCallbackMsgBoxButtonID) msgBox: |  | (NSString *) | message
title: |  | (NSString *) | title
icon_type: |  | (FSAppProviderCallbackMsgBoxIconType) | icon_type
button_type: |  | (FSAppProviderCallbackMsgBoxButtonType) | button_type
| required

A callback function used to set message box.

参数

  [in] | message | A message string.
  [in] | title | The title of message box.
  [in] | icon_type | The icon type for message box. Please refer to values starting from FSAppProviderCallbackMsgBoxIconError and this would be one of these values.
  [in] | button_type | The button type for message box. Please refer to values starting from FSAppProviderCallbackMsgBtnTypeOK and this would be one of these values.

返回
  The button ID for message box. Please refer to values starting from FSAppProviderCallbackMsgBtnIDOK and this should be one of these values.

## ◆ postRequestURL:data:content_type:encode:header:()

- (NSString*) postRequestURL: |  | (NSString *) | url
data: |  | (NSString *) | data
content_type: |  | (NSString *) | content_type
encode: |  | (NSString *) | encode
header: |  | (NSString *) | header
| required

A callback function used to post data to the given URL.

参数

  [in] | url | A URL, to which the data will be posted.
  [in] | data | The data to be posted.
  [in] | content_type | A string that represents the content type of data. This string could be "text/html", "text/xml", "text/plain", "multipart/form-data", "application/x-www-form-urlencoded", "application/octet-stream", or any valid MIME type.
  [in] | encode | A string that represents the encoding of data. This string could be "UTF-8", "UTF-16", "ISO8859-1", or any recognized [IANA]character encoding.
  [in] | header | A string that represents any additional HTTP headers to be included in the post.

返回
  The response string.

## ◆ putRequestURL:data:encode:()

- (BOOL) putRequestURL: |  | (NSString *) | url
data: |  | (NSString *) | data
encode: |  | (NSString *) | encode
| required

A callback function used to put data to the given URL.

参数

  [in] | url | A URL, to which the data will be put.
  [in] | data | The data to be put.
  [in] | encode | A string that represents the encoding of data. This string could be "UTF-8", "UTF-16", ISO8859-1", or any recognized [IANA]character encoding.

返回
  YES means success, while NO means failure.

## ◆ response:title:default_answer:is_mask:()

- (NSString*) response: |  | (NSString *) | question
title: |  | (NSString *) | title
default_answer: |  | (NSString *) | default_answer
is_mask: |  | (BOOL) | is_mask
| required

A callback function used to response.

参数

  [in] | question | A string that represents the question.
  [in] | title | A string that represents the title.
  [in] | default_answer | A string that represents the default answer. It could be an empty string which means no default answer.
  [in] | is_mask | YES means the answer should be masked by '*', while NO means the answer does not need to be masked by '*'.

返回
  A string that represents the response answer.

## ◆ showFileDialog:string_filter:is_openfile_dialog:()

- (NSArray<NSString*>*) showFileDialog: |  | (NSString *) | string_title
string_filter: |  | (NSString *) | string_filter
is_openfile_dialog: |  | (BOOL) | is_openfile_dialog
| required

A callback function used to show file dialog.

参数

  [in] | string_title | A string that represents the dialog title.
  [in] | string_filter | A string that represents the dialog file filter.
  [in] | is_openfile_dialog | YES means the dialog is an open-file-dialog, while NO means the dialog is a save-as-dialog.

返回
  An array of file paths.