/** * cockpit_web_response_headers: * @self: the response * @status: the HTTP status code * @reason: the HTTP reason * @length: the combined length of data blocks to follow, or -1 * * See cockpit_web_response_content() for an easy to use function. * * Queue the headers of the response. No data blocks must yet be * queued on the response. * * Specify header name/value pairs in the var args, and end with * a NULL name. If value is NULL, then that header won't be sent. * * Don't specify Content-Length or Connection headers. * * If @length is zero or greater, then it must represent the * number of queued blocks to follow. */ void cockpit_web_response_headers (CockpitWebResponse *self, guint status, const gchar *reason, gssize length, ...) { GString *string; GBytes *block; va_list va; g_return_if_fail (COCKPIT_IS_WEB_RESPONSE (self)); if (self->count > 0) { g_critical ("Headers should be sent first. This is a programmer error."); return; } string = begin_headers (self, status, reason); va_start (va, length); block = finish_headers (self, string, length, status, append_va (string, va)); va_end (va); queue_bytes (self, block); g_bytes_unref (block); }
/** Constructor. * @param format format of message */ ThreadListNotSealedException::ThreadListNotSealedException(const char *format, ...) : Exception() { va_list va; va_start(va, format); append_va(format, va); va_end(va); }
/** Constructor. * @param format message format (reason or symptom of failure) */ CannotFinalizeThreadException::CannotFinalizeThreadException(const char *format, ...) : Exception() { va_list va; va_start(va, format); append_va(format, va); va_end(va); }
/** Constructor * @param format message format, takes sprintf() parameters as variadic arguments */ UnknownTypeException::UnknownTypeException(const char *format, ...) throw() : Exception() { va_list va; va_start(va, format); append_va(format, va); va_end(va); }
/** Constructor. * @param format format of message to describe cause or symptom of failure */ CouldNotOpenConfigException::CouldNotOpenConfigException(const char *format, ...) : Exception() { va_list va; va_start(va, format); append_va(format, va); va_end(va); }
/** Constructor * @param format message format, takes sprintf() parameters as variadic arguments */ NullPointerException::NullPointerException(const char *format, ...) throw() : Exception() { va_list va; va_start(va, format); append_va(format, va); va_end(va); }
/** Constructor * @param format message format, takes sprintf() parameters as variadic arguments */ DivisionByZeroException::DivisionByZeroException(const char *format, ...) throw() : Exception() { va_list va; va_start(va, format); append_va(format, va); va_end(va); }
/** Constructor * @param format message format, takes sprintf() parameters as variadic arguments */ SyntaxErrorException::SyntaxErrorException(const char *format, ...) throw() : Exception() { va_list va; va_start(va, format); append_va(format, va); va_end(va); }
/** Constructor * @param format message format, takes sprintf() parameters as variadic arguments */ NotImplementedException::NotImplementedException(const char *format, ...) throw() : Exception() { va_list va; va_start(va, format); append_va(format, va); va_end(va); }
/** Constructor. * @param format message format, takes sprintf() parameters as variadic arguments */ AccessViolationException::AccessViolationException(const char *format, ...) throw() : Exception() { va_list va; va_start(va, format); append_va(format, va); va_end(va); }
/** Constructor. * @param format message format, takes sprintf() parameters as variadic arguments */ IllegalArgumentException::IllegalArgumentException(const char *format, ...) throw() : Exception() { va_list va; va_start(va, format); append_va(format, va); va_end(va); }
/** Constructor. * @param format message format, takes sprintf() parameters as variadic arguments */ MissingParameterException::MissingParameterException(const char *format, ...) throw() : Exception() { va_list va; va_start(va, format); append_va(format, va); va_end(va); }
/** Constructor. * @param format message format, takes sprintf() parameters as variadic arguments */ NonPointerTypeExpectedException::NonPointerTypeExpectedException(const char *format, ...) throw() : Exception() { va_list va; va_start(va, format); append_va(format, va); va_end(va); }
/** Constructor * @param format message format, takes sprintf() parameters as variadic arguments */ DestructionInProgressException::DestructionInProgressException(const char *format, ...) throw() : Exception() { va_list va; va_start(va, format); append_va(format, va); va_end(va); }