NIM SDK API  9.0.0
Typedefs | Enumerations
nim_doc_trans_def.h File Reference

文档转换 接口相关的常量函数等定义头文件 More...

#include "public_defines.h"

Go to the source code of this file.

Typedefs

typedef void(* nim_doctrans_opt_cb_func) (int32_t code, const char *json_extension, const void *user_data)
 

Enumerations

enum  NIMDocTranscodingFileType { kNIMDocTranscodingFileTypePPT = 1, kNIMDocTranscodingFileTypePPTX = 2, kNIMDocTranscodingFileTypePDF = 3 }
 
enum  NIMDocTranscodingImageType { kNIMDocTranscodingImageTypeJPG = 10, kNIMDocTranscodingImageTypePNG = 11 }
 
enum  NIMDocTranscodingQuality { kNIMDocTranscodingQualityHigh = 1, kNIMDocTranscodingQualityMedium = 2, kNIMDocTranscodingQualityLow = 3 }
 
enum  NIMDocContinueUploadState { kNIMDocContinueUploadNone = 0, kNIMDocContinueUploading = 1, kNIMDocContinueUploadFailed = 2, kNIMDocContinueUploadCompleted = 3 }
 
enum  NIMDocTranscodingState {
  kNIMDocTranscodingStatePreparing = 1, kNIMDocTranscodingStateOngoing = 2, kNIMDocTranscodingStateTimeout = 3, kNIMDocTranscodingStateCompleted = 4,
  kNIMDocTranscodingStateFailed = 5
}
 
enum  NIMDocTranscodingFailFlag {
  kNIMDocTransFailFlagSuccess = 0, kNIMDocTransFailFlagNotExist = 2, kNIMDocTransFailFlagFileTypeErr = 3, kNIMDocTransFailFlagRequstErr = 4,
  kNIMDocTransFailFlagLinkErr = 5, kNIMDocTransFailFlagServerErr = 6, kNIMDocTransFailFlagPicErr = 7, kNIMDocTransFailFlagQualityErr = 8,
  kNIMDocTransFailFlagPageLimit = 9, kNIMDocTransFailFlagNosErr = 10, kNIMDocTransFailFlagDocParseErr = 11, kNIMDocTransFailFlagUnknown = 100
}
 

Variables

json extension params for doc trans info

for example pic_info: "pic_info":[{"height":1080,"quality":1,"size":77599,"width":1439},{"height":720,"quality":2,"size":46287,"width":959},{"height":480,"quality":3,"size":27577,"width":639}] for example one info: {"ext":"ext_test","id":"8c17c252...","name":"name_test","page_num":0,"pic_type":11,"size":568351,"source_type":2,"state":2,"url_prefix":"http://......"} {"ext":"ext","id":"7b004b82...","name":"name","page_num":1,"pic_info":[...],"pic_type":11,"size":106496,"source_type":1,"state":4,"url_prefix":"http..."} for example infolist: {"count":3,"infos":[{"ext":"ext_test" ...},{"ext":"ext_test" ...},{"ext":"ext_test" ...}]}

static const char * kNIMDocTransCount = "count"
 
static const char * kNIMDocTransInfos = "infos"
 
static const char * kNIMDocTransId = "id"
 
static const char * kNIMDocTransName = "name"
 
static const char * kNIMDocTransSourceType = "source_type"
 
static const char * kNIMDocTransSize = "size"
 
static const char * kNIMDocTransPicType = "pic_type"
 
static const char * kNIMDocTransState = "state"
 
static const char * kNIMDocTransUrlPrefix = "url_prefix"
 
static const char * kNIMDocTransPageNum = "page_num"
 
static const char * kNIMDocTransExt = "ext"
 
static const char * kNIMDocTransFlag = "flag"
 
static const char * kNIMDocTransPicInfo = "pic_info"
 
static const char * kNIMDocTransQuality = "quality"
 
static const char * kNIMDocTransWidth = "width"
 
static const char * kNIMDocTransHeight = "height"
 
static const char * kNIMDocTransFilePath = "file_path"
 
static const char * kNIMDocTransUploadStatus = "upload_status"
 

Detailed Description

文档转换 接口相关的常量函数等定义头文件

Author
gq
Date
2016/12/12

Typedef Documentation

◆ nim_doctrans_opt_cb_func

void(* nim_doctrans_opt_cb_func)(int32_t code, const char *json_extension, const void *user_data)

nim callback function for doc trans result

Parameters
[out]code200为成功,其他为失败
[out]json_extensionjson扩展数据,如果查询成功返回文档信息
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
void 无返回值

Enumeration Type Documentation

◆ NIMDocContinueUploadState

续传过程状态

Enumerator
kNIMDocContinueUploadNone 

没有进行过上传

kNIMDocContinueUploading 

文件续传中

kNIMDocContinueUploadFailed 

文件续传失败

kNIMDocContinueUploadCompleted 

文件续传完成

◆ NIMDocTranscodingFailFlag

转码失败原因

Enumerator
kNIMDocTransFailFlagSuccess 

正常

kNIMDocTransFailFlagNotExist 

找不到文件

kNIMDocTransFailFlagFileTypeErr 

文件类型错误

kNIMDocTransFailFlagRequstErr 

转码请求出现异常

kNIMDocTransFailFlagLinkErr 

转码服务器连接错误

kNIMDocTransFailFlagServerErr 

转码服务器内部错误

kNIMDocTransFailFlagPicErr 

文档转码图片出错

kNIMDocTransFailFlagQualityErr 

图片质量处理错误

kNIMDocTransFailFlagPageLimit 

页数超限

kNIMDocTransFailFlagNosErr 

nos回调错误

kNIMDocTransFailFlagDocParseErr 

文档解析出错

kNIMDocTransFailFlagUnknown 

表示未知错误

◆ NIMDocTranscodingFileType

转码源文件格式

Enumerator
kNIMDocTranscodingFileTypePPT 

ppt

kNIMDocTranscodingFileTypePPTX 

pptx

kNIMDocTranscodingFileTypePDF 

pdf

◆ NIMDocTranscodingImageType

转码目标图像文件类型

Enumerator
kNIMDocTranscodingImageTypeJPG 

转码为 jpg 图片

kNIMDocTranscodingImageTypePNG 

转码为 png 图片

◆ NIMDocTranscodingQuality

转码图像清晰度

Enumerator
kNIMDocTranscodingQualityHigh 

高清转码质量

kNIMDocTranscodingQualityMedium 

中等转码质量

kNIMDocTranscodingQualityLow 

低清转码质量

◆ NIMDocTranscodingState

转码过程状态

Enumerator
kNIMDocTranscodingStatePreparing 

转码准备中

kNIMDocTranscodingStateOngoing 

转码进行中

kNIMDocTranscodingStateTimeout 

转码超时

kNIMDocTranscodingStateCompleted 

转码完成

kNIMDocTranscodingStateFailed 

转码失败

Variable Documentation

◆ kNIMDocTransCount

const char* kNIMDocTransCount = "count"
static

int32 计数

◆ kNIMDocTransExt

const char* kNIMDocTransExt = "ext"
static

string 发起文档转码时的附带信息

◆ kNIMDocTransFilePath

const char* kNIMDocTransFilePath = "file_path"
static

string 上传文件的路径

◆ kNIMDocTransFlag

const char* kNIMDocTransFlag = "flag"
static

int32 错误原因NIMDocTranscodingFailFlag,kNIMDocTranscodingStateFailed时有效

◆ kNIMDocTransHeight

const char* kNIMDocTransHeight = "height"
static

int32 图片宽度

◆ kNIMDocTransId

const char* kNIMDocTransId = "id"
static

string 标识ID

◆ kNIMDocTransInfos

const char* kNIMDocTransInfos = "infos"
static

key 分页获取时文档信息列表的key

◆ kNIMDocTransName

const char* kNIMDocTransName = "name"
static

string 转码文档名称

◆ kNIMDocTransPageNum

const char* kNIMDocTransPageNum = "page_num"
static

int32 转码文档总页数

◆ kNIMDocTransPicInfo

const char* kNIMDocTransPicInfo = "pic_info"
static

key 图片信息的key;用于描述各个分辨率的信息

◆ kNIMDocTransPicType

const char* kNIMDocTransPicType = "pic_type"
static

int32 转码目标图片的文件类型NIMDocTranscodingImageType

◆ kNIMDocTransQuality

const char* kNIMDocTransQuality = "quality"
static

int32 转码图像清晰度

◆ kNIMDocTransSize

const char* kNIMDocTransSize = "size"
static

int64 文件大小

◆ kNIMDocTransSourceType

const char* kNIMDocTransSourceType = "source_type"
static

int32 转码源文档的文件类型NIMDocTranscodingFileType

◆ kNIMDocTransState

const char* kNIMDocTransState = "state"
static

int32 转码过程状态NIMDocTranscodingState

◆ kNIMDocTransUploadStatus

const char* kNIMDocTransUploadStatus = "upload_status"
static

int32 文件续传状态NIMDocContinueUploadState

◆ kNIMDocTransUrlPrefix

const char* kNIMDocTransUrlPrefix = "url_prefix"
static

string 转码后的下载地址前缀

◆ kNIMDocTransWidth

const char* kNIMDocTransWidth = "width"
static

int32 图片宽度