Initial community commit
This commit is contained in:
parent
537bcbc862
commit
fc06254474
16440 changed files with 4239995 additions and 2 deletions
65
Src/Plugins/Library/ml_pmp/DeviceCommands.h
Normal file
65
Src/Plugins/Library/ml_pmp/DeviceCommands.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
#pragma once
|
||||
#include "../nu/refcount.h"
|
||||
#include "../devices/ifc_devicecommand.h"
|
||||
#include "../devices/ifc_devicesupportedcommand.h"
|
||||
#include "../devices/ifc_devicesupportedcommandenum.h"
|
||||
class PortableCommand : public ifc_devicecommand
|
||||
{
|
||||
public:
|
||||
PortableCommand(const char *name, int title, int description);
|
||||
const char *name;
|
||||
int title;
|
||||
int description;
|
||||
|
||||
const char *GetName();
|
||||
HRESULT GetIcon(wchar_t *buffer, size_t bufferSize, int width, int height);
|
||||
|
||||
HRESULT GetDisplayName(wchar_t *buffer, size_t bufferSize);
|
||||
|
||||
HRESULT GetDescription(wchar_t *buffer, size_t bufferSize);
|
||||
RECVS_DISPATCH;
|
||||
};
|
||||
|
||||
typedef struct DeviceCommandInfo
|
||||
{
|
||||
const char *name;
|
||||
DeviceCommandFlags flags;
|
||||
} DeviceCommandInfo;
|
||||
|
||||
BOOL SetDeviceCommandInfo(DeviceCommandInfo *info, const char *name, DeviceCommandFlags flags);
|
||||
|
||||
class DeviceCommand : public Countable<ifc_devicesupportedcommand>
|
||||
{
|
||||
public:
|
||||
DeviceCommand(const char *name, DeviceCommandFlags flags);
|
||||
DeviceCommand(const DeviceCommandInfo *commandInfo);
|
||||
|
||||
public:
|
||||
const char *GetName();
|
||||
HRESULT GetFlags(DeviceCommandFlags *flags);
|
||||
REFERENCE_COUNT_IMPLEMENTATION;
|
||||
|
||||
public:
|
||||
const char *name;
|
||||
DeviceCommandFlags flags;
|
||||
RECVS_DISPATCH;
|
||||
};
|
||||
|
||||
class DeviceCommandEnumerator : public Countable<ifc_devicesupportedcommandenum>
|
||||
{
|
||||
public:
|
||||
DeviceCommandEnumerator(const DeviceCommandInfo *commandInfoList, size_t listSize);
|
||||
~DeviceCommandEnumerator();
|
||||
|
||||
HRESULT Next(ifc_devicesupportedcommand **buffer, size_t bufferMax, size_t *count);
|
||||
HRESULT Reset(void);
|
||||
HRESULT Skip(size_t count);
|
||||
HRESULT GetCount(size_t *count);
|
||||
REFERENCE_COUNT_IMPLEMENTATION;
|
||||
|
||||
private:
|
||||
size_t position;
|
||||
DeviceCommand **commands;
|
||||
size_t count;
|
||||
RECVS_DISPATCH;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue