110,536
社区成员
发帖
与我相关
我的任务
分享
/*
* MtpDevice - generic MTP device
*
*/
struct _MtpDevice;
/**
* @brief Structure for providing access and support for MTP device information and control. For API documentation, please see ::_MtpDevice.
*/
typedef struct _MtpDevice MtpDevice;
struct _MtpDevice
{
/* ////////////////////////////////////////////////////////////////////////////////////////////
* Device opening/closing
*/
/**
* @brief Opens the specified MTP Device.
* @param This A pointer to ::MtpDevice.
* @param bstrDevicePortName An ::MTP_STRING representing the device name. This is transport-specific. Using the provided Windows USB transport, it is of the form "\\\\.\\wpdusbN" where N is an zero-based integer.
* @param MtpEventCallback A ::MtpEventCallback representing the address of object supporting event callback interface.
* This may be @a NULL if client doesn't want to receive events.
* @param dwReserved An ::MTP_UINT32 that is reserved for future transports. Always set to 0.
* @return An ::MTP_RESULT code that identifies the result of calling the function.
*
* This function must be called before any other function.
*
* Client must call Close() after it's finished working with the device.
*/
MTP_RESULT (*Open)(MtpDevice *This,
/*[in]*/ MTP_STRING bstrDevicePortName,
/*[in]*/ MtpEventCallback Callback,
/*[in, defaultvalue(0)]*/ MTP_UINT32 dwReserved);
/**
* @brief Closes the MTP Device.
* @param This A pointer to the ::MtpDevice.
* @return An ::MTP_RESULT code that identifies the result of calling the function.
*/
MTP_RESULT (*Close)(MtpDevice *This);
};
struct _MtpDevice
{
/* ////////////////////////////////////////////////////////////////////////////////////////////
* Device opening/closing
*/
/**
* @brief Opens the specified MTP Device.
* @param This A pointer to ::MtpDevice.
* @param bstrDevicePortName An ::MTP_STRING representing the device name. This is transport-specific. Using the provided Windows USB transport, it is of the form "\\\\.\\wpdusbN" where N is an zero-based integer.
* @param MtpEventCallback A ::MtpEventCallback representing the address of object supporting event callback interface.
* This may be @a NULL if client doesn't want to receive events.
* @param dwReserved An ::MTP_UINT32 that is reserved for future transports. Always set to 0.
* @return An ::MTP_RESULT code that identifies the result of calling the function.
*
* This function must be called before any other function.
*
* Client must call Close() after it's finished working with the device.
*/
int Open(_MtpDevice This,
/*[in]*/ string bstrDevicePortName,
/*[in]*/ MtpEventCallback Callback,
/*[in, defaultvalue(0)]*/ int dwReserved)
{
}
/**
* @brief Closes the MTP Device.
* @param This A pointer to the ::MtpDevice.
* @return An ::MTP_RESULT code that identifies the result of calling the function.
*/
int Close(_MtpDevice This)
{
}
};