olesvr_main.c 8.31 KB
Newer Older
Alexandre Julliard's avatar
Alexandre Julliard committed
1 2 3 4
/*
 *	OLESVR library
 *
 *	Copyright 1995	Martin von Loewis
5 6 7 8 9 10 11 12 13 14 15 16 17 18
 *
 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Alexandre Julliard's avatar
Alexandre Julliard committed
19 20 21 22 23
 */

/*	At the moment, these are only empty stubs.
 */

24 25
#include "config.h"

26 27
#include <stdarg.h>

Alexandre Julliard's avatar
Alexandre Julliard committed
28
#include "windef.h"
29
#include "winbase.h"
Alexandre Julliard's avatar
Alexandre Julliard committed
30 31
#include "wine/windef16.h"
#include "objbase.h"
32
#include "wine/debug.h"
Alexandre Julliard's avatar
Alexandre Julliard committed
33

34
WINE_DEFAULT_DEBUG_CHANNEL(ole);
35

Alexandre Julliard's avatar
Alexandre Julliard committed
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
typedef enum
{
    OLE_OK,
    OLE_WAIT_FOR_RELEASE,
    OLE_BUSY,
    OLE_ERROR_PROTECT_ONLY,
    OLE_ERROR_MEMORY,
    OLE_ERROR_STREAM,
    OLE_ERROR_STATIC,
    OLE_ERROR_BLANK,
    OLE_ERROR_DRAW,
    OLE_ERROR_METAFILE,
    OLE_ERROR_ABORT,
    OLE_ERROR_CLIPBOARD,
    OLE_ERROR_FORMAT,
    OLE_ERROR_OBJECT,
    OLE_ERROR_OPTION,
    OLE_ERROR_PROTOCOL,
    OLE_ERROR_ADDRESS,
    OLE_ERROR_NOT_EQUAL,
    OLE_ERROR_HANDLE,
    OLE_ERROR_GENERIC,
    OLE_ERROR_CLASS,
    OLE_ERROR_SYNTAX,
    OLE_ERROR_DATATYPE,
    OLE_ERROR_PALETTE,
    OLE_ERROR_NOT_LINK,
    OLE_ERROR_NOT_EMPTY,
    OLE_ERROR_SIZE,
    OLE_ERROR_DRIVE,
    OLE_ERROR_NETWORK,
    OLE_ERROR_NAME,
    OLE_ERROR_TEMPLATE,
    OLE_ERROR_NEW,
    OLE_ERROR_EDIT,
    OLE_ERROR_OPEN,
    OLE_ERROR_NOT_OPEN,
    OLE_ERROR_LAUNCH,
    OLE_ERROR_COMM,
    OLE_ERROR_TERMINATE,
    OLE_ERROR_COMMAND,
    OLE_ERROR_SHOW,
    OLE_ERROR_DOVERB,
    OLE_ERROR_ADVISE_NATIVE,
    OLE_ERROR_ADVISE_PICT,
    OLE_ERROR_ADVISE_RENAME,
    OLE_ERROR_POKE_NATIVE,
    OLE_ERROR_REQUEST_NATIVE,
    OLE_ERROR_REQUEST_PICT,
    OLE_ERROR_SERVER_BLOCKED,
    OLE_ERROR_REGISTRATION,
    OLE_ERROR_ALREADY_REGISTERED,
    OLE_ERROR_TASK,
    OLE_ERROR_OUTOFDATE,
    OLE_ERROR_CANT_UPDATE_CLIENT,
    OLE_ERROR_UPDATE,
    OLE_ERROR_SETDATA_FORMAT,
    OLE_ERROR_STATIC_FROM_OTHER_OS,
    OLE_WARN_DELETE_DATA = 1000
} OLESTATUS;

typedef enum {
    OLE_SERVER_MULTI,
    OLE_SERVER_SINGLE
} OLE_SERVER_USE;

typedef LONG LHSERVER;
typedef LONG LHSERVERDOC;
104
typedef LPCSTR LPCOLESTR16;
Alexandre Julliard's avatar
Alexandre Julliard committed
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132

typedef struct _OLESERVERDOC *LPOLESERVERDOC;

struct _OLESERVERDOCVTBL;
typedef struct _OLESERVERDOC
{
    struct _OLESERVERDOCVTBL *lpvtbl;
    /* server provided state info */
} OLESERVERDOC;

typedef struct _OLESERVER *LPOLESERVER;
typedef struct _OLESERVERVTBL
{
    OLESTATUS (CALLBACK *Open)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPOLESERVERDOC *);
    OLESTATUS (CALLBACK *Create)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC*);
    OLESTATUS (CALLBACK *CreateFromTemplate)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC *);
    OLESTATUS (CALLBACK *Edit)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC *);
    OLESTATUS (CALLBACK *Exit)(LPOLESERVER);
    OLESTATUS (CALLBACK *Release)(LPOLESERVER);
    OLESTATUS (CALLBACK *Execute)(LPOLESERVER);
} OLESERVERVTBL, *LPOLESERVERVTBL;

typedef struct _OLESERVER
{
    LPOLESERVERVTBL lpvtbl;
    /* server specific data */
} OLESERVER;

133
static LONG OLE_current_handle;
Alexandre Julliard's avatar
Alexandre Julliard committed
134

135
/******************************************************************************
Patrik Stridvall's avatar
Patrik Stridvall committed
136
 *		OleRegisterServer	[OLESVR.2]
Alexandre Julliard's avatar
Alexandre Julliard committed
137 138 139 140 141
 */
OLESTATUS WINAPI OleRegisterServer16( LPCSTR name, LPOLESERVER serverStruct,
                                      LHSERVER *hRet, HINSTANCE16 hServer,
                                      OLE_SERVER_USE use )
{
142
    FIXME("(%s,...): stub\n",name);
Alexandre Julliard's avatar
Alexandre Julliard committed
143 144 145 146 147
    *hRet=++OLE_current_handle;
    /* return OLE_ERROR_MEMORY, OLE_ERROR_PROTECT_ONLY if you want it fail*/
    return OLE_OK;
}

148
/******************************************************************************
Patrik Stridvall's avatar
Patrik Stridvall committed
149
 *		OleBlockServer	[OLESVR.4]
Alexandre Julliard's avatar
Alexandre Julliard committed
150 151 152
 */
OLESTATUS WINAPI OleBlockServer16(LHSERVER hServer)
{
153
    FIXME("(%ld): stub\n",hServer);
Alexandre Julliard's avatar
Alexandre Julliard committed
154 155 156
    return OLE_OK;
}

157
/******************************************************************************
158
 *		OleBlockServer	[OLESVR32.4]
Alexandre Julliard's avatar
Alexandre Julliard committed
159
 */
160
OLESTATUS WINAPI OleBlockServer(LHSERVER hServer)
Alexandre Julliard's avatar
Alexandre Julliard committed
161
{
162
    FIXME("(%ld): stub\n",hServer);
Alexandre Julliard's avatar
Alexandre Julliard committed
163 164 165
    return OLE_OK;
}

166
/******************************************************************************
Patrik Stridvall's avatar
Patrik Stridvall committed
167
 *		OleUnblockServer	[OLESVR.5]
Alexandre Julliard's avatar
Alexandre Julliard committed
168 169 170
 */
OLESTATUS WINAPI OleUnblockServer16(LHSERVER hServer, BOOL16 *block)
{
171
    FIXME("(%ld): stub\n",hServer);
Alexandre Julliard's avatar
Alexandre Julliard committed
172 173 174 175 176
    /* no more blocked messages :) */
    *block=FALSE;
    return OLE_OK;
}

177
/******************************************************************************
178
 *		OleUnblockServer	[OLESVR32.5]
Alexandre Julliard's avatar
Alexandre Julliard committed
179
 */
180
OLESTATUS WINAPI OleUnblockServer(LHSERVER hServer, BOOL *block)
Alexandre Julliard's avatar
Alexandre Julliard committed
181
{
182
    FIXME("(%ld): stub\n",hServer);
Alexandre Julliard's avatar
Alexandre Julliard committed
183 184 185 186 187 188
    /* no more blocked messages :) */
    *block=FALSE;
    return OLE_OK;
}

/***********************************************************************
Patrik Stridvall's avatar
Patrik Stridvall committed
189
 *		OleRegisterServerDoc	[OLESVR.6]
Alexandre Julliard's avatar
Alexandre Julliard committed
190 191 192 193 194
 */
OLESTATUS WINAPI OleRegisterServerDoc16( LHSERVER hServer, LPCSTR docname,
                                         LPOLESERVERDOC document,
                                         LHSERVERDOC *hRet)
{
195
    FIXME("(%ld,%s): stub\n",hServer, docname);
Alexandre Julliard's avatar
Alexandre Julliard committed
196 197 198 199
    *hRet=++OLE_current_handle;
    return OLE_OK;
}

200
/******************************************************************************
Patrik Stridvall's avatar
Patrik Stridvall committed
201
 *		OleRevokeServerDoc	[OLESVR.7]
Alexandre Julliard's avatar
Alexandre Julliard committed
202 203 204
 */
OLESTATUS WINAPI OleRevokeServerDoc16(LHSERVERDOC hServerDoc)
{
205
    FIXME("%ld  - stub\n",hServerDoc);
Alexandre Julliard's avatar
Alexandre Julliard committed
206 207 208
    return OLE_OK;
}

209
/******************************************************************************
210
 *		OleRevokeServerDoc	[OLESVR32.7]
Alexandre Julliard's avatar
Alexandre Julliard committed
211
 */
212
OLESTATUS WINAPI OleRevokeServerDoc(LHSERVERDOC hServerDoc)
Alexandre Julliard's avatar
Alexandre Julliard committed
213
{
214
    FIXME("(%ld): stub\n",hServerDoc);
Alexandre Julliard's avatar
Alexandre Julliard committed
215 216 217
    return OLE_OK;
}

218 219
/******************************************************************************
 *		OleRevokeServer	[OLESVR.3]
Alexandre Julliard's avatar
Alexandre Julliard committed
220
 */
221
OLESTATUS WINAPI OleRevokeServer16(LHSERVER hServer)
Alexandre Julliard's avatar
Alexandre Julliard committed
222
{
223
    FIXME("%ld - stub\n",hServer);
Alexandre Julliard's avatar
Alexandre Julliard committed
224 225 226
    return OLE_OK;
}

Matthew Becker's avatar
Matthew Becker committed
227
/******************************************************************************
228
 * OleRegisterServer [OLESVR32.2]
Matthew Becker's avatar
Matthew Becker committed
229
 */
230
OLESTATUS WINAPI OleRegisterServer(LPCSTR svrname,LPOLESERVER olesvr,LHSERVER* hRet,HINSTANCE hinst,OLE_SERVER_USE osu) {
231
	FIXME("(%s,%p,%p,%p,%d): stub!\n",svrname,olesvr,hRet,hinst,osu);
Alexandre Julliard's avatar
Alexandre Julliard committed
232 233 234 235
    	*hRet=++OLE_current_handle;
	return OLE_OK;
}

Matthew Becker's avatar
Matthew Becker committed
236
/******************************************************************************
237
 * OleRegisterServerDoc [OLESVR32.6]
Matthew Becker's avatar
Matthew Becker committed
238
 */
239
OLESTATUS WINAPI OleRegisterServerDoc( LHSERVER hServer, LPCSTR docname,
Alexandre Julliard's avatar
Alexandre Julliard committed
240 241 242
                                         LPOLESERVERDOC document,
                                         LHSERVERDOC *hRet)
{
243
    FIXME("(%ld,%s): stub\n", hServer, docname);
Alexandre Julliard's avatar
Alexandre Julliard committed
244 245 246 247
    *hRet=++OLE_current_handle;
    return OLE_OK;
}

248 249 250 251 252 253 254 255 256 257
/******************************************************************************
 *		OleRenameServerDoc	[OLESVR.8]
 *
 */
OLESTATUS WINAPI OleRenameServerDoc16(LHSERVERDOC hDoc, LPCSTR newName)
{
    FIXME("(%ld,%s): stub.\n", hDoc, newName);
    return OLE_OK;
}

258
/******************************************************************************
259
 *		OleRenameServerDoc	[OLESVR32.8]
Alexandre Julliard's avatar
Alexandre Julliard committed
260 261
 *
 */
262
OLESTATUS WINAPI OleRenameServerDoc(LHSERVERDOC hDoc, LPCSTR newName)
Alexandre Julliard's avatar
Alexandre Julliard committed
263
{
264
    FIXME("(%ld,%s): stub.\n",hDoc, newName);
Alexandre Julliard's avatar
Alexandre Julliard committed
265 266
    return OLE_OK;
}
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306

/******************************************************************************
 *		OleRevertServerDoc	[OLESVR.9]
 *
 */
OLESTATUS WINAPI OleRevertServerDoc16(LHSERVERDOC hDoc)
{
    FIXME("(%ld): stub.\n", hDoc);
    return OLE_OK;
}

/******************************************************************************
 *		OleRevertServerDoc	[OLESVR32.9]
 *
 */
OLESTATUS WINAPI OleRevertServerDoc(LHSERVERDOC hDoc)
{
    FIXME("(%ld): stub.\n", hDoc);
    return OLE_OK;
}

/******************************************************************************
 *		OleSavedServerDoc	[OLESVR.10]
 *
 */
OLESTATUS WINAPI OleSavedServerDoc16(LHSERVERDOC hDoc)
{
    FIXME("(%ld): stub.\n", hDoc);
    return OLE_OK;
}

/******************************************************************************
 *		OleSavedServerDoc	[OLESVR32.10]
 *
 */
OLESTATUS WINAPI OleSavedServerDoc(LHSERVERDOC hDoc)
{
    FIXME("(%ld): stub.\n", hDoc);
    return OLE_OK;
}