row_server.idl 8.12 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/*
 * Wine row server interface.
 *
 * Copyright (C) 2010 Huw Davies
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

21
#pragma makedep proxy
22
#pragma makedep register
23

24 25
import "oledb.idl";

26 27 28 29 30 31 32

[
    threading(both),
    uuid(06210e88-01f5-11d1-b512-0080c781c384)
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }

33 34 35 36 37 38 39 40 41 42
[
    object,
    uuid(38248178-cf6d-11de-abe5-000c2916d865),
    pointer_default(unique)
]
interface IWineRowServer : IUnknown
{
    [local] HRESULT SetInnerUnk([in] IUnknown *unknown);

    [local] HRESULT GetMarshal([out] IMarshal **marshal);
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63


    /* IRow */

typedef struct
{
    DBID columnid;
    DBLENGTH max_len;
    DBTYPE type;
    BYTE precision;
    BYTE scale;
} wine_getcolumns_in;

typedef struct
{
    VARIANT v;
    DBLENGTH data_len;
    DBSTATUS status;
} wine_getcolumns_out;

    HRESULT GetColumns([in] DBORDINAL num_cols,
64 65
                       [in, size_is((ULONG)num_cols)] wine_getcolumns_in *in_data,
                       [out, size_is((ULONG)num_cols)] wine_getcolumns_out *out_cols);
66 67 68 69 70 71 72 73 74 75 76 77

    HRESULT GetSourceRowset([in] REFIID riid,
                            [out, iid_is(riid)] IUnknown **ppRowset,
                            [out] HROW *phRow);

    HRESULT Open([in, unique] IUnknown *pUnkOuter,
                 [in] DBID *pColumnID,
                 [in] REFGUID rguidColumnType,
                 [in] DWORD dwBindFlags,
                 [in] REFIID riid,
                 [out, iid_is(riid)] IUnknown **ppUnk);

78 79 80 81 82 83 84 85 86 87 88 89 90 91
    /* IRowChange */
typedef struct
{
    VARIANT v;
    DBID columnid;
    DBLENGTH data_len;
    DBSTATUS status;
    DBLENGTH max_len;
    DBTYPE type;
    BYTE precision;
    BYTE scale;
} wine_setcolumns_in;

    HRESULT SetColumns([in] DBORDINAL num_cols,
92 93
                       [in, size_is((ULONG)num_cols)] wine_setcolumns_in *in_data,
                       [out, size_is((ULONG)num_cols)] DBSTATUS *status);
94 95 96

    /* IRowset */
    HRESULT AddRefRows([in] DBCOUNTITEM cRows,
97 98 99
                       [in, size_is((ULONG)cRows)] const HROW rghRows[],
                       [out, size_is((ULONG)cRows)] DBREFCOUNT rgRefCounts[],
                       [out, size_is((ULONG)cRows)] DBROWSTATUS rgRowStatus[]);
100 101 102 103 104 105 106 107 108 109

    HRESULT GetData([in] HROW hRow,
                    [in] HACCESSOR hAccessor,
                    [in, out, size_is(size)] BYTE *pData,
                    [in] DWORD size);

    HRESULT GetNextRows([in] HCHAPTER hReserved,
                        [in] DBROWOFFSET lRowsOffset,
                        [in] DBROWCOUNT cRows,
                        [out] DBCOUNTITEM *pcRowObtained,
110
                        [out, size_is(,(ULONG)cRows)] HROW **prghRows);
111 112

    HRESULT ReleaseRows([in] DBCOUNTITEM cRows,
113 114 115 116
                        [in, size_is((ULONG)cRows)] const HROW rghRows[],
                        [in, size_is((ULONG)cRows)] DBROWOPTIONS rgRowOptions[],
                        [out, size_is((ULONG)cRows)] DBREFCOUNT rgRefCounts[],
                        [out, size_is((ULONG)cRows)] DBROWSTATUS rgRowStatus[]);
117 118

    HRESULT RestartPosition([in] HCHAPTER hReserved);
119

120 121 122 123
    /* IRowsetLocate */

    HRESULT Compare([in] HCHAPTER hReserved,
                    [in] DBBKMARK cbBookmark1,
124
                    [in, size_is((ULONG)cbBookmark1)] const BYTE *pBookmark1,
125
                    [in] DBBKMARK cbBookmark2,
126
                    [in, size_is((ULONG)cbBookmark2)] const BYTE *pBookmark2,
127 128 129 130 131
                    [out] DBCOMPARE *pComparison);

    HRESULT GetRowsAt([in] HWATCHREGION hReserved1,
                      [in] HCHAPTER hReserved2,
                      [in] DBBKMARK cbBookmark,
132
                      [in, size_is((ULONG)cbBookmark)] const BYTE *pBookmark,
133 134 135
                      [in] DBROWOFFSET lRowsOffset,
                      [in] DBROWCOUNT cRows,
                      [out] DBCOUNTITEM *pcRowsObtained,
136
                      [out, size_is(,(ULONG)cRows)] HROW **prghRows);
137 138 139

    HRESULT GetRowsByBookmark([in] HCHAPTER hReserved,
                              [in] DBCOUNTITEM cRows,
140 141 142 143
                              [in, size_is((ULONG)cRows)] const DBBKMARK rgcbBookmarks[],
                              [in, size_is((ULONG)cRows)] const BYTE *rgpBookmarks[],
                              [out, size_is((ULONG)cRows)] HROW rghRows[],
                              [out, size_is((ULONG)cRows)] DBROWSTATUS rgRowStatus[]);
144 145 146

    HRESULT Hash([in] HCHAPTER hReserved,
                 [in] DBBKMARK cBookmarks,
147 148 149 150
                 [in, size_is((ULONG)cBookmarks)] const DBBKMARK rgcbBookmarks[],
                 [in, size_is((ULONG)cBookmarks)] const BYTE *rgpBookmarks[],
                 [out, size_is((ULONG)cBookmarks)] DBHASHVALUE rgHashedValues[],
                 [out, size_is((ULONG)cBookmarks)] DBROWSTATUS rgBookmarkStatus[]);
151

152 153 154
    /* IRowsetInfo */

    HRESULT GetProperties([in] ULONG cPropertyIDSets,
155
                          [in, unique, size_is((ULONG)cPropertyIDSets)] const DBPROPIDSET *rgPropertyIDSets,
156 157 158 159 160 161 162 163 164 165
                          [in, out] ULONG *pcPropertySets,
                          [out, size_is(,*pcPropertySets)] DBPROPSET **prgPropertySets);

    HRESULT GetReferencedRowset([in] DBORDINAL iOrdinal,
                                [in] REFIID riid,
                                [out, iid_is(riid)] IUnknown **ppReferencedRowset);

    HRESULT GetSpecification([in] REFIID riid,
                             [out, iid_is(riid)] IUnknown **ppSpecification);

166
    /* IAccessor */
167

168 169 170 171 172
    HRESULT AddRefAccessor([in] HACCESSOR hAccessor,
                           [in, out, unique, annotation("__out_opt")] DBREFCOUNT *pcRefCount);

    HRESULT CreateAccessor([in] DBACCESSORFLAGS dwAccessorFlags,
                           [in] DBCOUNTITEM cBindings,
173
                           [in, unique, size_is((ULONG)cBindings)] const DBBINDING *rgBindings,
174 175
                           [in] DBLENGTH cbRowSize,
                           [out] HACCESSOR *phAccessor,
176
                           [in, out, unique, size_is((ULONG)cBindings)] DBBINDSTATUS *rgStatus);
177 178 179 180

    HRESULT GetBindings([in] HACCESSOR hAccessor,
                        [out] DBACCESSORFLAGS *pdwAccessorFlags,
                        [in, out] DBCOUNTITEM *pcBindings,
181
                        [out, size_is(,(ULONG)*pcBindings)] DBBINDING **prgBindings);
182 183 184

    HRESULT ReleaseAccessor([in] HACCESSOR hAccessor,
                            [in, out, unique] DBREFCOUNT *pcRefCount);
185 186
}

187
[
188 189 190 191
    helpstring("Wine OLE DB Row Server"),
    threading(both),
    progid("WINEDBROWPRX.AsServer.1"),
    vi_progid("WINEDBROWPRX.AsServer"),
192 193 194 195 196 197 198 199
    uuid(38248178-cf6d-11de-abe5-000c2916d865)
]
coclass wine_row_server
{

}

[
200 201 202 203
    helpstring("Wine OLE DB Row Proxy"),
    threading(both),
    progid("WINEDBROWPRX.AsProxy.1"),
    vi_progid("WINEDBROWPRX.AsProxy"),
204 205 206 207 208 209 210 211
    uuid(38248179-cf6d-11de-abe5-000c2916d865)
]
coclass wine_row_proxy
{

}

[
212 213 214 215
    helpstring("Wine OLE DB Rowset Server"),
    threading(both),
    progid("WINEDBRSTPRX.AsServer.1"),
    vi_progid("WINEDBRSTPRX.AsServer"),
216 217 218 219 220 221 222 223
    uuid(3824817a-cf6d-11de-abe5-000c2916d865)
]
coclass wine_rowset_server
{

}

[
224 225 226 227
    helpstring("Wine OLE DB Rowset Proxy"),
    threading(both),
    progid("WINEDBRSTPRX.AsProxy.1"),
    vi_progid("WINEDBRSTPRX.AsProxy"),
228 229 230 231 232 233 234
    uuid(3824817b-cf6d-11de-abe5-000c2916d865)
]
coclass wine_rowset_proxy
{

}

235 236 237 238
cpp_quote("extern HRESULT create_row_server( IUnknown*, LPVOID* ) DECLSPEC_HIDDEN;")
cpp_quote("extern HRESULT create_row_marshal( IUnknown*, LPVOID* ) DECLSPEC_HIDDEN;")
cpp_quote("extern HRESULT create_rowset_server( IUnknown*, LPVOID* ) DECLSPEC_HIDDEN;")
cpp_quote("extern HRESULT create_rowset_marshal( IUnknown*, LPVOID* ) DECLSPEC_HIDDEN;")