-
am_device_notification_callback
定义:
typedef
void(*am_device_notification_callback)(struct
am_device_notification_callback_info
*);
描述:
回调函数,当设备状
态改变时由
回调
参数:
am_device_notification_callback_in
fo
返回设备信息
am_restore_device_notification_callback
定义:
typedef void
(*am_restore_device_notification_callback)(struct
am_recovery_device *);
描述:
回调函数,当检测到
restore
模式设备时由
< br>回调
参数:
am_recovery_device
返回设备信息
AMDeviceNotificationSubscribe
定义:
typedef
mach_error_t
(*AMDeviceNotificationSubs
cribe)(am_device_notification_callback
callback,
unsigned int
unused0,
unsigned int unused1,
unsigned int
dn_unknown3,
struct am_device_notification
*notification);
描述:
订阅设备状态改变回调绑定函数
参数:
am_device_notification_callback
callback
指向回调函数指针
unsigned int
unused0
未知
itunes
调用时设为
0
unsigned int
unused1
未知
itunes
调用时设为
0
unsigned int
dn_unknown3
未知
am_device_notification *notification
设备信息结构
返回值:
*MDERR_OK
if
successful
------0
*MDERR_SYSCALLif CFRunLoopAddSource() failed
*MDERR_OUT_OF_MEMORY if we ran out of memory
AMDeviceConnect
定义:
typedef
mach_error_t (*AMDeviceConnect)(struct am_device
*device);
描述:
连接设备
参数:
am_device
*device
回调函数返回的设备信息
返回值:
*MDERR_OK
if successfully connected
*MDERR_SYSCALLif setsockopt() failed
*MDERR_QUERY_FAILED
if the daemon query
failed
*MDERR_INVALID_ARGUMENT
if
USBMuxConnectByPort returned
0xffffffff
AMDeviceIsPaired
定义:
typedef int
(*AMDeviceIsPaired)(struct am_device *device);
描述:
检测路径是否存在,初始化阶段路
径是
参数:
am_device
*device
回调函数返回的设备信息
返回值:
*
0
if the path
did not exist
*
1
if it did
AMDeviceValidatePairing
定义:
typedef
mach_error_t (*AMDeviceValidatePairing)(struct
am_device
*device);
描述:
Itunes
在测试(
AMDeviceIsPaired
)完后立即调用这个函数,建立配对<
/p>
文件并设置到
lockdown
的连接<
/p>
参数:
am_device
*device
回调函数返回的设备信息
返回值:
*
MDERR_OK
if successful
*
MDERR_INVALID_ARGUMENT
if the supplied
device is null
*
MDERR_DICT_NOT_LOADED
if
the load_dict() call failed
AMDeviceStartSession
定义:
typedef
mach_error_t
(*AMDeviceStartSession)(struct
am_device
*device);
描述:
创建
lockdown session
,如果创建成功适当的调整设备结构。
Itunes
在
AMDeviceValidatePairing
后立即调用此函数
参数:
am_device
*device
回调函数返回的设备信息
返回值:
*MDERR_OK
if successful
*MDERR_INVALID_ARGUMENT if the Lockdown
conn has not been established
*MDERR_DICT_NOT_LOADED
if
the load_dict() call failed
AMDeviceStartService
定义:
typedef
mach_error_t (*AMDeviceStartService)(struct
am_device *device,
void*
service_name,
afc_connection **handle, unsigned int *unknown);
描述:
启动服务并返回指向这个服务的句
柄,使用返回的句柄可以进行后续的
各种操作。在使用服务之前你应该关闭
session
断开连接(并不是这样的),
itu
nes
调用此函数在调用完
AMDeviceStartSes
sion
函数之后。
参数:
am_device
*device
回调函数返回的设备信息
void*
service_name
要启动的服务名称,注意
MAC OS
CFString
格式
afc_connection **handle
返回连接结构
unsigned
int *unknown
未知
itunes
设为
0
返回值:
*MDERR_OK
if successful
*MDERR_SYSCALL
if the
setsockopt() call failed
*MDERR_INVALID_ARGUMENT if the Lockdown
conn has not been established
AMDeviceStopSession
定义:
typedef
mach_error_t (*AMDeviceStopSession)(struct
am_device *device);
描述:
关闭
session
,在访问服务之
前需要关闭
session
(好像不用)。
参数:
am_device
*device
回调函数返回的设备信息
返回值:
*MDERR_OK
if successful
*MDERR_INVALID_ARGUMENT if the Lockdown
conn has not been established
AFCConnectionOpen
定义:
typedef
afc_error_t (*AFCConnectionOpen)(afc_connection
*handle,
unsigned int io_timeout,struct
afc_connection **conn);
描述:
p>
打开
apple
文件系统的连接,在这之前
你必须通过
AMDeviceStartService
打开了
适当的服务。
参数:
afc_connection *handle
AMDeviceStartSe
rvice
函数返回的连接信
息
unsigned int io_timeout
超时设置为
0
afc_connection
**conn
返回的连接信息,可以和
afc_connection
*handle
使用相同的对象
返回值:
*MDERR_OK
if
successful
*MDERR_AFC_OUT_OF_MEMORY
AFCDeviceInfoOpen
定义:
typedef
afc_error_t (*AFCDeviceInfoOpen)(struct
afc_connection *conn,
struct
afc_dictionary **info);
描述:
获得设备的信息。
参数:
afc_connection *handle
AMDeviceStartService
函数返回的连接
信
息
afc_dictionary **info
返回的设备信息
返回值:
*
MDERR_OK
if successful
*
MDERR_AFC_OUT_OF_MEMORY
failed
返回实例:
Model iPhone1,2
if malloc()
if
malloc() failed
FSTotalBytes 524288000
FSFreeBytes 55099392
FSBlockSize 4096
AFCDirectoryOpen
定义:
typedef
afc_error_t (*AFCDirectoryOpen)(afc_connection
*conn, char
*path,
/*afc_directory*/afc_directory **dir);
描述:
打开一个目录。
< br>注,
没有越狱的系统默认的
目录
是
这是
itunes
< br>的
sandbox
行为。
参数:
afc_connection * conn AMDe
viceStartService
函数返回的连接信息
char *path
路径信息
afc_directory **dir
返回的路径句柄
返回值:
*
MDERR_OK
if successful
AFCDirectoryRead
定义:
typedef
afc_error_t (*AFCDirectoryRead)(afc_connection
*conn,afc_directory *dir,char
**dirent);
描述:
读取路
径下的下一个节点,当到达最后一个节点后将返回
NULL
。返
回的
前两个节点将是
和
。
参数:
afc_connection * conn AMDe
viceStartService
函数返回的连接信息
afc_directory *dir
AFCDirectoryOpen
返回的目录句柄
char **dirent
返回的节点名字
返回值:
*
MDERR_OK
if successful
AFCDirectoryClose
定义:
typedef
afc_error_t (*AFCDirectoryClose)(afc_connection
*conn, struct
afc_directory *dir);
描述:
关闭路径。
参数:
afc_connection * conn AMDe
viceStartService
函数返回的连接信息
afc_directory *dir
AFCDirectoryOpen
返回的目录句柄
返回值:
*
MDERR_OK
if successful
AFCDirectoryCreate
定义:
typedef
afc_error_t (*AFCDirectoryCreate)(afc_connection
*conn, char
*dirname);
描述:
创建路径。注,创建的目录父路径必须存在。
参数:
afc_connection * conn AMDe
viceStartService
函数返回的连接信息
char *dirname
完整的目录名字包括
path
返回值:
*
MDERR_OK
if successful
AFCRemovePath
定义:
typedef
afc_error_t (*AFCRemovePath)(afc_connection *conn,
char
*dirname);
描述:
删除路径。注,路径为空。
参数:
afc_connection * conn AMDe
viceStartService
函数返回的连接信息
char *dirname
完整的目录名字包括
path
返回值:
*
MDERR_OK
if successful
AFCRenamePath
定义:
typedef
afc_error_t (*AFCRenamePath)(afc_connection *conn,
char
*oldpath, char *newpath);
描述:
路径改名。
参数:
afc_connection * conn AMDe
viceStartService
函数返回的连接信息
char * oldpath
老得目录名
char
*newpath
新的目录名
返回值:
*
MDERR_OK
if successful
AFCConnectionGetContext
定义:
typedef
unsigned int (*AFCConnectionGetContext)(struct
afc_connection
*conn);
描述:
返回连接上下文。
参数:
afc_connection * conn AMDe
viceStartService
函数返回的连接信息
返回值:
上下文编号
AFCConnectionGetFSBlockSize
定义:
typedef
unsigned int (*AFCConnectionGetFSBlockSize)(struct
afc_connection *conn);
描述:
返回文件系统
blocks
大小。
参数:
afc_connection * conn AMDe
viceStartService
函数返回的连接信息
返回值:
blocks
大小
AFCConnectionGetIOTimeout
定义:
typedef
unsigned
int
(*AFCConnectionGetIOTimeout)(struct
afc_connection
*conn);
描述:
返回
IO
超时时间。
Itunes
里这里返回<
/p>
0
参数:
afc_connection
* conn AMDeviceStartService
函数返回的连接信息
返回值:
超时时间
AFCConnectionGetSocketBlockSize
定义:
typedef
unsigned int
(*AFCConnectionGetSocketBlockSize)(struct
afc_connection *conn);
描述:
返回
So
cket
块大小。
参数:
afc_connection * conn AMDe
viceStartService
函数返回的连接信息
返回值:
Socket
块大小
AFCConnectionClose
定义:
typedef
afc_error_t
(*AFCConnectionClose)(struct
afc_connection
*conn);
描述:
关闭连接。
参数:
afc_connection * conn AMDe
viceStartService
函数返回的连接信息
返回值:
*
MDERR_OK
if successful
AMRestoreRegisterForDeviceNotifications
定义:
typedef
unsigned int
(*AMRestoreRegisterForDevi
ceNotifications)(am_restore_device_notifica
tion_callback
dfu_connect_callback,
am_restore_device_notification_callback
recovery_connect_callback,am_restore_device_notif
ication_callback
dfu_disconnect_callbac
k,am_restore_device_notification_callback
recovery_disconnect_callback,unsigned
int unknown0,void *user_info);
描述:
设置
re
store
、
recovery
和
p>
dfu
模式的回调函数。
参数:
am_restore_device_notification_callback
dfu_connect_callback
:
dfu
连
接回调
am_restore_device_notification_callback
recovery_connect_callback
:
re
covery
连接回调
-
-
-
-
-
-
-
-
-
上一篇:英文名对应中文名以及含义
下一篇:Timeout expired 解决思路