From: Sebastian Harl Date: Sun, 15 Dec 2013 15:40:37 +0000 (+0100) Subject: Moved connection-private.h from src/include/frontend/ to src/frontend/. X-Git-Tag: sysdb-0.1.0~300^2~1 X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=commitdiff_plain;h=724fcc3faf3362d4cedf8f3f07b5342287d6070e Moved connection-private.h from src/include/frontend/ to src/frontend/. This header is not meant to be used anyway else, so don't lead people into temptation. --- diff --git a/src/frontend/connection-private.h b/src/frontend/connection-private.h new file mode 100644 index 0000000..6cf7395 --- /dev/null +++ b/src/frontend/connection-private.h @@ -0,0 +1,77 @@ +/* + * SysDB - src/include/frontend/connection-private.h + * Copyright (C) 2013 Sebastian 'tokkee' Harl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * private data structures used by frontend modules + */ + +#ifndef SDB_FRONTEND_CONNECTION_PRIVATE_H +#define SDB_FRONTEND_CONNECTION_PRIVATE_H 1 + +#include "core/object.h" +#include "utils/strbuf.h" +#include "frontend/connection.h" + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct sdb_conn { + sdb_object_t super; + + /* file-descriptor of the open connection */ + int fd; + + /* connection and client information */ + struct sockaddr_storage client_addr; + socklen_t client_addr_len; + + /* read buffer */ + sdb_strbuf_t *buf; + + /* connection / protocol state information */ + uint32_t cmd; + uint32_t cmd_len; + + sdb_strbuf_t *errbuf; + + /* user information */ + char *username; /* NULL if the user has not been authenticated */ +}; +#define CONN(obj) ((sdb_conn_t *)(obj)) + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* ! SDB_FRONTEND_CONNECTION_H */ + +/* vim: set tw=78 sw=4 ts=4 noexpandtab : */ + diff --git a/src/include/frontend/connection-private.h b/src/include/frontend/connection-private.h deleted file mode 100644 index 6cf7395..0000000 --- a/src/include/frontend/connection-private.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * SysDB - src/include/frontend/connection-private.h - * Copyright (C) 2013 Sebastian 'tokkee' Harl - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * private data structures used by frontend modules - */ - -#ifndef SDB_FRONTEND_CONNECTION_PRIVATE_H -#define SDB_FRONTEND_CONNECTION_PRIVATE_H 1 - -#include "core/object.h" -#include "utils/strbuf.h" -#include "frontend/connection.h" - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct sdb_conn { - sdb_object_t super; - - /* file-descriptor of the open connection */ - int fd; - - /* connection and client information */ - struct sockaddr_storage client_addr; - socklen_t client_addr_len; - - /* read buffer */ - sdb_strbuf_t *buf; - - /* connection / protocol state information */ - uint32_t cmd; - uint32_t cmd_len; - - sdb_strbuf_t *errbuf; - - /* user information */ - char *username; /* NULL if the user has not been authenticated */ -}; -#define CONN(obj) ((sdb_conn_t *)(obj)) - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* ! SDB_FRONTEND_CONNECTION_H */ - -/* vim: set tw=78 sw=4 ts=4 noexpandtab : */ -