107 lines
2.0 KiB
C
107 lines
2.0 KiB
C
/******************************************************************************
|
|
*
|
|
* Copyright (c) 2017-2019 by Löwenware Ltd
|
|
* Please, refer LICENSE file for legal information
|
|
*
|
|
******************************************************************************/
|
|
|
|
/**
|
|
* @file aisl/stream.h
|
|
* @author Ilja Kartašov <ik@lowenware.com>
|
|
* @brief Declarations of #AislStream functions
|
|
*
|
|
* @see https://lowenware.com/aisl/
|
|
*/
|
|
#ifndef AISL_STREAM_H_4D8EB622_3CE0_4F1B_AC1F_B27CCB5C2EDC
|
|
#define AISL_STREAM_H_4D8EB622_3CE0_4F1B_AC1F_B27CCB5C2EDC
|
|
|
|
#include <stdint.h>
|
|
#include <stdarg.h>
|
|
#include <aisl/types.h>
|
|
|
|
|
|
bool
|
|
aisl_is_secure(AislStream stream);
|
|
|
|
|
|
AislClient
|
|
aisl_get_client(AislStream stream);
|
|
|
|
|
|
AislServer
|
|
aisl_get_server(AislStream stream);
|
|
|
|
|
|
AislHttpVersion
|
|
aisl_get_http_version(AislStream stream);
|
|
|
|
|
|
AislInstance
|
|
aisl_stream_get_instance(AislStream s);
|
|
|
|
|
|
void *
|
|
aisl_get_context(AislStream stream);
|
|
|
|
|
|
void
|
|
aisl_set_context(AislStream stream, void *context);
|
|
|
|
|
|
AislStatus
|
|
aisl_flush(AislStream stream);
|
|
|
|
|
|
void
|
|
aisl_reject(AislStream stream);
|
|
|
|
|
|
AislStatus
|
|
aisl_response(AislStream stream,
|
|
AislHttpResponse status_code,
|
|
uint64_t content_length);
|
|
|
|
|
|
int
|
|
aisl_header(AislStream stream, const char *key, const char *value );
|
|
|
|
|
|
int
|
|
aisl_header_printf(AislStream stream,
|
|
const char *key,
|
|
const char *format,
|
|
... );
|
|
|
|
|
|
int
|
|
aisl_header_vprintf(AislStream stream,
|
|
const char *key,
|
|
const char *format,
|
|
va_list args );
|
|
|
|
|
|
int
|
|
aisl_printf(AislStream stream, const char *format, ...);
|
|
|
|
|
|
int
|
|
aisl_vprintf(AislStream stream, const char *format, va_list args);
|
|
|
|
|
|
int
|
|
aisl_write(AislStream stream, const char *data, int d_len);
|
|
|
|
|
|
int
|
|
aisl_puts(const char *str_data, AislStream stream);
|
|
|
|
|
|
void
|
|
aisl_set_output_event(AislStream stream, bool value);
|
|
|
|
|
|
bool
|
|
aisl_get_output_event(AislStream stream);
|
|
|
|
#endif /* !AISL_STREAM_H */
|