Welcome to mirror list, hosted at ThFree Co, Russian Federation.

winIVRIOBuffer.c « vrclient_x64 - github.com/ValveSoftware/Proton.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6edce982135aa17b8676063245c79373e3aec5ed (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/* This file is auto-generated, do not edit. */
#include <stdarg.h>
#include <stdint.h>

#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"

#include "cxx.h"

#include "vrclient_defs.h"

#include "vrclient_private.h"

#include "struct_converters.h"

#include "flatapi.h"

WINE_DEFAULT_DEBUG_CHANNEL(vrclient);

#include "cppIVRIOBuffer_IVRIOBuffer_001.h"

typedef struct __winIVRIOBuffer_IVRIOBuffer_001 {
    vtable_ptr *vtable;
    void *linux_side;
} winIVRIOBuffer_IVRIOBuffer_001;

DEFINE_THISCALL_WRAPPER(winIVRIOBuffer_IVRIOBuffer_001_Open, 32)
EIOBufferError __thiscall winIVRIOBuffer_IVRIOBuffer_001_Open(winIVRIOBuffer_IVRIOBuffer_001 *_this, const char * pchPath, EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, IOBufferHandle_t * pulBuffer)
{
    TRACE("%p\n", _this);
    return cppIVRIOBuffer_IVRIOBuffer_001_Open(_this->linux_side, pchPath, mode, unElementSize, unElements, pulBuffer);
}

DEFINE_THISCALL_WRAPPER(winIVRIOBuffer_IVRIOBuffer_001_Close, 12)
EIOBufferError __thiscall winIVRIOBuffer_IVRIOBuffer_001_Close(winIVRIOBuffer_IVRIOBuffer_001 *_this, IOBufferHandle_t ulBuffer)
{
    TRACE("%p\n", _this);
    return cppIVRIOBuffer_IVRIOBuffer_001_Close(_this->linux_side, ulBuffer);
}

DEFINE_THISCALL_WRAPPER(winIVRIOBuffer_IVRIOBuffer_001_Read, 32)
EIOBufferError __thiscall winIVRIOBuffer_IVRIOBuffer_001_Read(winIVRIOBuffer_IVRIOBuffer_001 *_this, IOBufferHandle_t ulBuffer, void * pDst, uint32_t unBytes, uint32_t * punRead)
{
    TRACE("%p\n", _this);
    return cppIVRIOBuffer_IVRIOBuffer_001_Read(_this->linux_side, ulBuffer, pDst, unBytes, punRead);
}

DEFINE_THISCALL_WRAPPER(winIVRIOBuffer_IVRIOBuffer_001_Write, 24)
EIOBufferError __thiscall winIVRIOBuffer_IVRIOBuffer_001_Write(winIVRIOBuffer_IVRIOBuffer_001 *_this, IOBufferHandle_t ulBuffer, void * pSrc, uint32_t unBytes)
{
    TRACE("%p\n", _this);
    return cppIVRIOBuffer_IVRIOBuffer_001_Write(_this->linux_side, ulBuffer, pSrc, unBytes);
}

DEFINE_THISCALL_WRAPPER(winIVRIOBuffer_IVRIOBuffer_001_PropertyContainer, 12)
PropertyContainerHandle_t __thiscall winIVRIOBuffer_IVRIOBuffer_001_PropertyContainer(winIVRIOBuffer_IVRIOBuffer_001 *_this, IOBufferHandle_t ulBuffer)
{
    TRACE("%p\n", _this);
    return cppIVRIOBuffer_IVRIOBuffer_001_PropertyContainer(_this->linux_side, ulBuffer);
}

extern vtable_ptr winIVRIOBuffer_IVRIOBuffer_001_vtable;

#ifndef __GNUC__
void __asm_dummy_vtables(void) {
#endif
    __ASM_VTABLE(winIVRIOBuffer_IVRIOBuffer_001,
        VTABLE_ADD_FUNC(winIVRIOBuffer_IVRIOBuffer_001_Open)
        VTABLE_ADD_FUNC(winIVRIOBuffer_IVRIOBuffer_001_Close)
        VTABLE_ADD_FUNC(winIVRIOBuffer_IVRIOBuffer_001_Read)
        VTABLE_ADD_FUNC(winIVRIOBuffer_IVRIOBuffer_001_Write)
        VTABLE_ADD_FUNC(winIVRIOBuffer_IVRIOBuffer_001_PropertyContainer)
    );
#ifndef __GNUC__
}
#endif

winIVRIOBuffer_IVRIOBuffer_001 *create_winIVRIOBuffer_IVRIOBuffer_001(void *linux_side)
{
    winIVRIOBuffer_IVRIOBuffer_001 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRIOBuffer_IVRIOBuffer_001));
    TRACE("-> %p\n", r);
    r->vtable = &winIVRIOBuffer_IVRIOBuffer_001_vtable;
    r->linux_side = linux_side;
    return r;
}

void destroy_winIVRIOBuffer_IVRIOBuffer_001(void *object)
{
    TRACE("%p\n", object);
    HeapFree(GetProcessHeap(), 0, object);
}

winIVRIOBuffer_IVRIOBuffer_001 *create_winIVRIOBuffer_IVRIOBuffer_001_FnTable(void *linux_side)
{
    winIVRIOBuffer_IVRIOBuffer_001 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRIOBuffer_IVRIOBuffer_001));
    struct thunk *thunks = alloc_thunks(5);
    struct thunk **vtable = HeapAlloc(GetProcessHeap(), 0, 5 * sizeof(*vtable));
    int i;

    TRACE("-> %p, vtable %p, thunks %p\n", r, vtable, thunks);
    init_thunk(&thunks[0], r, winIVRIOBuffer_IVRIOBuffer_001_Open, 5);
    init_thunk(&thunks[1], r, winIVRIOBuffer_IVRIOBuffer_001_Close, 1);
    init_thunk(&thunks[2], r, winIVRIOBuffer_IVRIOBuffer_001_Read, 4);
    init_thunk(&thunks[3], r, winIVRIOBuffer_IVRIOBuffer_001_Write, 3);
    init_thunk(&thunks[4], r, winIVRIOBuffer_IVRIOBuffer_001_PropertyContainer, 1);
    for (i = 0; i < 5; i++)
        vtable[i] = &thunks[i];
    r->linux_side = linux_side;
    r->vtable = (void *)vtable;
    return r;
}

void destroy_winIVRIOBuffer_IVRIOBuffer_001_FnTable(void *object)
{
    winIVRIOBuffer_IVRIOBuffer_001 *win_object = object;
    TRACE("%p\n", win_object);
    VirtualFree(win_object->vtable[0], 0, MEM_RELEASE);
    HeapFree(GetProcessHeap(), 0, win_object->vtable);
    HeapFree(GetProcessHeap(), 0, win_object);
}