mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
[freerdp,channels] mark function pointers [[nodiscard]]
This commit is contained in:
@@ -33,35 +33,35 @@ typedef UINT(VCAPITYPE* static_entry_fn_t)();
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
static_entry_fn_t entry;
|
||||
WINPR_ATTR_NODISCARD static_entry_fn_t entry;
|
||||
} STATIC_ENTRY;
|
||||
|
||||
typedef BOOL(VCAPITYPE* static_entry_vc_fn_t)(PCHANNEL_ENTRY_POINTS);
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
static_entry_vc_fn_t entry;
|
||||
WINPR_ATTR_NODISCARD static_entry_vc_fn_t entry;
|
||||
} STATIC_ENTRY_VC;
|
||||
|
||||
typedef BOOL(VCAPITYPE* static_entry_vcex_fn_t)(PCHANNEL_ENTRY_POINTS_EX, PVOID);
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
static_entry_vcex_fn_t entry;
|
||||
WINPR_ATTR_NODISCARD static_entry_vcex_fn_t entry;
|
||||
} STATIC_ENTRY_VCEX;
|
||||
|
||||
typedef UINT(VCAPITYPE* static_entry_dvc_fn_t)(IDRDYNVC_ENTRY_POINTS*);
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
static_entry_dvc_fn_t entry;
|
||||
WINPR_ATTR_NODISCARD static_entry_dvc_fn_t entry;
|
||||
} STATIC_ENTRY_DVC;
|
||||
|
||||
typedef UINT(VCAPITYPE* static_entry_dse_fn_t)(PDEVICE_SERVICE_ENTRY_POINTS);
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
static_entry_dse_fn_t entry;
|
||||
WINPR_ATTR_NODISCARD static_entry_dse_fn_t entry;
|
||||
} STATIC_ENTRY_DSE;
|
||||
|
||||
typedef union
|
||||
@@ -75,11 +75,11 @@ typedef union
|
||||
|
||||
typedef union
|
||||
{
|
||||
static_entry_fn_t cse;
|
||||
static_entry_vc_fn_t csevc;
|
||||
static_entry_vcex_fn_t csevcex;
|
||||
static_entry_dvc_fn_t csedvc;
|
||||
static_entry_dse_fn_t csedse;
|
||||
WINPR_ATTR_NODISCARD static_entry_fn_t cse;
|
||||
WINPR_ATTR_NODISCARD static_entry_vc_fn_t csevc;
|
||||
WINPR_ATTR_NODISCARD static_entry_vcex_fn_t csevcex;
|
||||
WINPR_ATTR_NODISCARD static_entry_dvc_fn_t csedvc;
|
||||
WINPR_ATTR_NODISCARD static_entry_dse_fn_t csedse;
|
||||
} static_entry_fn_u;
|
||||
|
||||
typedef struct
|
||||
@@ -93,7 +93,7 @@ typedef struct
|
||||
{
|
||||
const char* name;
|
||||
const char* type;
|
||||
static_subsystem_entry_fn_t entry;
|
||||
WINPR_ATTR_NODISCARD static_subsystem_entry_fn_t entry;
|
||||
} STATIC_SUBSYSTEM_ENTRY;
|
||||
|
||||
typedef struct
|
||||
|
||||
@@ -923,7 +923,7 @@ static void drive_message_free(void* obj)
|
||||
if (!irp)
|
||||
return;
|
||||
WINPR_ASSERT(irp->Discard);
|
||||
irp->Discard(irp);
|
||||
(void)irp->Discard(irp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1536,13 +1536,12 @@ static UINT dummy_irp_response(rdpdrPlugin* rdpdr, wStream* s)
|
||||
*/
|
||||
static UINT rdpdr_process_irp(rdpdrPlugin* rdpdr, wStream* s)
|
||||
{
|
||||
IRP* irp = NULL;
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
|
||||
WINPR_ASSERT(rdpdr);
|
||||
WINPR_ASSERT(s);
|
||||
|
||||
irp = irp_new(rdpdr->devman, rdpdr->pool, s, rdpdr->log, &error);
|
||||
IRP* irp = irp_new(rdpdr->devman, rdpdr->pool, s, rdpdr->log, &error);
|
||||
|
||||
if (!irp)
|
||||
{
|
||||
@@ -1557,16 +1556,14 @@ static UINT rdpdr_process_irp(rdpdrPlugin* rdpdr, wStream* s)
|
||||
}
|
||||
|
||||
if (irp->device->IRPRequest)
|
||||
IFCALLRET(irp->device->IRPRequest, error, irp->device, irp);
|
||||
else
|
||||
irp->Discard(irp);
|
||||
error = irp->device->IRPRequest(irp->device, irp);
|
||||
|
||||
if (error != CHANNEL_RC_OK)
|
||||
{
|
||||
WLog_Print(rdpdr->log, WLOG_ERROR, "device->IRPRequest failed with error %" PRIu32 "",
|
||||
error);
|
||||
irp->Discard(irp);
|
||||
}
|
||||
(void)irp->Discard(irp);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -76,8 +76,8 @@ extern "C"
|
||||
{
|
||||
NdrTypeArity arity;
|
||||
size_t itemSize;
|
||||
NDR_READER_FN readFn;
|
||||
NDR_WRITER_FN writeFn;
|
||||
WINPR_ATTR_NODISCARD NDR_READER_FN readFn;
|
||||
WINPR_ATTR_NODISCARD NDR_WRITER_FN writeFn;
|
||||
NDR_DESTROY_FN destroyFn;
|
||||
NDR_DUMP_FN dumpFn;
|
||||
} NdrMessageDescr;
|
||||
|
||||
@@ -169,9 +169,8 @@ struct s_ICamHal
|
||||
* @param hchannel the generic freerdp channel
|
||||
* @return the number of found cameras
|
||||
*/
|
||||
UINT(*Enumerate)
|
||||
(ICamHal* ihal, ICamHalEnumCallback callback, CameraPlugin* ecam,
|
||||
GENERIC_CHANNEL_CALLBACK* hchannel);
|
||||
WINPR_ATTR_NODISCARD UINT (*Enumerate)(ICamHal* ihal, ICamHalEnumCallback callback,
|
||||
CameraPlugin* ecam, GENERIC_CHANNEL_CALLBACK* hchannel);
|
||||
|
||||
/**
|
||||
* callback to activate a given camera device
|
||||
@@ -181,7 +180,8 @@ struct s_ICamHal
|
||||
* @return if the operation was successful
|
||||
* @since 3.18.0
|
||||
*/
|
||||
BOOL (*Activate)(ICamHal* ihal, const char* deviceId, CAM_ERROR_CODE* errorCode);
|
||||
WINPR_ATTR_NODISCARD BOOL (*Activate)(ICamHal* ihal, const char* deviceId,
|
||||
CAM_ERROR_CODE* errorCode);
|
||||
|
||||
/**
|
||||
* callback to deactivate a given camera device
|
||||
@@ -191,7 +191,8 @@ struct s_ICamHal
|
||||
* @return if the operation was successful
|
||||
* @since 3.18.0
|
||||
*/
|
||||
BOOL (*Deactivate)(ICamHal* ihal, const char* deviceId, CAM_ERROR_CODE* errorCode);
|
||||
WINPR_ATTR_NODISCARD BOOL (*Deactivate)(ICamHal* ihal, const char* deviceId,
|
||||
CAM_ERROR_CODE* errorCode);
|
||||
|
||||
/**
|
||||
* callback that returns the list of compatible media types given a set of supported formats
|
||||
@@ -204,10 +205,10 @@ struct s_ICamHal
|
||||
* @param nMediaTypes output number of media descriptors
|
||||
* @return number of matched supported formats
|
||||
*/
|
||||
INT16(*GetMediaTypeDescriptions)
|
||||
(ICamHal* ihal, const char* deviceId, size_t streamIndex,
|
||||
const CAM_MEDIA_FORMAT_INFO* supportedFormats, size_t nSupportedFormats,
|
||||
CAM_MEDIA_TYPE_DESCRIPTION* mediaTypes, size_t* nMediaTypes);
|
||||
WINPR_ATTR_NODISCARD INT16 (*GetMediaTypeDescriptions)(
|
||||
ICamHal* ihal, const char* deviceId, size_t streamIndex,
|
||||
const CAM_MEDIA_FORMAT_INFO* supportedFormats, size_t nSupportedFormats,
|
||||
CAM_MEDIA_TYPE_DESCRIPTION* mediaTypes, size_t* nMediaTypes);
|
||||
|
||||
/**
|
||||
* callback to start a stream
|
||||
@@ -218,9 +219,10 @@ struct s_ICamHal
|
||||
* @param callback
|
||||
* @return \b CAM_ERROR_CODE_None on success, a CAM_Error otherwise
|
||||
*/
|
||||
CAM_ERROR_CODE(*StartStream)
|
||||
(ICamHal* ihal, CameraDevice* dev, size_t streamIndex,
|
||||
const CAM_MEDIA_TYPE_DESCRIPTION* mediaType, ICamHalSampleCapturedCallback callback);
|
||||
WINPR_ATTR_NODISCARD CAM_ERROR_CODE (*StartStream)(ICamHal* ihal, CameraDevice* dev,
|
||||
size_t streamIndex,
|
||||
const CAM_MEDIA_TYPE_DESCRIPTION* mediaType,
|
||||
ICamHalSampleCapturedCallback callback);
|
||||
|
||||
/**
|
||||
* callback to stop a stream
|
||||
@@ -239,12 +241,12 @@ struct s_ICamHal
|
||||
CAM_ERROR_CODE (*Free)(ICamHal* ihal);
|
||||
};
|
||||
|
||||
typedef UINT (*PREGISTERCAMERAHAL)(IWTSPlugin* plugin, ICamHal* hal);
|
||||
typedef WINPR_ATTR_NODISCARD UINT (*PREGISTERCAMERAHAL)(IWTSPlugin* plugin, ICamHal* hal);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
IWTSPlugin* plugin;
|
||||
PREGISTERCAMERAHAL pRegisterCameraHal;
|
||||
WINPR_ATTR_NODISCARD PREGISTERCAMERAHAL pRegisterCameraHal;
|
||||
CameraPlugin* ecam;
|
||||
const ADDIN_ARGV* args;
|
||||
|
||||
@@ -253,7 +255,8 @@ typedef struct
|
||||
typedef FREERDP_CAMERA_HAL_ENTRY_POINTS* PFREERDP_CAMERA_HAL_ENTRY_POINTS;
|
||||
|
||||
/* entry point called by addin manager */
|
||||
typedef UINT(VCAPITYPE* PFREERDP_CAMERA_HAL_ENTRY)(PFREERDP_CAMERA_HAL_ENTRY_POINTS pEntryPoints);
|
||||
typedef WINPR_ATTR_NODISCARD
|
||||
UINT(VCAPITYPE* PFREERDP_CAMERA_HAL_ENTRY)(PFREERDP_CAMERA_HAL_ENTRY_POINTS pEntryPoints);
|
||||
|
||||
/* common functions */
|
||||
UINT ecam_channel_send_generic_msg(CameraPlugin* ecam, GENERIC_CHANNEL_CALLBACK* hchannel,
|
||||
|
||||
@@ -27,18 +27,19 @@ typedef struct s_ITSMFAudioDevice ITSMFAudioDevice;
|
||||
struct s_ITSMFAudioDevice
|
||||
{
|
||||
/* Open the audio device. */
|
||||
BOOL (*Open)(ITSMFAudioDevice* audio, const char* device);
|
||||
WINPR_ATTR_NODISCARD BOOL (*Open)(ITSMFAudioDevice* audio, const char* device);
|
||||
/* Set the audio data format. */
|
||||
BOOL(*SetFormat)
|
||||
(ITSMFAudioDevice* audio, UINT32 sample_rate, UINT32 channels, UINT32 bits_per_sample);
|
||||
WINPR_ATTR_NODISCARD BOOL (*SetFormat)(ITSMFAudioDevice* audio, UINT32 sample_rate,
|
||||
UINT32 channels, UINT32 bits_per_sample);
|
||||
/* Play audio data. */
|
||||
BOOL (*Play)(ITSMFAudioDevice* audio, const BYTE* data, UINT32 data_size);
|
||||
WINPR_ATTR_NODISCARD BOOL (*Play)(ITSMFAudioDevice* audio, const BYTE* data, UINT32 data_size);
|
||||
/* Get the latency of the last written sample, in 100ns */
|
||||
UINT64 (*GetLatency)(ITSMFAudioDevice* audio);
|
||||
WINPR_ATTR_NODISCARD UINT64 (*GetLatency)(ITSMFAudioDevice* audio);
|
||||
/* Change the playback volume level */
|
||||
BOOL (*ChangeVolume)(ITSMFAudioDevice* audio, UINT32 newVolume, UINT32 muted);
|
||||
WINPR_ATTR_NODISCARD BOOL (*ChangeVolume)(ITSMFAudioDevice* audio, UINT32 newVolume,
|
||||
UINT32 muted);
|
||||
/* Flush queued audio data */
|
||||
BOOL (*Flush)(ITSMFAudioDevice* audio);
|
||||
WINPR_ATTR_NODISCARD BOOL (*Flush)(ITSMFAudioDevice* audio);
|
||||
/* Free the audio device */
|
||||
void (*Free)(ITSMFAudioDevice* audio);
|
||||
};
|
||||
|
||||
@@ -45,12 +45,12 @@
|
||||
typedef struct S_IUDEVICE IUDEVICE;
|
||||
typedef struct S_IUDEVMAN IUDEVMAN;
|
||||
|
||||
#define BASIC_DEV_STATE_DEFINED(_arg, _type) \
|
||||
_type (*get_##_arg)(IUDEVICE * pdev); \
|
||||
#define BASIC_DEV_STATE_DEFINED(_arg, _type) \
|
||||
WINPR_ATTR_NODISCARD _type (*get_##_arg)(IUDEVICE * pdev); \
|
||||
void (*set_##_arg)(IUDEVICE * pdev, _type _arg)
|
||||
|
||||
#define BASIC_DEVMAN_STATE_DEFINED(_arg, _type) \
|
||||
_type (*get_##_arg)(IUDEVMAN * udevman); \
|
||||
#define BASIC_DEVMAN_STATE_DEFINED(_arg, _type) \
|
||||
WINPR_ATTR_NODISCARD _type (*get_##_arg)(IUDEVMAN * udevman); \
|
||||
void (*set_##_arg)(IUDEVMAN * udevman, _type _arg)
|
||||
|
||||
typedef struct
|
||||
@@ -72,7 +72,7 @@ typedef BOOL (*PREGISTERURBDRCSERVICE)(IWTSPlugin* plugin, IUDEVMAN* udevman);
|
||||
typedef struct
|
||||
{
|
||||
IWTSPlugin* plugin;
|
||||
PREGISTERURBDRCSERVICE pRegisterUDEVMAN;
|
||||
WINPR_ATTR_NODISCARD PREGISTERURBDRCSERVICE pRegisterUDEVMAN;
|
||||
const ADDIN_ARGV* args;
|
||||
} FREERDP_URBDRC_SERVICE_ENTRY_POINTS;
|
||||
typedef FREERDP_URBDRC_SERVICE_ENTRY_POINTS* PFREERDP_URBDRC_SERVICE_ENTRY_POINTS;
|
||||
@@ -97,64 +97,67 @@ typedef void (*t_isoch_transfer_cb)(IUDEVICE* idev, GENERIC_CHANNEL_CALLBACK* ca
|
||||
struct S_IUDEVICE
|
||||
{
|
||||
/* Transfer */
|
||||
int (*isoch_transfer)(IUDEVICE* idev, GENERIC_CHANNEL_CALLBACK* callback, UINT32 MessageId,
|
||||
UINT32 RequestId, UINT32 EndpointAddress, UINT32 TransferFlags,
|
||||
UINT32 StartFrame, UINT32 ErrorCount, BOOL NoAck,
|
||||
const BYTE* packetDescriptorData, UINT32 NumberOfPackets,
|
||||
UINT32 BufferSize, const BYTE* Buffer, t_isoch_transfer_cb cb,
|
||||
UINT32 Timeout);
|
||||
WINPR_ATTR_NODISCARD int (*isoch_transfer)(
|
||||
IUDEVICE* idev, GENERIC_CHANNEL_CALLBACK* callback, UINT32 MessageId, UINT32 RequestId,
|
||||
UINT32 EndpointAddress, UINT32 TransferFlags, UINT32 StartFrame, UINT32 ErrorCount,
|
||||
BOOL NoAck, const BYTE* packetDescriptorData, UINT32 NumberOfPackets, UINT32 BufferSize,
|
||||
const BYTE* Buffer, t_isoch_transfer_cb cb, UINT32 Timeout);
|
||||
|
||||
BOOL(*control_transfer)
|
||||
(IUDEVICE* idev, UINT32 RequestId, UINT32 EndpointAddress, UINT32 TransferFlags,
|
||||
BYTE bmRequestType, BYTE Request, UINT16 Value, UINT16 Index, UINT32* UrbdStatus,
|
||||
UINT32* BufferSize, BYTE* Buffer, UINT32 Timeout);
|
||||
WINPR_ATTR_NODISCARD BOOL (*control_transfer)(IUDEVICE* idev, UINT32 RequestId,
|
||||
UINT32 EndpointAddress, UINT32 TransferFlags,
|
||||
BYTE bmRequestType, BYTE Request, UINT16 Value,
|
||||
UINT16 Index, UINT32* UrbdStatus,
|
||||
UINT32* BufferSize, BYTE* Buffer, UINT32 Timeout);
|
||||
|
||||
int (*bulk_or_interrupt_transfer)(IUDEVICE* idev, GENERIC_CHANNEL_CALLBACK* callback,
|
||||
UINT32 MessageId, UINT32 RequestId, UINT32 EndpointAddress,
|
||||
UINT32 TransferFlags, BOOL NoAck, UINT32 BufferSize,
|
||||
const BYTE* data, t_isoch_transfer_cb cb, UINT32 Timeout);
|
||||
WINPR_ATTR_NODISCARD int (*bulk_or_interrupt_transfer)(
|
||||
IUDEVICE* idev, GENERIC_CHANNEL_CALLBACK* callback, UINT32 MessageId, UINT32 RequestId,
|
||||
UINT32 EndpointAddress, UINT32 TransferFlags, BOOL NoAck, UINT32 BufferSize,
|
||||
const BYTE* data, t_isoch_transfer_cb cb, UINT32 Timeout);
|
||||
|
||||
int (*select_configuration)(IUDEVICE* idev, UINT32 bConfigurationValue);
|
||||
WINPR_ATTR_NODISCARD int (*select_configuration)(IUDEVICE* idev, UINT32 bConfigurationValue);
|
||||
|
||||
int (*select_interface)(IUDEVICE* idev, BYTE InterfaceNumber, BYTE AlternateSetting);
|
||||
WINPR_ATTR_NODISCARD int (*select_interface)(IUDEVICE* idev, BYTE InterfaceNumber,
|
||||
BYTE AlternateSetting);
|
||||
|
||||
int (*control_pipe_request)(IUDEVICE* idev, UINT32 RequestId, UINT32 EndpointAddress,
|
||||
UINT32* UsbdStatus, int command);
|
||||
WINPR_ATTR_NODISCARD int (*control_pipe_request)(IUDEVICE* idev, UINT32 RequestId,
|
||||
UINT32 EndpointAddress, UINT32* UsbdStatus,
|
||||
int command);
|
||||
|
||||
UINT32(*control_query_device_text)
|
||||
(IUDEVICE* idev, UINT32 TextType, UINT16 LocaleId, UINT8* BufferSize, BYTE* Buffer);
|
||||
WINPR_ATTR_NODISCARD UINT32 (*control_query_device_text)(IUDEVICE* idev, UINT32 TextType,
|
||||
UINT16 LocaleId, UINT8* BufferSize,
|
||||
BYTE* Buffer);
|
||||
|
||||
int (*os_feature_descriptor_request)(IUDEVICE* idev, UINT32 RequestId, BYTE Recipient,
|
||||
BYTE InterfaceNumber, BYTE Ms_PageIndex,
|
||||
UINT16 Ms_featureDescIndex, UINT32* UsbdStatus,
|
||||
UINT32* BufferSize, BYTE* Buffer, UINT32 Timeout);
|
||||
WINPR_ATTR_NODISCARD int (*os_feature_descriptor_request)(
|
||||
IUDEVICE* idev, UINT32 RequestId, BYTE Recipient, BYTE InterfaceNumber, BYTE Ms_PageIndex,
|
||||
UINT16 Ms_featureDescIndex, UINT32* UsbdStatus, UINT32* BufferSize, BYTE* Buffer,
|
||||
UINT32 Timeout);
|
||||
|
||||
void (*cancel_all_transfer_request)(IUDEVICE* idev);
|
||||
|
||||
int (*cancel_transfer_request)(IUDEVICE* idev, UINT32 RequestId);
|
||||
WINPR_ATTR_NODISCARD int (*cancel_transfer_request)(IUDEVICE* idev, UINT32 RequestId);
|
||||
|
||||
int (*query_device_descriptor)(IUDEVICE* idev, int offset);
|
||||
WINPR_ATTR_NODISCARD int (*query_device_descriptor)(IUDEVICE* idev, int offset);
|
||||
|
||||
BOOL (*detach_kernel_driver)(IUDEVICE* idev);
|
||||
WINPR_ATTR_NODISCARD BOOL (*detach_kernel_driver)(IUDEVICE* idev);
|
||||
|
||||
BOOL (*attach_kernel_driver)(IUDEVICE* idev);
|
||||
WINPR_ATTR_NODISCARD BOOL (*attach_kernel_driver)(IUDEVICE* idev);
|
||||
|
||||
int (*query_device_port_status)(IUDEVICE* idev, UINT32* UsbdStatus, UINT32* BufferSize,
|
||||
BYTE* Buffer);
|
||||
WINPR_ATTR_NODISCARD int (*query_device_port_status)(IUDEVICE* idev, UINT32* UsbdStatus,
|
||||
UINT32* BufferSize, BYTE* Buffer);
|
||||
|
||||
MSUSB_CONFIG_DESCRIPTOR* (*complete_msconfig_setup)(IUDEVICE* idev,
|
||||
MSUSB_CONFIG_DESCRIPTOR* MsConfig);
|
||||
WINPR_ATTR_NODISCARD MSUSB_CONFIG_DESCRIPTOR* (*complete_msconfig_setup)(
|
||||
IUDEVICE* idev, MSUSB_CONFIG_DESCRIPTOR* MsConfig);
|
||||
/* Basic state */
|
||||
int (*isCompositeDevice)(IUDEVICE* idev);
|
||||
WINPR_ATTR_NODISCARD int (*isCompositeDevice)(IUDEVICE* idev);
|
||||
|
||||
int (*isExist)(IUDEVICE* idev);
|
||||
int (*isAlreadySend)(IUDEVICE* idev);
|
||||
int (*isChannelClosed)(IUDEVICE* idev);
|
||||
WINPR_ATTR_NODISCARD int (*isExist)(IUDEVICE* idev);
|
||||
WINPR_ATTR_NODISCARD int (*isAlreadySend)(IUDEVICE* idev);
|
||||
WINPR_ATTR_NODISCARD int (*isChannelClosed)(IUDEVICE* idev);
|
||||
|
||||
void (*setAlreadySend)(IUDEVICE* idev);
|
||||
void (*setChannelClosed)(IUDEVICE* idev);
|
||||
void (*markChannelClosed)(IUDEVICE* idev);
|
||||
char* (*getPath)(IUDEVICE* idev);
|
||||
WINPR_ATTR_NODISCARD char* (*getPath)(IUDEVICE* idev);
|
||||
|
||||
void (*free)(IUDEVICE* idev);
|
||||
|
||||
@@ -179,16 +182,18 @@ struct S_IUDEVMAN
|
||||
|
||||
/* Manage devices */
|
||||
void (*rewind)(IUDEVMAN* idevman);
|
||||
BOOL (*has_next)(IUDEVMAN* idevman);
|
||||
BOOL (*unregister_udevice)(IUDEVMAN* idevman, BYTE bus_number, BYTE dev_number);
|
||||
size_t (*register_udevice)(IUDEVMAN* idevman, BYTE bus_number, BYTE dev_number, UINT16 idVendor,
|
||||
UINT16 idProduct, UINT32 flag);
|
||||
IUDEVICE* (*get_next)(IUDEVMAN* idevman);
|
||||
IUDEVICE* (*get_udevice_by_UsbDevice)(IUDEVMAN* idevman, UINT32 UsbDevice);
|
||||
IUDEVICE* (*get_udevice_by_ChannelID)(IUDEVMAN* idevman, UINT32 channelID);
|
||||
WINPR_ATTR_NODISCARD BOOL (*has_next)(IUDEVMAN* idevman);
|
||||
WINPR_ATTR_NODISCARD BOOL (*unregister_udevice)(IUDEVMAN* idevman, BYTE bus_number,
|
||||
BYTE dev_number);
|
||||
WINPR_ATTR_NODISCARD size_t (*register_udevice)(IUDEVMAN* idevman, BYTE bus_number,
|
||||
BYTE dev_number, UINT16 idVendor,
|
||||
UINT16 idProduct, UINT32 flag);
|
||||
WINPR_ATTR_NODISCARD IUDEVICE* (*get_next)(IUDEVMAN* idevman);
|
||||
WINPR_ATTR_NODISCARD IUDEVICE* (*get_udevice_by_UsbDevice)(IUDEVMAN* idevman, UINT32 UsbDevice);
|
||||
WINPR_ATTR_NODISCARD IUDEVICE* (*get_udevice_by_ChannelID)(IUDEVMAN* idevman, UINT32 channelID);
|
||||
|
||||
/* Extension */
|
||||
int (*isAutoAdd)(IUDEVMAN* idevman);
|
||||
WINPR_ATTR_NODISCARD int (*isAutoAdd)(IUDEVMAN* idevman);
|
||||
|
||||
/* Basic state */
|
||||
BASIC_DEVMAN_STATE_DEFINED(device_num, UINT32);
|
||||
@@ -197,8 +202,8 @@ struct S_IUDEVMAN
|
||||
/* control semaphore or mutex lock */
|
||||
void (*loading_lock)(IUDEVMAN* idevman);
|
||||
void (*loading_unlock)(IUDEVMAN* idevman);
|
||||
BOOL (*initialize)(IUDEVMAN* idevman, UINT32 channelId);
|
||||
UINT (*listener_created_callback)(IUDEVMAN* idevman);
|
||||
WINPR_ATTR_NODISCARD BOOL (*initialize)(IUDEVMAN* idevman, UINT32 channelId);
|
||||
WINPR_ATTR_NODISCARD UINT (*listener_created_callback)(IUDEVMAN* idevman);
|
||||
|
||||
IWTSPlugin* plugin;
|
||||
UINT32 controlChannelId;
|
||||
|
||||
Reference in New Issue
Block a user