Shared Persistent Heap Data Environment Manual  1.1.0
sphcontext.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2006-2014 IBM Corporation.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation, Steven Munroe - initial API and implementation
10  */
11 
12 #ifndef __SPH_CONTEXT_H
13 #define __SPH_CONTEXT_H
14 
41 #include "sastype.h"
42 #include "sasstringbtreeenum.h"
43 
48 typedef void *SPHContext_t;
49 
50 #ifdef __cplusplus
51 #define __C__ "C"
52 #else
53 #define __C__
54 #endif
55 
70 extern __C__ SPHContext_t
71 SPHContextInit (void *heap_block , sas_type_t sasType,
72  block_size_t heap_size);
73 
83 extern __C__ SPHContext_t
84 SPHContextCreate (block_size_t heap_size);
85 
93 extern __C__ int
95 
113 extern __C__ int
114 SPHContextAddName (SPHContext_t contxt, char *name, void *value);
115 
130 extern __C__ int
131 SPHContextRename (SPHContext_t contxt, char *oldname, char *newname, void *value);
132 
147 
157 extern __C__ void*
158 SPHContextFindByName (SPHContext_t contxt, char *name);
159 
169 extern __C__ void*
170 SPHContextFindByAddr (SPHContext_t contxt, void *value);
171 
182 extern __C__ int
183 SPHContextRemoveByName (SPHContext_t contxt, char *name);
184 
194 extern __C__ int
195 SPHContextRemoveByAddr (SPHContext_t contxt, void *value);
196 
205 extern __C__ block_size_t
207 
231 extern __C__ SPHContext_t
232 SPHSetupProjectContext(char *project_name);
233 
244 extern __C__ SPHContext_t
245 SPHSetupAltProjectContext(char *project_name);
246 
257 extern __C__ SPHContext_t
258 SPHRemoveProjectContext(char *project_name);
259 
269 extern __C__ int
270 SPHDestroyProjectContext(char *project_name);
271 
281 extern __C__ SPHContext_t
282 getProjectContextByName(char *project_name);
283 
288 extern __C__ SPHContext_t
290 
291 #endif /* __SPH_CONTEXT_H */
__C__ int SPHContextAddName(SPHContext_t contxt, char *name, void *value)
Add a name/address mapping to this context.
void * SASStringBTreeEnum_t
Handle to an instance of String BTree Enumeration.
Definition: sasstringbtreeenum.h:113
__C__ int SPHDestroyProjectContext(char *project_name)
Remove an existing project context from the root and destroy that project context.
__C__ SASStringBTreeEnum_t SPHContextGetNameEnum(SPHContext_t contxt)
Create a SASStringBTreeEnum_t enumeration that can used to iterate over the name space of this contex...
__C__ SPHContext_t getCurrentProjectContext()
return the address of the current project context.
__C__ int SPHContextDestroy(SPHContext_t contxt)
Destroy a name/address mapping context and free the shared storage block.
__C__ SPHContext_t SPHRemoveProjectContext(char *project_name)
Remove an existing project context from the root and return the named project context. The project context is not destroyed.
__C__ SPHContext_t SPHSetupProjectContext(char *project_name)
Setup the root and named project contexts. A project context is just a second level context named in ...
void * SPHContext_t
Handle to an instance of SPH Context.
Definition: sphcontext.h:48
#define __C__
ignore this macro behind the curtain
Definition: sasmsync.h:32
__C__ SPHContext_t SPHSetupAltProjectContext(char *project_name)
Setup root and named project contexts. A project context is just a second level context named in the ...
__C__ block_size_t SPHContextFreeSpace(SPHContext_t contxt)
Return the remaining free space within the specified context.
__C__ SPHContext_t SPHContextInit(void *heap_block, sas_type_t sasType, block_size_t heap_size)
Initialize a shared storage block as a name/address mapping context.
__C__ int SPHContextRename(SPHContext_t contxt, char *oldname, char *newname, void *value)
Replace the existing "old name" with a "new name" string for the associated address value in this con...
__C__ void * SPHContextFindByName(SPHContext_t contxt, char *name)
Find the address value associated with a name within a specific context.
__C__ SPHContext_t getProjectContextByName(char *project_name)
return the address of the named project context.
__C__ void * SPHContextFindByAddr(SPHContext_t contxt, void *value)
Find the name associated with an address value within a specific context.
__C__ SPHContext_t SPHContextCreate(block_size_t heap_size)
Create a name/address mapping context..
__C__ int SPHContextRemoveByName(SPHContext_t contxt, char *name)
Remove a name/address association by matching name for the specified context.
__C__ int SPHContextRemoveByAddr(SPHContext_t contxt, void *value)
Remove a name/address associations by matching address value for the specified context.
An enumeration over a Shared Address Space, C String BTree index for shared memory multi-thread/multi...