row_server.idl 7.89 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 22 23 24 25 26 27 28 29 30 31 32
import "oledb.idl";

[
    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);
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53


    /* 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,
54 55
                       [in, size_is((ULONG)num_cols)] wine_getcolumns_in *in_data,
                       [out, size_is((ULONG)num_cols)] wine_getcolumns_out *out_cols);
56 57 58 59 60 61 62 63 64 65 66 67

    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);

68 69 70 71 72 73 74 75 76 77 78 79 80 81
    /* 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,
82 83
                       [in, size_is((ULONG)num_cols)] wine_setcolumns_in *in_data,
                       [out, size_is((ULONG)num_cols)] DBSTATUS *status);
84 85 86

    /* IRowset */
    HRESULT AddRefRows([in] DBCOUNTITEM cRows,
87 88 89
                       [in, size_is((ULONG)cRows)] const HROW rghRows[],
                       [out, size_is((ULONG)cRows)] DBREFCOUNT rgRefCounts[],
                       [out, size_is((ULONG)cRows)] DBROWSTATUS rgRowStatus[]);
90 91 92 93 94 95 96 97 98 99

    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,
100
                        [out, size_is(,(ULONG)cRows)] HROW **prghRows);
101 102

    HRESULT ReleaseRows([in] DBCOUNTITEM cRows,
103 104 105 106
                        [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[]);
107 108

    HRESULT RestartPosition([in] HCHAPTER hReserved);
109

110 111 112 113
    /* IRowsetLocate */

    HRESULT Compare([in] HCHAPTER hReserved,
                    [in] DBBKMARK cbBookmark1,
114
                    [in, size_is((ULONG)cbBookmark1)] const BYTE *pBookmark1,
115
                    [in] DBBKMARK cbBookmark2,
116
                    [in, size_is((ULONG)cbBookmark2)] const BYTE *pBookmark2,
117 118 119 120 121
                    [out] DBCOMPARE *pComparison);

    HRESULT GetRowsAt([in] HWATCHREGION hReserved1,
                      [in] HCHAPTER hReserved2,
                      [in] DBBKMARK cbBookmark,
122
                      [in, size_is((ULONG)cbBookmark)] const BYTE *pBookmark,
123 124 125
                      [in] DBROWOFFSET lRowsOffset,
                      [in] DBROWCOUNT cRows,
                      [out] DBCOUNTITEM *pcRowsObtained,
126
                      [out, size_is(,(ULONG)cRows)] HROW **prghRows);
127 128 129

    HRESULT GetRowsByBookmark([in] HCHAPTER hReserved,
                              [in] DBCOUNTITEM cRows,
130 131 132 133
                              [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[]);
134 135 136

    HRESULT Hash([in] HCHAPTER hReserved,
                 [in] DBBKMARK cBookmarks,
137 138 139 140
                 [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[]);
141

142 143 144
    /* IRowsetInfo */

    HRESULT GetProperties([in] ULONG cPropertyIDSets,
145
                          [in, unique, size_is((ULONG)cPropertyIDSets)] const DBPROPIDSET *rgPropertyIDSets,
146 147 148 149 150 151 152 153 154 155
                          [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);

156
    /* IAccessor */
157

158 159 160 161 162
    HRESULT AddRefAccessor([in] HACCESSOR hAccessor,
                           [in, out, unique, annotation("__out_opt")] DBREFCOUNT *pcRefCount);

    HRESULT CreateAccessor([in] DBACCESSORFLAGS dwAccessorFlags,
                           [in] DBCOUNTITEM cBindings,
163
                           [in, unique, size_is((ULONG)cBindings)] const DBBINDING *rgBindings,
164 165
                           [in] DBLENGTH cbRowSize,
                           [out] HACCESSOR *phAccessor,
166
                           [in, out, unique, size_is((ULONG)cBindings)] DBBINDSTATUS *rgStatus);
167 168 169 170

    HRESULT GetBindings([in] HACCESSOR hAccessor,
                        [out] DBACCESSORFLAGS *pdwAccessorFlags,
                        [in, out] DBCOUNTITEM *pcBindings,
171
                        [out, size_is(,(ULONG)*pcBindings)] DBBINDING **prgBindings);
172 173 174

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

177
[
178 179 180 181
    helpstring("Wine OLE DB Row Server"),
    threading(both),
    progid("WINEDBROWPRX.AsServer.1"),
    vi_progid("WINEDBROWPRX.AsServer"),
182 183 184 185 186 187 188 189
    uuid(38248178-cf6d-11de-abe5-000c2916d865)
]
coclass wine_row_server
{

}

[
190 191 192 193
    helpstring("Wine OLE DB Row Proxy"),
    threading(both),
    progid("WINEDBROWPRX.AsProxy.1"),
    vi_progid("WINEDBROWPRX.AsProxy"),
194 195 196 197 198 199 200 201
    uuid(38248179-cf6d-11de-abe5-000c2916d865)
]
coclass wine_row_proxy
{

}

[
202 203 204 205
    helpstring("Wine OLE DB Rowset Server"),
    threading(both),
    progid("WINEDBRSTPRX.AsServer.1"),
    vi_progid("WINEDBRSTPRX.AsServer"),
206 207 208 209 210 211 212 213
    uuid(3824817a-cf6d-11de-abe5-000c2916d865)
]
coclass wine_rowset_server
{

}

[
214 215 216 217
    helpstring("Wine OLE DB Rowset Proxy"),
    threading(both),
    progid("WINEDBRSTPRX.AsProxy.1"),
    vi_progid("WINEDBRSTPRX.AsProxy"),
218 219 220 221 222 223 224 225 226 227 228
    uuid(3824817b-cf6d-11de-abe5-000c2916d865)
]
coclass wine_rowset_proxy
{

}

cpp_quote("extern HRESULT create_row_server( IUnknown*, LPVOID* );")
cpp_quote("extern HRESULT create_row_marshal( IUnknown*, LPVOID* );")
cpp_quote("extern HRESULT create_rowset_server( IUnknown*, LPVOID* );")
cpp_quote("extern HRESULT create_rowset_marshal( IUnknown*, LPVOID* );")