svn-gvsig-desktop / tags / v1_0_2_Build_904 / libraries / libjni-ecw / include / CNCSMetabaseEdit.h @ 43469
History | View | Annotate | Download (1.61 KB)
1 |
/********************************************************
|
---|---|
2 |
** Copyright 2000 Earth Resource Mapping Ltd.
|
3 |
** This document contains proprietary source code of
|
4 |
** Earth Resource Mapping Ltd, and can only be used under
|
5 |
** one of the three licenses as described in the
|
6 |
** license.txt file supplied with this distribution.
|
7 |
** See separate license.txt file for license details
|
8 |
** and conditions.
|
9 |
**
|
10 |
** This software is covered by US patent #6,442,298,
|
11 |
** #6,102,897 and #6,633,688. Rights to use these patents
|
12 |
** is included in the license agreements.
|
13 |
**
|
14 |
** FILE: NCSUtil\CNCSMetabaseEdit.h
|
15 |
** CREATED: 10Apr00
|
16 |
** AUTHOR: Nicholas Yue
|
17 |
** PURPOSE: Metabase manipulation routines
|
18 |
** EDITS:
|
19 |
** [01] 11Jul00 ny Added boolean field to indicate if CoInitialize()
|
20 |
** has been called
|
21 |
(( [02] 14Jul01 sjc Added static mutex
|
22 |
*******************************************************/
|
23 |
#ifndef CNCSMETABASEEDIT_H
|
24 |
#define CNCSMETABASEEDIT_H
|
25 |
|
26 |
#include <windows.h> |
27 |
#include <iadmw.h> |
28 |
#include "NCSDefs.h" |
29 |
#include "NCSMutex.h" |
30 |
|
31 |
class NCS_EXPORT CNCSMetabaseEdit { |
32 |
public : |
33 |
CNCSMetabaseEdit(); |
34 |
~CNCSMetabaseEdit(); |
35 |
HRESULT open(char *pathName,
|
36 |
DWORD permission, |
37 |
DWORD timeout = 5000);
|
38 |
HRESULT close(); |
39 |
HRESULT save(); |
40 |
HRESULT get(char *dataName,
|
41 |
METADATA_RECORD *MDRecord, |
42 |
DWORD *MDRecordLen); |
43 |
HRESULT set(char *dataName,
|
44 |
METADATA_RECORD *MDRecord); |
45 |
HRESULT add(char *keyName);
|
46 |
HRESULT Delete(char *keyName);
|
47 |
|
48 |
protected : |
49 |
private : |
50 |
char _szPath[1024]; |
51 |
char _szData[256]; |
52 |
IMSAdminBase *pIABase; |
53 |
METADATA_HANDLE metaHandle; |
54 |
bool _isOpen;
|
55 |
bool _isInit;
|
56 |
static CNCSMutex sm_Mutex; //[02] |
57 |
}; |
58 |
#endif
|