Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / camel-lock-helper.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2  *
3  * Author: Michael Zucchi <notzed@ximian.com>
4  *
5  * Copyright (C) 1999 Ximian (www.ximian.com/).
6  *
7  * This program is free software; you can redistribute it and/or 
8  * modify it under the terms of version 2 of the GNU Lesser General Public 
9  * License as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19  * USA
20  */
21
22 /* defines protocol for lock helper process ipc */
23
24 #ifndef _CAMEL_LOCK_HELPER_H
25 #define _CAMEL_LOCK_HELPER_H
26
27 #include <glib.h>
28
29 G_BEGIN_DECLS
30
31 struct _CamelLockHelperMsg {
32         guint32 magic;
33         guint32 seq;
34         guint32 id;
35         guint32 data;
36 };
37
38 /* magic values */
39 enum {
40         CAMEL_LOCK_HELPER_MAGIC = 0xABADF00D,
41         CAMEL_LOCK_HELPER_RETURN_MAGIC = 0xDEADBEEF
42 };
43
44 /* return status */
45 enum {
46         CAMEL_LOCK_HELPER_STATUS_OK = 0,
47         CAMEL_LOCK_HELPER_STATUS_PROTOCOL,
48         CAMEL_LOCK_HELPER_STATUS_NOMEM,
49         CAMEL_LOCK_HELPER_STATUS_SYSTEM,
50         CAMEL_LOCK_HELPER_STATUS_INVALID, /* not allowed to lock/doesn't exist etc */
51 };
52
53 /* commands */
54 enum {
55         CAMEL_LOCK_HELPER_LOCK = 0xf0f,
56         CAMEL_LOCK_HELPER_UNLOCK = 0xf0f0,
57 };
58
59 /* seconds between lock refreshes */
60 #define CAMEL_DOT_LOCK_REFRESH (30)
61
62 G_END_DECLS
63
64 #endif /* !_CAMEL_LOCK_HELPER_H */