Statistics
| Revision:

svn-gvsig-desktop / tags / v1_1_1_Build_1016 / libraries / libjni-ecw / include / NCSPrefs.h @ 33925

History | View | Annotate | Download (2.9 KB)

1 3538 nacho
/********************************************************
2
** Copyright 1999 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:           NCSPrefs.h
15
** CREATED:        Fri Jun  4 18:05:04 WST 1999
16
** AUTHOR:         Mark Sheridan
17
** PURPOSE:        NCS Preferences header.
18
** EDITS:
19
** [01]         ny        31Oct00        Merge WinCE/PALM SDK changes
20
 *******************************************************/
21
22
#ifndef NCSPREFS_H
23
#define NCSPREFS_H
24
25
#include "NCSUtil.h"
26
27
#ifdef __cplusplus
28
extern "C" {
29
#endif
30
31
#include "NCSTypes.h"
32
#include "NCSErrors.h"
33
#include "NCSMutex.h"
34
#include "NCSMalloc.h"
35
#ifdef PALM
36
#include <Preferences.h>
37
#endif        /* PALM */
38
39
#define NCSPREF_DEFAULT_BASE_KEY "Software\\Earth Resource Mapping\\Image Web Server"
40
41
#ifdef PALM
42
#define NCS_PALM_MAX_PREFS 64
43
#define NCS_PALM_MAX_PREF_LENGTH 256
44
#endif        /* PALM */
45
/*
46
**
47
** Utility functions - create delete machine or user level keys
48
**
49
*/
50
51
void NCSLockRegistryAccess();
52
void NCSUnLockRegistryAccess();
53
54
void NCSPrefInit(void);
55
void NCSPrefFini(void);
56
NCSError NCSPrefCreateUserKey(char *pKeyName );
57
NCSError NCSPrefCreateMachineKey(char *pKeyName );
58
NCSError NCSPrefSetMachineKey(char *pKeyName );
59
NCSError NCSPrefSetUserKey(char *pKeyName );
60
char *NCSPrefGetMachineKey(void);
61
char *NCSPrefGetUserKey(void);
62
63
/*
64
**
65
** Machine/Global level preference functions
66
** Base key is HKEY_LOCAL_MACHINE
67
**
68
*/
69
NCSError NCSPrefGetString(char *pKeyName, char **pString );
70
NCSError NCSPrefSetString(char *pKeyName, char *pString );
71
NCSError NCSPrefGetDouble(char *pKeyName, IEEE8 *pValue );
72
NCSError NCSPrefSetDouble(char *pKeyName, IEEE8 dValue );
73
NCSError NCSPrefGetInt(char *pKeyName, INT32 *pValue );
74
NCSError NCSPrefSetInt(char *pKeyName, INT32 nValue);
75
NCSError NCSPrefSetBoolean(char *pKeyname, BOOLEAN bValue );
76
NCSError NCSPrefGetBoolean(char *pKeyName, BOOLEAN *pValue );
77
NCSError NCSPrefDeleteValue(char *pKeyName);
78
79
/*
80
**
81
** User level preference functions
82
** Base key is HKEY_CURRENT_USER
83
**
84
*/
85
NCSError NCSPrefGetUserString(char *pKeyName, char **pString );
86
NCSError NCSPrefSetUserString(char *pKeyName, char *pString );
87
NCSError NCSPrefGetUserDouble(char *pKeyName, IEEE8 *pValue );
88
NCSError NCSPrefSetUserDouble(char *pKeyName, IEEE8 dValue );
89
NCSError NCSPrefGetUserInt(char *pKeyName, INT32 *pValue );
90
NCSError NCSPrefSetUserInt(char *pKeyName, INT32 nValue );
91
NCSError NCSPrefSetUserBoolean(char *pKeyname, BOOLEAN bValue );
92
NCSError NCSPrefGetUserBoolean(char *pKeyName, BOOLEAN *pValue );
93
NCSError NCSPrefDeleteValueUser(char *pKeyName);
94
95
#ifdef __cplusplus
96
}
97
#endif
98
99
#endif /* NCSPREFS_H */