cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

interpret.h (1744B)


      1/*
      2 * Licensed to the Apache Software Foundation (ASF) under one
      3 * or more contributor license agreements.  See the NOTICE file
      4 * distributed with this work for additional information
      5 * regarding copyright ownership.  The ASF licenses this file
      6 * to you under the Apache License, Version 2.0 (the
      7 * "License"); you may not use this file except in compliance
      8 * with the License.  You may obtain a copy of the License at
      9 *
     10 *   http://www.apache.org/licenses/LICENSE-2.0
     11 *
     12 * Unless required by applicable law or agreed to in writing,
     13 * software distributed under the License is distributed on an
     14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     15 * KIND, either express or implied.  See the License for the
     16 * specific language governing permissions and limitations
     17 * under the License.
     18 */
     19
     20#ifndef GUACLOG_INTERPRET_H
     21#define GUACLOG_INTERPRET_H
     22
     23#include "config.h"
     24
     25#include <stdbool.h>
     26
     27/**
     28 * Interprets all input events within the given Guacamole protocol dump,
     29 * producing a human-readable log of those input events. A read lock will be
     30 * acquired on the input file to ensure that in-progress logs are not
     31 * interpreted. This behavior can be overridden by specifying true for the
     32 * force parameter.
     33 *
     34 * @param path
     35 *     The path to the file containing the raw Guacamole protocol dump.
     36 *
     37 * @param out_path
     38 *     The full path to the file in which interpreted log should be written.
     39 *
     40 * @param force
     41 *     Interpret even if the input file appears to be an in-progress log (has
     42 *     an associated lock).
     43 *
     44 * @return
     45 *     Zero on success, non-zero if an error prevented successful
     46 *     interpretation of the log.
     47 */
     48int guaclog_interpret(const char* path, const char* out_path, bool force);
     49
     50#endif
     51