X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=common%2Fapp.h;h=8156274d99fde45df8431bb00ba76132f1fe787d;hb=abeaeafe6860bef22ab8469261d3198efc8358c1;hp=93dc8b4031148b85249f8e0f43b8b3739cea8367;hpb=6dfc316b5d66bed00bf271acd1a9ccb3144cfac8;p=blerg.git diff --git a/common/app.h b/common/app.h index 93dc8b4..8156274 100644 --- a/common/app.h +++ b/common/app.h @@ -1,31 +1,35 @@ +/* Blerg is (C) 2011 The Dominion of Awesome, and is distributed under a + * BSD-style license. Please see the COPYING file for details. + */ #ifndef _APP_H #define _APP_H #include #include "database.h" +#include "config.h" #define REALM "Blerg" #define CONTENT_401 "401 Unauthorized

401 Unauthorized

DENIED" +#define CONTENT_403 "403 Forbidden

403 Forbidden

Go away." #define CONTENT_404 "404 Not Found

404 Not Found

I couldn't find that." #define CONTENT_405 "405 Method Not Allowed

405 Method Not Allowed

I'm sorry, Dave. I'm afraid I can't do that." #define JSON_SUCCESS "{\"status\": \"success\"}" #define JSON_FAILURE "{\"status\": \"failure\"}" -#define URL_INFO_AUTHOR 0x1 +#define URL_INFO_NAME 0x1 #define URL_INFO_RECORD 0x2 #define URL_INFO_RECORD_TO 0x4 #define DERP "DERP DERP DERP" struct url_info { unsigned int contents; - char author[33]; + char name[MAX_TAG_LENGTH + 1]; uint64_t record; uint64_t record_to; }; int parse_url_info(const char *url, struct url_info *info); uint64_t *make_sequential_list(uint64_t from, uint64_t to); -void json_generate_one_record(yajl_gen g, const char *author, struct blerg *b, uint64_t record); #endif /* _APP_H */