412 lines
10 KiB
C++
412 lines
10 KiB
C++
/*
|
|
File automatically generated by SOAdvancedDissector.py
|
|
More information at http://indefero.soutade.fr/p/soadvanceddissector
|
|
*/
|
|
|
|
#ifndef _DP_H
|
|
#define _DP_H
|
|
|
|
#include <uft.h>
|
|
|
|
namespace dptimer {
|
|
class Timer;
|
|
}
|
|
|
|
namespace dp {
|
|
|
|
class BindingManager;
|
|
class BindingManagerImpl;
|
|
class UFTDataManager;
|
|
class BufferDataManager;
|
|
class Unknown;
|
|
class Callback;
|
|
class DPBufferManager;
|
|
class Data;
|
|
class DataManager;
|
|
class DataRec;
|
|
class StringList;
|
|
class ErrorList;
|
|
class RefCounted;
|
|
class RawPointerVector;
|
|
class Releasable;
|
|
class String;
|
|
class StringDataManager;
|
|
class StringListImpl;
|
|
class TransientData;
|
|
class TransientDataManager;
|
|
class UTF16String;
|
|
class UTF16StringDataManager;
|
|
class VersionInfo;
|
|
|
|
|
|
class Unknown
|
|
{
|
|
public:
|
|
Unknown();
|
|
|
|
virtual ~Unknown();
|
|
virtual void* getInterfaceID();
|
|
virtual void* getOptionalInterface(char const*);
|
|
|
|
};
|
|
|
|
class BindingManager
|
|
{
|
|
public:
|
|
virtual ~BindingManager();
|
|
virtual void invalidateScriptWrapperFor(dp::Unknown*) = 0;
|
|
virtual void addRefNativeWrapper(dp::Unknown*) = 0;
|
|
virtual void releaseNativeWrapper(dp::Unknown*) = 0;
|
|
virtual void isPrivileged() = 0;
|
|
|
|
void getBindingManager();
|
|
void setBindingManager(dp::BindingManager*);
|
|
|
|
};
|
|
|
|
class BindingManagerImpl: public dp::BindingManager
|
|
{
|
|
public:
|
|
virtual ~BindingManagerImpl();
|
|
virtual void invalidateScriptWrapperFor(dp::Unknown*);
|
|
virtual void addRefNativeWrapper(dp::Unknown*);
|
|
virtual void releaseNativeWrapper(dp::Unknown*);
|
|
virtual void isPrivileged();
|
|
|
|
};
|
|
|
|
class DataManager
|
|
{
|
|
public:
|
|
virtual ~DataManager();
|
|
virtual void getTypeId() = 0;
|
|
virtual void dataPtr(void*, unsigned int*) = 0;
|
|
virtual void clone(dp::DataRec const*, dp::DataRec*) = 0;
|
|
virtual void release(void*) = 0;
|
|
|
|
};
|
|
|
|
class UFTDataManager: public dp::DataManager
|
|
{
|
|
public:
|
|
virtual ~UFTDataManager();
|
|
virtual void getTypeId() = 0;
|
|
virtual void dataPtr(void*, unsigned int*) = 0;
|
|
virtual void clone(dp::DataRec const*, dp::DataRec*);
|
|
virtual void release(void*);
|
|
|
|
};
|
|
|
|
class BufferDataManager: public dp::UFTDataManager
|
|
{
|
|
public:
|
|
virtual ~BufferDataManager();
|
|
virtual void getTypeId();
|
|
virtual void dataPtr(void*, unsigned int*);
|
|
virtual void clone(dp::DataRec const*, dp::DataRec*);
|
|
virtual void release(void*);
|
|
|
|
void typeId();
|
|
|
|
};
|
|
|
|
class RefCounted: public dp::Unknown
|
|
{
|
|
public:
|
|
RefCounted();
|
|
|
|
virtual ~RefCounted();
|
|
virtual void* getInterfaceID();
|
|
virtual void* getOptionalInterface(char const*);
|
|
virtual void addRef() = 0;
|
|
virtual void release() = 0;
|
|
|
|
};
|
|
|
|
class Callback: public dp::Unknown
|
|
{
|
|
public:
|
|
Callback();
|
|
|
|
virtual ~Callback();
|
|
virtual void* getInterfaceID();
|
|
virtual void* getOptionalInterface(char const*);
|
|
virtual void reportProgress(double);
|
|
virtual void reportError(dp::String const&) = 0;
|
|
virtual void invoke(dp::Unknown*) = 0;
|
|
|
|
};
|
|
|
|
class DPBufferManager: public uft::BufferManager
|
|
{
|
|
public:
|
|
DPBufferManager(dp::Data const&);
|
|
|
|
virtual ~DPBufferManager();
|
|
virtual void alloc(uft::BufferRec*, unsigned int, unsigned int);
|
|
virtual void realloc(uft::BufferRec*, unsigned int);
|
|
virtual void clone(uft::BufferRec const*, uft::BufferRec*, unsigned int);
|
|
virtual void pin(uft::BufferRec*);
|
|
virtual void unpin(uft::BufferRec*);
|
|
virtual void free(uft::BufferRec*);
|
|
virtual void toString(uft::BufferRec const*);
|
|
|
|
};
|
|
|
|
class Data
|
|
{
|
|
public:
|
|
Data() {data0=0; data1=0;}
|
|
Data(dp::Data const&);
|
|
Data(uft::Buffer const&);
|
|
Data(unsigned char const*, unsigned int);
|
|
|
|
~Data();
|
|
|
|
unsigned char* data(unsigned int *size=0) const;
|
|
bool isNull() const;
|
|
unsigned int length() const;
|
|
operator uft::Buffer() const;
|
|
Data& operator=(dp::Data const&);
|
|
|
|
protected:
|
|
void* data0;
|
|
void* data1;
|
|
};
|
|
|
|
class DataRec
|
|
{
|
|
public:
|
|
DataRec();
|
|
|
|
};
|
|
|
|
class StringList: public dp::RefCounted
|
|
{
|
|
public:
|
|
virtual ~StringList();
|
|
virtual void* getInterfaceID();
|
|
virtual void* getOptionalInterface(char const*);
|
|
virtual void addRef() = 0;
|
|
virtual void release() = 0;
|
|
virtual void length() = 0;
|
|
virtual void item(unsigned int) = 0;
|
|
|
|
void makeStringListFromVector(uft::Vector const&);
|
|
|
|
};
|
|
|
|
class ErrorList: public dp::StringList
|
|
{
|
|
public:
|
|
virtual ~ErrorList();
|
|
virtual void* getInterfaceID();
|
|
virtual void* getOptionalInterface(char const*);
|
|
virtual void addRef() = 0;
|
|
virtual void release() = 0;
|
|
virtual void length() = 0;
|
|
virtual void item(unsigned int) = 0;
|
|
virtual void hasFatalErrors() = 0;
|
|
virtual void hasErrors() = 0;
|
|
virtual void hasWarnings() = 0;
|
|
virtual void clear() = 0;
|
|
|
|
};
|
|
|
|
class RawPointerVector
|
|
{
|
|
public:
|
|
~RawPointerVector();
|
|
|
|
void insert(unsigned int, void*);
|
|
void remove(unsigned int);
|
|
void remove(void*);
|
|
|
|
};
|
|
|
|
class Releasable: public dp::Unknown
|
|
{
|
|
public:
|
|
Releasable();
|
|
|
|
virtual ~Releasable();
|
|
virtual void* getInterfaceID();
|
|
//virtual void* getOptionalInterface(char const*);
|
|
virtual void release() = 0;
|
|
|
|
};
|
|
|
|
class String: public Data
|
|
{
|
|
public:
|
|
String();
|
|
String(char const*);
|
|
String(char const*, unsigned int);
|
|
String(uft::String const&);
|
|
String(unsigned short const*);
|
|
String(unsigned short const*, unsigned int);
|
|
String(const String& s) : Data(s) {}
|
|
|
|
~String();
|
|
|
|
void base64Decode(dp::String const&);
|
|
void base64Encode(dp::Data const&);
|
|
operator uft::String() const {return this->uft();};
|
|
String& operator=(dp::String const&);
|
|
void stringToTime(dp::String const&);
|
|
void timeToString(unsigned long long);
|
|
uft::String uft() const;
|
|
void urlDecode(dp::String const&);
|
|
void urlEncode(dp::String const&);
|
|
char* utf8() const;
|
|
};
|
|
|
|
class StringDataManager: public dp::UFTDataManager
|
|
{
|
|
public:
|
|
virtual ~StringDataManager();
|
|
virtual void getTypeId();
|
|
virtual void dataPtr(void*, unsigned int*);
|
|
virtual void clone(dp::DataRec const*, dp::DataRec*);
|
|
virtual void release(void*);
|
|
|
|
void typeId();
|
|
|
|
};
|
|
|
|
class StringListImpl: public dp::StringList
|
|
{
|
|
public:
|
|
StringListImpl(uft::Vector const&);
|
|
|
|
virtual ~StringListImpl();
|
|
virtual void* getInterfaceID();
|
|
virtual void* getOptionalInterface(char const*);
|
|
virtual void addRef();
|
|
virtual void release();
|
|
virtual void length();
|
|
virtual void item(unsigned int);
|
|
|
|
};
|
|
|
|
class TransientData
|
|
{
|
|
public:
|
|
TransientData(unsigned char const*, unsigned int);
|
|
|
|
~TransientData();
|
|
|
|
};
|
|
|
|
class TransientDataManager: public dp::DataManager
|
|
{
|
|
public:
|
|
TransientDataManager();
|
|
|
|
virtual ~TransientDataManager();
|
|
virtual void getTypeId();
|
|
virtual void dataPtr(void*, unsigned int*);
|
|
virtual void clone(dp::DataRec const*, dp::DataRec*);
|
|
virtual void release(void*);
|
|
|
|
void typeId();
|
|
|
|
};
|
|
|
|
class UTF16String
|
|
{
|
|
public:
|
|
UTF16String(char const*);
|
|
UTF16String(dp::String const&);
|
|
UTF16String(uft::UTF16String const&);
|
|
UTF16String(unsigned short const*);
|
|
|
|
};
|
|
|
|
class UTF16StringDataManager: public dp::UFTDataManager
|
|
{
|
|
public:
|
|
virtual ~UTF16StringDataManager();
|
|
virtual void getTypeId();
|
|
virtual void dataPtr(void*, unsigned int*);
|
|
virtual void clone(dp::DataRec const*, dp::DataRec*);
|
|
virtual void release(void*);
|
|
|
|
void typeId();
|
|
|
|
};
|
|
|
|
class VersionInfo
|
|
{
|
|
public:
|
|
VersionInfo(char const*, char const*);
|
|
|
|
};
|
|
|
|
template<typename T>
|
|
class ref{
|
|
public:
|
|
operator bool() const;
|
|
T* operator->() const {return m;}
|
|
ref(T* m):m(m){}
|
|
ref(const ref<T>&);
|
|
void release();
|
|
T* m;
|
|
};
|
|
|
|
template<typename T>
|
|
class List: public dp::RefCounted
|
|
{
|
|
public:
|
|
virtual ~List();
|
|
virtual void* getInterfaceID();
|
|
virtual void* getOptionalInterface(char const*);
|
|
virtual void addRef() = 0;
|
|
virtual void release() = 0;
|
|
virtual int length() = 0;
|
|
virtual dp::ref<T> operator[](unsigned int) = 0;
|
|
|
|
List();
|
|
|
|
};
|
|
|
|
template<typename T>
|
|
class list {
|
|
public:
|
|
list(dp::List<T>* p) :m(p){}
|
|
int length() {return m->length();}
|
|
dp::ref<T> operator[](unsigned int idx) {return (*m)[idx];}
|
|
list<T> operator=(const list<T>& other);
|
|
list(const list<T>& other);
|
|
private:
|
|
dp::List<T>* m;
|
|
};
|
|
|
|
void broadcast(dp::String const&, dp::Data const&);
|
|
void coreInit();
|
|
void cryptRegisterOpenSSL();
|
|
int decodeBase64(char const* in, unsigned char* out, unsigned int outSize);
|
|
void decodeURLEncoding(char const*, unsigned char*, unsigned int);
|
|
void deviceMountRemovablePartitions();
|
|
void deviceRegisterExternal();
|
|
void deviceRegisterPrimary();
|
|
void documentRegisterEPUB();
|
|
void documentRegisterImages();
|
|
void documentRegisterOPS();
|
|
void documentRegisterPDF();
|
|
void encodeBase64(unsigned char const*, unsigned int, char*, unsigned int);
|
|
void getBroadcastFD();
|
|
dp::String getVersionInfo(dp::String const&);
|
|
int platformInit(unsigned int);
|
|
void processBroadcasts();
|
|
void registerForBroadcast(void (*)(dp::String const&, dp::Data const&));
|
|
void setVersionInfo(dp::String const&, dp::String const&);
|
|
void timerGetMasterClient();
|
|
void timerRegisterMasterTimer(dptimer::Timer*);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // _DP_H
|