Created
November 4, 2010 01:15
-
-
Save sgonyea/661991 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* pabst.h | |
* pabst | |
* | |
* Created by Scott Gonyea on 11/3/10. | |
* Copyright (c) 2010 Scott Gonyea. All rights reserved. | |
* | |
*/ | |
#include <sys/types.h> | |
#include <stdint.h> | |
#include <stddef.h> | |
#include "MessageCodes.h" | |
#ifndef pabst_ | |
#define pabst_ | |
/* The classes below are exported */ | |
#pragma GCC visibility push(default) | |
typedef struct { | |
char *node; | |
char *version; | |
} srvInfo; | |
typedef struct { | |
char *bucket; | |
char *key; | |
char *tag; | |
} linkData; | |
typedef struct { | |
char *key; | |
char *value; | |
} pairData; | |
typedef struct { | |
char *value; | |
char *content_type; | |
char *charset; | |
char *content_encoding; | |
char *vtag; | |
uint32_t last_mod; | |
uint32_t last_mod_usecs; | |
size_t linksCount; | |
size_t pairsCount; | |
linkData *links; | |
pairData *pairs; | |
} contentData; | |
typedef struct { | |
char *vClock; | |
size_t contentsCount; | |
contentData *contents; | |
} keyData; | |
typedef struct { | |
size_t listCount; | |
char *list; | |
} strList; | |
typedef struct { | |
uint32_t n_val; | |
bool allow_mult; | |
} bucketData; | |
typedef struct { | |
uint32_t phase; | |
char *response; | |
} mrResponse; | |
typedef struct { | |
size_t responseCount; | |
mrResponse *response; | |
} mapredData; | |
bool pingRiak(); | |
char *getClientId(); | |
bool setClientId(char *); | |
srvInfo *getServerInfo(); | |
keyData *getKey(char *, char *, uint32_t); | |
keyData *putKey(char *, char *, keyData *, uint32_t, uint32_t, bool); | |
bool deleteKey(char *, char *, uint32_t); | |
strList *listBuckets(); | |
strList *listKeysInBucket(char *); | |
bucketData *getBucketProperties(char *); | |
bool setBucketProperties(char *, uint32_t, bool); | |
mapredData *mapReduce(char *, char *); | |
#pragma GCC visibility pop | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment