summaryrefslogtreecommitdiff
path: root/wpd/WpdServiceSampleDriver/WpdBaseDriver.h
blob: 3e731f52564d30f99d88c343f549afd1ea37a9eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once

class WpdBaseDriver :
    public IUnknown
{
public:
    WpdBaseDriver();
    virtual ~WpdBaseDriver();

    HRESULT Initialize();
    VOID    Uninitialize();

    HRESULT DispatchWpdMessage(_In_     IPortableDeviceValues* pParams,
                               _In_     IPortableDeviceValues* pResults);

private:
    HRESULT OnGetObjectIDsFromPersistentUniqueIDs(_In_  IPortableDeviceValues* pParams,
                                                  _In_  IPortableDeviceValues* pResults);


    HRESULT OnSaveClientInfo(_In_   IPortableDeviceValues* pParams,
                             _In_   IPortableDeviceValues* pResults);

public: // IUnknown
    ULONG __stdcall AddRef();

    _At_(this, __drv_freesMem(Mem)) 
    ULONG __stdcall Release();

    HRESULT __stdcall QueryInterface(REFIID riid, void** ppv);

public:
    WpdObjectEnumerator     m_ObjectEnum;
    WpdObjectManagement     m_ObjectManagement;
    WpdObjectProperties     m_ObjectProperties;
    WpdObjectResources      m_ObjectResources;
    WpdObjectPropertiesBulk m_ObjectPropertiesBulk;
    WpdCapabilities         m_Capabilities;
    WpdService              m_Service;

private:
    FakeDevice              m_Device;
    ULONG                   m_cRef;
};