olesvr_main.c 5.93 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
 *
 * 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
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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
#include "objbase.h"
31
#include "wine/debug.h"
Alexandre Julliard's avatar
Alexandre Julliard committed
32

33
WINE_DEFAULT_DEBUG_CHANNEL(ole);
34

Alexandre Julliard's avatar
Alexandre Julliard committed
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
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;
103
typedef LPCSTR LPCOLESTR16;
Alexandre Julliard's avatar
Alexandre Julliard committed
104 105 106 107 108 109

typedef struct _OLESERVERDOC *LPOLESERVERDOC;

struct _OLESERVERDOCVTBL;
typedef struct _OLESERVERDOC
{
110
    const struct _OLESERVERDOCVTBL *lpvtbl;
Alexandre Julliard's avatar
Alexandre Julliard committed
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
    /* 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
{
128
    const OLESERVERVTBL *lpvtbl;
Alexandre Julliard's avatar
Alexandre Julliard committed
129 130 131
    /* server specific data */
} OLESERVER;

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

134
/******************************************************************************
135
 *		OleBlockServer	[OLESVR32.4]
Alexandre Julliard's avatar
Alexandre Julliard committed
136
 */
137
OLESTATUS WINAPI OleBlockServer(LHSERVER hServer)
Alexandre Julliard's avatar
Alexandre Julliard committed
138
{
139
    FIXME("(%d): stub\n",hServer);
Alexandre Julliard's avatar
Alexandre Julliard committed
140 141 142
    return OLE_OK;
}

143
/******************************************************************************
144
 *		OleUnblockServer	[OLESVR32.5]
Alexandre Julliard's avatar
Alexandre Julliard committed
145
 */
146
OLESTATUS WINAPI OleUnblockServer(LHSERVER hServer, BOOL *block)
Alexandre Julliard's avatar
Alexandre Julliard committed
147
{
148
    FIXME("(%d): stub\n",hServer);
Alexandre Julliard's avatar
Alexandre Julliard committed
149 150 151 152 153
    /* no more blocked messages :) */
    *block=FALSE;
    return OLE_OK;
}

154
/******************************************************************************
155
 *		OleRevokeServerDoc	[OLESVR32.7]
Alexandre Julliard's avatar
Alexandre Julliard committed
156
 */
157
OLESTATUS WINAPI OleRevokeServerDoc(LHSERVERDOC hServerDoc)
Alexandre Julliard's avatar
Alexandre Julliard committed
158
{
159
    FIXME("(%d): stub\n",hServerDoc);
Alexandre Julliard's avatar
Alexandre Julliard committed
160 161 162
    return OLE_OK;
}

Matthew Becker's avatar
Matthew Becker committed
163
/******************************************************************************
164
 * OleRegisterServer [OLESVR32.2]
Matthew Becker's avatar
Matthew Becker committed
165
 */
166
OLESTATUS WINAPI OleRegisterServer(LPCSTR svrname,LPOLESERVER olesvr,LHSERVER* hRet,HINSTANCE hinst,OLE_SERVER_USE osu) {
167
	FIXME("(%s,%p,%p,%p,%d): stub!\n",svrname,olesvr,hRet,hinst,osu);
Alexandre Julliard's avatar
Alexandre Julliard committed
168 169 170 171
    	*hRet=++OLE_current_handle;
	return OLE_OK;
}

Matthew Becker's avatar
Matthew Becker committed
172
/******************************************************************************
173
 * OleRegisterServerDoc [OLESVR32.6]
Matthew Becker's avatar
Matthew Becker committed
174
 */
175
OLESTATUS WINAPI OleRegisterServerDoc( LHSERVER hServer, LPCSTR docname,
Alexandre Julliard's avatar
Alexandre Julliard committed
176 177 178
                                         LPOLESERVERDOC document,
                                         LHSERVERDOC *hRet)
{
179
    FIXME("(%d,%s): stub\n", hServer, docname);
Alexandre Julliard's avatar
Alexandre Julliard committed
180 181 182 183
    *hRet=++OLE_current_handle;
    return OLE_OK;
}

184
/******************************************************************************
185
 *		OleRenameServerDoc	[OLESVR32.8]
Alexandre Julliard's avatar
Alexandre Julliard committed
186 187
 *
 */
188
OLESTATUS WINAPI OleRenameServerDoc(LHSERVERDOC hDoc, LPCSTR newName)
Alexandre Julliard's avatar
Alexandre Julliard committed
189
{
190
    FIXME("(%d,%s): stub.\n",hDoc, newName);
Alexandre Julliard's avatar
Alexandre Julliard committed
191 192
    return OLE_OK;
}
193 194 195 196 197 198 199

/******************************************************************************
 *		OleRevertServerDoc	[OLESVR32.9]
 *
 */
OLESTATUS WINAPI OleRevertServerDoc(LHSERVERDOC hDoc)
{
200
    FIXME("(%d): stub.\n", hDoc);
201 202 203 204 205 206 207 208 209
    return OLE_OK;
}

/******************************************************************************
 *		OleSavedServerDoc	[OLESVR32.10]
 *
 */
OLESTATUS WINAPI OleSavedServerDoc(LHSERVERDOC hDoc)
{
210
    FIXME("(%d): stub.\n", hDoc);
211 212
    return OLE_OK;
}
213 214 215 216 217 218 219 220 221 222

/******************************************************************************
 *		OleRevokeServer	[OLESVR32.3]
 *
 */
OLESTATUS WINAPI OleRevokeServer(LHSERVER hServer)
{
    FIXME("(%d): stub.\n", hServer);
    return OLE_OK;
}