Added code for upgrade to DB format version 17
[public/netxms.git] / src / server / core / nms_locks.h
CommitLineData
b54b2b11
VK
1/*
2** NetXMS - Network Management System
3** Copyright (C) 2003, 2004 Victor Kirhenshtein
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18**
19** $module: nms_locks.h
20**
21**/
22
23#ifndef _nms_locks_h_
24#define _nms_locks_h_
25
54abbe0e 26
b54b2b11
VK
27//
28// Component identifiers used for locking
29//
30
31#define CID_NETXMS_INSTANCE 0
32#define CID_EPP 1
ff550544 33#define CID_USER_DB 2
b54b2b11 34#define CID_EVENT_DB 3
c9363772 35#define CID_ACTION_DB 4
b54b2b11 36
54abbe0e
VK
37
38//
39// Functions
40//
41
42#ifndef _NETXMS_DB_SCHEMA_
43
44BOOL InitLocks(DWORD *pdwIpAddr, char *pszInfo);
45BOOL LockComponent(DWORD dwId, DWORD dwLockBy, char *pszOwnerInfo, DWORD *pdwCurrentOwner, char *pszCurrentOwnerInfo);
46void UnlockComponent(DWORD dwId);
47void RemoveAllSessionLocks(DWORD dwSessionId);
48
49#endif
50
b54b2b11 51#endif