diff options
author | minfrin <minfrin@13f79535-47bb-0310-9956-ffa450edef68> | 2007-11-24 16:23:19 +0000 |
---|---|---|
committer | minfrin <minfrin@13f79535-47bb-0310-9956-ffa450edef68> | 2007-11-24 16:23:19 +0000 |
commit | 45ed5ad814a89f170aae62d993c7a697213ef8ec (patch) | |
tree | acd3232b6cc4141050663ef33dc0c25e9fba8d1b /include | |
parent | 4fb2772267f271c6985fd8f0d739e29293aa9c7c (diff) | |
download | libapr-util-45ed5ad814a89f170aae62d993c7a697213ef8ec.tar.gz |
Drop the @fn declarations. Provide variable names in the function
declarations. No functional change.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@597873 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/apr_ssl.h | 124 |
1 files changed, 34 insertions, 90 deletions
diff --git a/include/apr_ssl.h b/include/apr_ssl.h index 99ab9bde..571fabf7 100644 --- a/include/apr_ssl.h +++ b/include/apr_ssl.h @@ -58,12 +58,6 @@ typedef struct apr_ssl_factory apr_ssl_factory_t; typedef struct apr_ssl_socket apr_ssl_socket_t; /** - * @fn apr_status_t apr_ssl_factory_create(apr_ssl_factory_t **newFactory, - const char *privateKeyFilename, - const char *certificateFilename, - const char *digestTypeToUse, - apr_ssl_factory_type_e purpose, - apr_pool_t *pool) * @brief Attempts to create an SSL "factory". The "factory" is then * used to create sockets. * @param newFactory The newly created factory @@ -75,14 +69,13 @@ typedef struct apr_ssl_socket apr_ssl_socket_t; * @param pool The pool to use for memory allocations * @return an APR_ status code */ -APU_DECLARE(apr_status_t) apr_ssl_factory_create(apr_ssl_factory_t **, - const char *, const char *, - const char *, - apr_ssl_factory_type_e, - apr_pool_t *); +APU_DECLARE(apr_status_t) apr_ssl_factory_create(apr_ssl_factory_t **f, + const char *k, const char *c, + const char *d, + apr_ssl_factory_type_e purpose, + apr_pool_t *p); /** - * @fn const char * apr_ssl_library_name(void) * @brief Return the name of the library or underlying SSL * implementation in use. * @return NULL in case of no SSL support. @@ -90,12 +83,6 @@ APU_DECLARE(apr_status_t) apr_ssl_factory_create(apr_ssl_factory_t **, APU_DECLARE(const char *) apr_ssl_library_name(void); /** - * @fn apr_status_t apr_ssl_socket_create(apr_ssl_socket_t **newSock, - int family, - int type, - int protocol, - apr_ssl_factory_t *factory, - apr_pool_t *pool) * @brief Create an ssl socket. * @param newSock The new socket that has been set up. * @param family The address family of the socket (e.g., APR_INET). @@ -106,33 +93,28 @@ APU_DECLARE(const char *) apr_ssl_library_name(void); * @return APR_SUCCESS on succesful creation. * @see apr_socket_create */ -APU_DECLARE(apr_status_t) apr_ssl_socket_create(apr_ssl_socket_t **, - int, int, int, - apr_ssl_factory_t *, - apr_pool_t *); +APU_DECLARE(apr_status_t) apr_ssl_socket_create(apr_ssl_socket_t **s, + int family, int type, int proto, + apr_ssl_factory_t *f, + apr_pool_t *p); + /** - * @fn apr_status_t apr_ssl_socket_close(apr_ssl_socket_t *sock) * @brief Close a socket. This terminates the SSL connections as well * as closing the system socket. * @param sock The socket to close */ -APU_DECLARE(apr_status_t) apr_ssl_socket_close(apr_ssl_socket_t *); +APU_DECLARE(apr_status_t) apr_ssl_socket_close(apr_ssl_socket_t *sock); /** - * @fn apr_status_t apr_ssl_socket_connect(apr_ssl_socket_t *sock, - apr_sockaddr_t *sa) * @brief Try and connect the provided SSL socket with the socket * described by the provided address. * @param sock The SSL socket we wish to use for our side of the connection * @param sa The address we wish to connect to. */ -APU_DECLARE(apr_status_t) apr_ssl_socket_connect(apr_ssl_socket_t *, - apr_sockaddr_t *); +APU_DECLARE(apr_status_t) apr_ssl_socket_connect(apr_ssl_socket_t *sock, + apr_sockaddr_t *sa); /** - * @fn apr_status_t apr_ssl_socket_send(apr_ssl_socket_t *sock, - const char *buf, - apr_size_t *len) * @brief Try and send data over the SSL connection. * @param sock The socket to send the data over. * @param buf The buffer which contains the data to be sent. @@ -151,15 +133,11 @@ APU_DECLARE(apr_status_t) apr_ssl_socket_connect(apr_ssl_socket_t *, * APR_EINTR is never returned. * </PRE> */ -APU_DECLARE(apr_status_t) apr_ssl_socket_send(apr_ssl_socket_t *, - const char *, - apr_size_t *); +APU_DECLARE(apr_status_t) apr_ssl_socket_send(apr_ssl_socket_t *sock, + const char *buf, + apr_size_t *len); /** - * @fn apr_status_t apr_ssl_socket_recv(apr_ssl_socket_t *sock, - char *buf, - apr_size_t *len); - * @brief Read data from the SSL connection. * @param sock The socket to read the data from. * @param buf The buffer to store the data in. @@ -178,25 +156,22 @@ APU_DECLARE(apr_status_t) apr_ssl_socket_send(apr_ssl_socket_t *, * APR_EINTR is never returned. * </PRE> */ -APU_DECLARE(apr_status_t) apr_ssl_socket_recv(apr_ssl_socket_t *, - char *, apr_size_t *); +APU_DECLARE(apr_status_t) apr_ssl_socket_recv(apr_ssl_socket_t *sock, + char *buf, apr_size_t *len); /** * @see apr_socket_bind */ -APU_DECLARE(apr_status_t) apr_ssl_socket_bind(apr_ssl_socket_t *, - apr_sockaddr_t *); +APU_DECLARE(apr_status_t) apr_ssl_socket_bind(apr_ssl_socket_t *sock, + apr_sockaddr_t *sa); /** * @see apr_socket_listen */ -APU_DECLARE(apr_status_t) apr_ssl_socket_listen(apr_ssl_socket_t *, - apr_int32_t); +APU_DECLARE(apr_status_t) apr_ssl_socket_listen(apr_ssl_socket_t *sock, + apr_int32_t port); /** - * @fn apr_status_t apr_ssl_socket_accept(apr_ssl_socket_t **newSock, - apr_ssl_socket_t *sock, - apr_pool_t *pool) * @brief Accept a new connection request on an SSL socket. This creates * and returns a new SSL enabled socket. The enw socket will * "belong" to the same factory that created the original socket. @@ -206,43 +181,37 @@ APU_DECLARE(apr_status_t) apr_ssl_socket_listen(apr_ssl_socket_t *, * @param sock The socket we are listening on. * @param pool The pool for the new socket. */ -APU_DECLARE(apr_status_t) apr_ssl_socket_accept(apr_ssl_socket_t **, - apr_ssl_socket_t *, - apr_pool_t *); +APU_DECLARE(apr_status_t) apr_ssl_socket_accept(apr_ssl_socket_t **newSock, + apr_ssl_socket_t *sock, + apr_pool_t *p); /** - * @fn apr_status_t apr_ssl_socket_raw_error(apr_ssl_socket_t *sock) * @brief Return the error code from the underlying SSL implementation. * @note This is provided for completeness. Return values are specific * to the underlying implentation, so this should nt be used if * platform independance is desired. * @param sock The socket to report the error for. */ -APU_DECLARE(apr_status_t) apr_ssl_socket_raw_error(apr_ssl_socket_t *); +APU_DECLARE(apr_status_t) apr_ssl_socket_raw_error(apr_ssl_socket_t *sock); /** - * @fn apr_status_t apr_pollset_add_ssl_socket(apr_pollset_t *pollset, - apr_ssl_socket_t *sock) * @brief Add an ssl socket to a pollset. * @param pollset The pollset to add the socket to. * @param sock The ssl socket to add. * @note This function adds the socket with APR_POLLIN and APR_POLLOUT * set. */ -APU_DECLARE(apr_status_t) apr_pollset_add_ssl_socket(apr_pollset_t *, - apr_ssl_socket_t *); +APU_DECLARE(apr_status_t) apr_pollset_add_ssl_socket(apr_pollset_t *pollset, + apr_ssl_socket_t *sock); /** - * @fn apr_status_t apr_pollset_remove_ssl_socket(apr_ssl_socket_t *sock) * @brief Remove the ssl socket from it's pollset. * @param sock The ssl socket to remove. */ -APU_DECLARE(apr_status_t) apr_pollset_remove_ssl_socket(apr_ssl_socket_t *); +APU_DECLARE(apr_status_t) apr_pollset_remove_ssl_socket(apr_ssl_socket_t *sock); /** - * @fn apr_status_t apr_ssl_socket_set_poll_events(apr_ssl_socket_t *sock, - apr_int16_t events) * @brief Set the required events for a socket. * @note These will be used when apr_pollset_poll is next called for the * pollset the socket is currently attached to. @@ -251,9 +220,8 @@ APU_DECLARE(apr_status_t) apr_pollset_remove_ssl_socket(apr_ssl_socket_t *); * @return APR_SUCCESS if change made. Returns EINVAL if socket is not * attached to a pollset. */ -APU_DECLARE(apr_status_t) apr_ssl_socket_set_poll_events(apr_ssl_socket_t *, - apr_int16_t); - +APU_DECLARE(apr_status_t) apr_ssl_socket_set_poll_events(apr_ssl_socket_t *sock, + apr_int16_t events); /** @@ -292,15 +260,6 @@ typedef struct apu_evp_factory apr_evp_factory_t; typedef struct apu_evp_crypt apr_evp_crypt_t; /** - * @fn apr_status_t apr_evp_factory_create(apr_evp_factory_t **newFactory, - const char *privateKeyFilename, - const char *certificateFilename, - const char *cipherName, - const char *passphrase, - const char *engine, - const char *digest, - apr_evp_factory_type_e purpose, - apr_pool_t *pool) * @brief Attempts to create an EVP "factory". The "factory" is then * used to create contexts to keep track of encryption. * @param newFactory The newly created factory @@ -326,11 +285,6 @@ APU_DECLARE(apr_status_t) apr_evp_factory_create(apr_evp_factory_t **newFactory, apr_pool_t *pool); /** - * @fn apr_status_t apr_evp_crypt_init(apr_evp_factory_t *, - * apr_evp_crypt_t **e, - * apr_evp_crypt_type_e type, - * apr_evp_crypt_key_e key, - * apr_pool_t *p) * @brief Initialise a context for encrypting arbitrary data. * @note If *e is NULL, a apr_evp_crypt_t will be created from a pool. If * *e is not NULL, *e must point at a previously created structure. @@ -342,18 +296,13 @@ APU_DECLARE(apr_status_t) apr_evp_factory_create(apr_evp_factory_t **newFactory, * @return APR_EINIT if initialisation unsuccessful. Returns * APR_ENOTIMPL if not supported. */ -APR_DECLARE(apr_status_t) apr_evp_crypt_init(apr_evp_factory_t *, +APR_DECLARE(apr_status_t) apr_evp_crypt_init(apr_evp_factory_t *f, apr_evp_crypt_t **e, apr_evp_crypt_type_e type, apr_evp_crypt_key_e key, apr_pool_t *p); /** - * @fn apr_status_t apr_evp_crypt(apr_evp_crypt_t *evp, - * unsigned char *out, - * apr_size_t *outlen, - * const unsigned char *in, - * apr_size_t inlen) * @brief Encrypt/decrypt data provided by in, write it to out. * @note The number of bytes written will be written to outlen. If * out is NULL, outlen will contain the maximum size of the @@ -367,16 +316,13 @@ APR_DECLARE(apr_status_t) apr_evp_crypt_init(apr_evp_factory_t *, * @return APR_EGENERAL if an error occurred. Returns APR_ENOTIMPL if * not supported. */ -APR_DECLARE(apr_status_t) apr_evp_crypt(apr_evp_crypt_t *, +APR_DECLARE(apr_status_t) apr_evp_crypt(apr_evp_crypt_t *evp, unsigned char **out, apr_size_t *outlen, const unsigned char *in, apr_size_t inlen); /** - * @fn apr_status_t apr_evp_crypt_finish(apr_evp_crypt_t *, - * unsigned char *out, - * apr_size_t *outlen) * @brief Encrypt final data block, write it to out. * @note If necessary the final block will be written out after being * padded. After this call, the context is cleaned and can be @@ -387,13 +333,12 @@ APR_DECLARE(apr_status_t) apr_evp_crypt(apr_evp_crypt_t *, * @return APR_EGENERAL if an error occurred. Returns APR_ENOTIMPL if * not supported. */ -APR_DECLARE(apr_status_t) apr_evp_crypt_finish(apr_evp_crypt_t *e, +APR_DECLARE(apr_status_t) apr_evp_crypt_finish(apr_evp_crypt_t *evp, unsigned char *out, apr_size_t *outlen); /** - * @fn apr_status_t apr_evp_crypt_cleanup(apr_evp_crypt_t *e) * @brief Clean encryption / decryption context. * @note After cleanup, a context is free to be reused if necessary. * @param evp The evp context to use. @@ -402,7 +347,6 @@ APR_DECLARE(apr_status_t) apr_evp_crypt_finish(apr_evp_crypt_t *e, APR_DECLARE(apr_status_t) apr_evp_crypt_cleanup(apr_evp_crypt_t *e); /** - * @fn apr_status_t apr_evp_factory_cleanup(apr_evp_factory_t *f) * @brief Clean encryption / decryption factory. * @note After cleanup, a factory is free to be reused if necessary. * @param f The factory to use. |