Soletta™ Framework
|
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <getopt.h>
#include "soletta.h"
#include "sol-buffer.h"
#include "sol-file-reader.h"
#include "sol-str-table.h"
#include "sol-message-digest.h"
#include "sol-util.h"
Data Structures | |
struct | entry |
Enumerations | |
enum | log_level { LOG_LEVEL_DEFAULT = 0, LOG_LEVEL_QUIET, LOG_LEVEL_STATUS } |
Functions | |
static int | check_file (const char *filename) |
static int | check_stdin (void) |
static void | entry_del (struct entry *entry) |
static struct entry * | entry_new (const char *filename) |
static int | fd_set_flag (int fd, int flag) |
static int | hash_file (const char *filename) |
static int | hash_stdin (void) |
static bool | on_stdin_hash (void *data, int fd, uint32_t flags) |
static int | process_input (const char *filename) |
static int | process_stdin (void) |
static void | shutdown (void) |
SOL_MAIN_DEFAULT (startup, shutdown) | |
static void | startup (void) |
static void | store_digest (void *data, struct sol_message_digest *handle, struct sol_blob *digest) |
Variables | |
static const char | algorithm [] = "sha256" |
static bool | checking = false |
static bool | checking_strict = false |
static bool | checking_warn = false |
static struct sol_ptr_vector | entries = SOL_PTR_VECTOR_INIT |
static enum log_level | log_level = LOG_LEVEL_DEFAULT |
static uint32_t | pending |
static const char | stdin_filename [] = "-" |
static struct sol_fd * | stdin_watch |
enum log_level |
|
static |
Referenced by process_input().
|
static |
Referenced by process_stdin().
|
static |
References entry::digest, entry::filename, entry::md, sol_buffer_fini(), and sol_message_digest_del().
Referenced by hash_file(), hash_stdin(), and shutdown().
|
static |
References algorithm, sol_message_digest_config::api_version, sol_message_digest_config::data, entry::digest, entry::filename, entry::md, sol_buffer_init(), SOL_MESSAGE_DIGEST_CONFIG_API_VERSION, sol_message_digest_new(), SOL_SET_API_VERSION, and store_digest().
Referenced by hash_file(), and hash_stdin().
|
static |
Referenced by hash_stdin().
|
static |
References entry_del(), entry_new(), entry::md, pending, sol_blob_unref(), sol_file_reader_open(), sol_file_reader_to_blob(), sol_message_digest_feed(), and sol_ptr_vector_append().
Referenced by process_input().
|
static |
References entry_del(), entry_new(), fd_set_flag(), on_stdin_hash(), pending, sol_ptr_vector_append(), stdin_filename, and stdin_watch.
Referenced by process_stdin().
|
static |
References entry::md, sol_blob::mem, sol_blob::size, sol_blob_new(), SOL_BLOB_TYPE_DEFAULT, sol_blob_unref(), sol_message_digest_feed(), sol_quit_with_code(), sol_util_strerrora, and stdin_watch.
Referenced by hash_stdin().
|
static |
References check_file(), checking, hash_file(), process_stdin(), and stdin_filename.
Referenced by startup().
|
static |
References check_stdin(), checking, and hash_stdin().
Referenced by process_input().
|
static |
References checking, sol_buffer::data, entry::digest, entry_del(), entry::filename, sol_ptr_vector_clear(), and SOL_PTR_VECTOR_FOREACH_IDX.
|
static |
|
static |
References entry::digest, pending, sol_buffer_append_as_base16(), sol_quit(), and sol_str_slice_from_blob().
Referenced by entry_new().
|
static |
Referenced by entry_new(), and startup().
|
static |
Referenced by process_input(), process_stdin(), shutdown(), and startup().
|
static |
Referenced by startup().
|
static |
Referenced by startup().
|
static |
|
static |
|
static |
Referenced by hash_file(), hash_stdin(), startup(), and store_digest().
|
static |
Referenced by hash_stdin(), process_input(), and startup().
|
static |
Referenced by hash_stdin(), and on_stdin_hash().