summaryrefslogtreecommitdiff
path: root/src/server/resource.h
blob: cdbb42edba4770de257a237a6c8f1ad7f132967b (plain)
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
30
31
#pragma once

#include "../liana/server.h"
#include "../portal/src/post.h"

enum {
    CAMU_RESOURCE_FILE = 0,
#ifdef NAUNET_HAS_CURL
    CAMU_RESOURCE_HTTP,
#endif
#ifdef CACHE_HAVE_CDIO
    CAMU_RESOURCE_CDIO,
#endif
#ifdef CAMU_HAVE_PORTAL
    CAMU_RESOURCE_PORTAL,
    CAMU_RESOURCE_SIMPLE_SEARCH
#endif
};

struct camu_resource {
    u8 type;
    u8 load;
    struct cch_entry *entry;
    struct lia_node *node;
    u64 duration;
    u32 ref;
    str uri;
    u32 index;
    struct camu_post *post;
    array(struct lia_list_entry *) pending;
};