~ruther/CTU-FEE-B0B35APO-Semestral-project

ref: 09a0ff694baeea75fc65cba40e9350a89eae81d9 CTU-FEE-B0B35APO-Semestral-project/file-browser/include/file_open.h -rw-r--r-- 541 bytes
09a0ff69 — František Boháček feat: add pheripherals usage to file browser 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef __FILE_OPEN_H__
#define __FILE_OPEN_H__

#include <stdbool.h>
#include "file_access.h"
#include "options.h"

typedef enum {
  OPENED_NONE,
  OPENED_MIME,
  OPENED_EXEC,
  OPENED_TEXT,
} opened_type_t;

typedef struct {
  opened_type_t type;

  bool executed;
  bool ended_with_error;

  file_operation_error_t error;

  executing_file_t executing_file;
} opened_file_state_t;

opened_file_state_t file_open(file_t *file, exec_options_t *options,
                                 fileaccess_state_t state);

#endif // __FILE_OPEN_H__