Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 60 lines (51 sloc) 1.82 kb
b0d0f27 Initial revision
mihajlov authored
1
2 /*
3 * fileRepository.h
4 *
5 * (C) Copyright IBM Corp. 2005
6 *
01521fc Changed all license references to Eclipse Public lecense
bestorga-oss authored
7 * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
b0d0f27 Initial revision
mihajlov authored
8 * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
9 * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
10 *
01521fc Changed all license references to Eclipse Public lecense
bestorga-oss authored
11 * You can obtain a current copy of the Eclipse Public License from
12 * http://www.opensource.org/licenses/eclipse-1.0.php
b0d0f27 Initial revision
mihajlov authored
13 *
14 * Author: Adrian Schuur <schuur@de.ibm.com>
15 *
16 * Description:
17 *
18 * Directory/file based respository implementation.
19 *
20 */
a3d8667 [ 1828500 ] CMPI 2.0 support
smswehla authored
21 #include <stdio.h>
e328089 [ 1578815 ] sfcb: create fileRepository shared library
sschuetz authored
22 #include "sfcUtil/utilft.h"
b0d0f27 Initial revision
mihajlov authored
23
24 #ifndef _FILEREPOSITORY_
25 #define _FILEREPOSITORY_
26
8ecbfa6 [ 2140807 ] Indication subscriptions don't persist across sfcbrepos
mchasal authored
27 //#define BASE "repository"
b0d0f27 Initial revision
mihajlov authored
28
29 typedef struct blobIndex {
30 int freed;
31 char *fnx,*fnd,*dir,*id;
32 FILE *fx,*fd;
33 char *index;
34 int dSize,aSize;
35 int pos,len,blen,bofs,next;
36 unsigned long fpos;
37 unsigned long dlen;
38 } BlobIndex;
39
40 #define NEW(td) (td*)calloc(sizeof(td),1)
41
42 extern void freeBlobIndex(BlobIndex **bi, int all);
a3d8667 [ 1828500 ] CMPI 2.0 support
smswehla authored
43 extern int getIndex(const char *ns, const char *cls, int elen, int mki, BlobIndex** bip);
44 extern int addBlob(const char *ns, const char * cls, char *id, void *blob, int len);
45 extern int deleteBlob(const char *ns, const char * cls, const char *id);
46 extern void *getBlob(const char *ns, const char *cls, const char *id, int *len);
47 extern int existingBlob(const char *ns, const char * cls, const char *id);
48 extern int existingNameSpace(const char *ns);
bd151ae [ 1518696 ] sfcb internal provider segfaults
mihajlov authored
49 extern void* getFirst(BlobIndex *bi, int *len, char** keyb, size_t *keybl);
50 extern void* getNext(BlobIndex *bi, int *len, char** keyb, size_t *keybl);
b0d0f27 Initial revision
mihajlov authored
51
8ecbfa6 [ 2140807 ] Indication subscriptions don't persist across sfcbrepos
mchasal authored
52 /*
53 NOTE: useAlternateRepository must be called prior to
54 calling any other functions from fileRepository.h
55 */
56 // override 'repository' option from sfcb.cfg... full path to repository dir
57 extern void useAlternateRepository(const char *inAltRepos);
58
b0d0f27 Initial revision
mihajlov authored
59 #endif
Something went wrong with that request. Please try again.