Blame


1 1fce2e75 2021-08-14 op /*
2 1fce2e75 2021-08-14 op * Copyright (c) 2021 Omar Polo <op@omarpolo.com>
3 1fce2e75 2021-08-14 op *
4 1fce2e75 2021-08-14 op * Permission to use, copy, modify, and distribute this software for any
5 1fce2e75 2021-08-14 op * purpose with or without fee is hereby granted, provided that the above
6 1fce2e75 2021-08-14 op * copyright notice and this permission notice appear in all copies.
7 1fce2e75 2021-08-14 op *
8 1fce2e75 2021-08-14 op * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 1fce2e75 2021-08-14 op * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 1fce2e75 2021-08-14 op * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 1fce2e75 2021-08-14 op * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 1fce2e75 2021-08-14 op * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 1fce2e75 2021-08-14 op * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 1fce2e75 2021-08-14 op * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 1fce2e75 2021-08-14 op */
16 1fce2e75 2021-08-14 op
17 1fce2e75 2021-08-14 op #ifndef SESSION_H
18 1fce2e75 2021-08-14 op #define SESSION_H
19 1fce2e75 2021-08-14 op
20 1fce2e75 2021-08-14 op #include "telescope.h"
21 1fce2e75 2021-08-14 op
22 eb9cbcba 2022-01-03 op struct session_tab {
23 eb9cbcba 2022-01-03 op uint32_t flags;
24 eb9cbcba 2022-01-03 op char uri[GEMINI_URL_LEN];
25 eb9cbcba 2022-01-03 op char title[TITLE_MAX];
26 eb9cbcba 2022-01-03 op };
27 eb9cbcba 2022-01-03 op
28 eb9cbcba 2022-01-03 op struct session_tab_hist {
29 eb9cbcba 2022-01-03 op char uri[GEMINI_URL_LEN];
30 eb9cbcba 2022-01-03 op int future;
31 eb9cbcba 2022-01-03 op };
32 eb9cbcba 2022-01-03 op
33 1fce2e75 2021-08-14 op void switch_to_tab(struct tab *);
34 1fce2e75 2021-08-14 op unsigned int tab_new_id(void);
35 1fce2e75 2021-08-14 op struct tab *new_tab(const char *, const char *base, struct tab *);
36 05de8ac3 2022-01-06 op void kill_tab(struct tab *, int);
37 6c74799d 2022-01-05 op struct tab *unkill_tab(void);
38 1fce2e75 2021-08-14 op void free_tab(struct tab *);
39 1fce2e75 2021-08-14 op void stop_tab(struct tab*);
40 1fce2e75 2021-08-14 op
41 1fce2e75 2021-08-14 op void save_session(void);
42 1fce2e75 2021-08-14 op
43 1fce2e75 2021-08-14 op void autosave_init(void);
44 1fce2e75 2021-08-14 op void autosave_timer(int, short, void *);
45 1fce2e75 2021-08-14 op void autosave_hook(void);
46 1fce2e75 2021-08-14 op
47 1fce2e75 2021-08-14 op #endif