261 lines
8.2 KiB
C++
261 lines
8.2 KiB
C++
/*
|
|
File automatically generated by SOAdvancedDissector.py
|
|
More information at http://indefero.soutade.fr/p/soadvanceddissector
|
|
*/
|
|
|
|
#ifndef _DPDEV_H
|
|
#define _DPDEV_H
|
|
|
|
#include <dpext.h>
|
|
#include <dp.h>
|
|
|
|
namespace dpio {
|
|
class Partition;
|
|
class FilesystemPartition;
|
|
};
|
|
|
|
namespace dpdev {
|
|
|
|
class Device;
|
|
class DeviceListener;
|
|
class DeviceManager;
|
|
class DeviceProvider;
|
|
class GenericDevice;
|
|
class GenericDeviceProvider;
|
|
class LoadableDevice;
|
|
class LoadableDeviceProvider;
|
|
class LoadableDeviceProviderHolder;
|
|
class UNIXDevice;
|
|
class UNIXDeviceProvider;
|
|
|
|
|
|
class Device: public dp::Unknown
|
|
{
|
|
public:
|
|
virtual ~Device();
|
|
virtual void* getInterfaceID();
|
|
virtual void prepareDeviceKey() = 0;
|
|
virtual dpdev::DeviceProvider* getProvider() = 0;
|
|
virtual int getIndex() = 0;
|
|
virtual dp::String getDeviceName() = 0;
|
|
virtual dp::String getDeviceType() = 0;
|
|
virtual dp::Data getFingerprint() = 0;
|
|
virtual dp::Data getDeviceKey() = 0;
|
|
virtual dp::Data getActivationRecord() = 0;
|
|
virtual void setActivationRecord(dp::Data const&) = 0;
|
|
virtual dpio::Partition* getPartition(int) = 0;
|
|
virtual dp::String getVersionInfo(dp::String const&) = 0;
|
|
virtual bool isTrusted() = 0;
|
|
|
|
};
|
|
|
|
class DeviceListener: public dp::Unknown
|
|
{
|
|
public:
|
|
virtual ~DeviceListener();
|
|
virtual void* getInterfaceID();
|
|
virtual void reportError(int, int, dp::String const&) = 0;
|
|
virtual void deviceKeyReady(int, int) = 0;
|
|
virtual void deviceAdded(int, int, dpdev::Device*) = 0;
|
|
virtual void deviceRemoved(int, int, dpdev::Device*) = 0;
|
|
virtual void partitionAdded(int, int, int, dpio::Partition*) = 0;
|
|
virtual void partitionRemoved(int, int, int, dpio::Partition*) = 0;
|
|
|
|
};
|
|
|
|
class DeviceManager: public dpdev::DeviceListener
|
|
{
|
|
public:
|
|
DeviceManager();
|
|
|
|
virtual ~DeviceManager();
|
|
virtual void* getInterfaceID();
|
|
virtual void reportError(int, int, dp::String const&);
|
|
virtual void deviceKeyReady(int, int);
|
|
virtual void deviceAdded(int, int, dpdev::Device*);
|
|
virtual void deviceRemoved(int, int, dpdev::Device*);
|
|
virtual void partitionAdded(int, int, int, dpio::Partition*);
|
|
virtual void partitionRemoved(int, int, int, dpio::Partition*);
|
|
|
|
void addListener(dpdev::DeviceListener*);
|
|
void addProvider(dpdev::DeviceProvider*);
|
|
void getDeviceManager();
|
|
void getProvider(int);
|
|
void mountRemovablePartition(dp::String const&, dp::String const&, dp::String const&);
|
|
void removeListener(dpdev::DeviceListener*);
|
|
void unmountRemovablePartition(dp::String const&);
|
|
|
|
};
|
|
|
|
class DeviceProvider: public dp::Unknown
|
|
{
|
|
public:
|
|
virtual ~DeviceProvider();
|
|
virtual void* getInterfaceID();
|
|
virtual void getIdentifier() = 0;
|
|
virtual int getIndex() = 0;
|
|
virtual dpdev::Device* getDevice(int) = 0;
|
|
virtual bool mount(dp::String const&, dp::String const&, dp::String const&) = 0;
|
|
virtual bool unmount(dp::String const&) = 0;
|
|
|
|
static void addListener(dpdev::DeviceListener*);
|
|
static void addProvider(dpdev::DeviceProvider*);
|
|
static dpdev::DeviceListener* getMasterListener();
|
|
static dpdev::DeviceProvider* getProvider(int);
|
|
void mountRemovablePartition(dp::String const&, dp::String const&, dp::String const&);
|
|
void unmountRemovablePartition(dp::String const&);
|
|
|
|
};
|
|
|
|
// class GenericDevice: public dpdev::Device
|
|
// {
|
|
// public:
|
|
// GenericDevice(int, dp::String const&, dp::String const&, dp::String const&);
|
|
|
|
// virtual ~GenericDevice();
|
|
// virtual void* getInterfaceID();
|
|
// virtual void getOptionalInterface(char const*);
|
|
// virtual void prepareDeviceKey();
|
|
// virtual void getProvider();
|
|
// virtual void getIndex();
|
|
// virtual void getDeviceName();
|
|
// virtual void getDeviceType();
|
|
// virtual void getFingerprint();
|
|
// virtual void getDeviceKey();
|
|
// virtual void getActivationRecord();
|
|
// virtual void setActivationRecord(dp::Data const&);
|
|
// virtual void getPartition(int);
|
|
// virtual void getVersionInfo(dp::String const&);
|
|
// virtual void isTrusted();
|
|
|
|
// void isValid();
|
|
|
|
// };
|
|
|
|
class GenericDeviceProvider: public dpdev::DeviceProvider
|
|
{
|
|
public:
|
|
GenericDeviceProvider();
|
|
|
|
virtual ~GenericDeviceProvider();
|
|
virtual void* getInterfaceID();
|
|
virtual void getIdentifier();
|
|
virtual int getIndex();
|
|
virtual dpdev::Device* getDevice(int);
|
|
virtual bool mount(dp::String const&, dp::String const&, dp::String const&);
|
|
virtual bool unmount(dp::String const&);
|
|
|
|
void getGenericDeviceProvider();
|
|
|
|
};
|
|
|
|
// class LoadableDevice: public dpdev::Device
|
|
// {
|
|
// public:
|
|
// LoadableDevice(dpdev::LoadableDeviceProvider*, dpext::LoadableDeviceInfo*, int);
|
|
|
|
// virtual ~LoadableDevice();
|
|
// virtual void* getInterfaceID();
|
|
// virtual void getOptionalInterface(char const*);
|
|
// virtual void prepareDeviceKey();
|
|
// virtual void getProvider();
|
|
// virtual void getIndex();
|
|
// virtual void getDeviceName();
|
|
// virtual void getDeviceType();
|
|
// virtual void getFingerprint();
|
|
// virtual void getDeviceKey();
|
|
// virtual void getActivationRecord();
|
|
// virtual void setActivationRecord(dp::Data const&);
|
|
// virtual void getPartition(int);
|
|
// virtual void getVersionInfo(dp::String const&);
|
|
// virtual void isTrusted();
|
|
|
|
// void updatePartitions();
|
|
|
|
// };
|
|
|
|
// class LoadableDeviceProvider: public dpdev::DeviceProvider, public dpext::LoadableDeviceIteratorListener
|
|
// {
|
|
// public:
|
|
// LoadableDeviceProvider(dp::String const&, dp::String const&);
|
|
|
|
// virtual ~LoadableDeviceProvider();
|
|
// virtual void* getInterfaceID();
|
|
// virtual void getIdentifier();
|
|
// virtual void getIndex();
|
|
// virtual void getDevice(int);
|
|
// virtual void mount(dp::String const&, dp::String const&, dp::String const&);
|
|
// virtual void unmount(dp::String const&);
|
|
// virtual void deviceListChanged();
|
|
|
|
// void isMounted(dp::String const&);
|
|
// void registerLoadableDevices();
|
|
|
|
// };
|
|
|
|
// class LoadableDeviceProviderHolder
|
|
// {
|
|
// public:
|
|
// ~LoadableDeviceProviderHolder();
|
|
|
|
// void addLoadableDeviceProvider(dpdev::LoadableDeviceProvider*);
|
|
|
|
// };
|
|
|
|
class UNIXDevice: public dpdev::Device
|
|
{
|
|
public:
|
|
UNIXDevice();
|
|
|
|
virtual ~UNIXDevice();
|
|
//virtual void* getInterfaceID();
|
|
virtual void* getOptionalInterface(char const*);
|
|
virtual void prepareDeviceKey();
|
|
virtual dpdev::DeviceProvider* getProvider();
|
|
virtual int getIndex();
|
|
virtual dp::String getDeviceName();
|
|
virtual dp::String getDeviceType();
|
|
virtual dp::Data getFingerprint();
|
|
virtual dp::Data getDeviceKey();
|
|
virtual dp::Data getActivationRecord();
|
|
virtual void setActivationRecord(dp::Data const&);
|
|
virtual dpio::Partition* getPartition(int);
|
|
virtual dp::String getVersionInfo(dp::String const&);
|
|
virtual bool isTrusted();
|
|
|
|
void addRemovablePartition(dp::String const&, dp::String const&, dp::String const&);
|
|
void removeRemovablePartition(dp::String const&);
|
|
void writeDeviceFile(char const*);
|
|
|
|
dpio::FilesystemPartition* partition;
|
|
unsigned int m1, m2;
|
|
void *m3, *m4, *m5, *m6;
|
|
void *m7, *m8, *m9, *m10;
|
|
void *m11;
|
|
|
|
};
|
|
|
|
class UNIXDeviceProvider: public dpdev::DeviceProvider
|
|
{
|
|
public:
|
|
UNIXDeviceProvider();
|
|
|
|
virtual ~UNIXDeviceProvider();
|
|
virtual void* getInterfaceID();
|
|
virtual void getIdentifier();
|
|
virtual int getIndex();
|
|
virtual dpdev::Device* getDevice(int);
|
|
virtual bool mount(dp::String const&, dp::String const&, dp::String const&);
|
|
virtual bool unmount(dp::String const&);
|
|
|
|
};
|
|
|
|
|
|
void isMobileOS();
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // _DPDEV_H
|