src/resource_id.h
branchENGINE-9
changeset 1880 e2c2680bba23
child 1881 facb0b5b0bce
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/resource_id.h	Wed Jun 21 13:20:50 2017 +0200
     1.3 @@ -0,0 +1,32 @@
     1.4 +// This file is under GNU General Public License 3.0
     1.5 +// see LICENSE.txt
     1.6 +
     1.7 +#pragma once
     1.8 +
     1.9 +/* structs to contain info about parsed resource ids (filenames, uids) */
    1.10 +typedef enum _resource_id_type {
    1.11 +    PEP_RID_FILENAME,
    1.12 +    PEP_RID_CID
    1.13 +} pEp_resource_id_type;
    1.14 +
    1.15 +typedef struct pEp_rid_list_t pEp_rid_list_t;
    1.16 +
    1.17 +struct pEp_rid_list_t {
    1.18 +    pEp_resource_id_type rid_type;
    1.19 +    char* rid;
    1.20 +    pEp_rid_list_t* next;    
    1.21 +};
    1.22 +
    1.23 +pEp_rid_list_t* new_rid_node(pEp_resource_id_type type, const char* resource);
    1.24 +
    1.25 +void free_rid_list(pEp_rid_list_t* list);
    1.26 +
    1.27 +pEp_rid_list_t* parse_uri(const char* uri);
    1.28 +
    1.29 +const char* get_resource_ptr_noown(const char* uri);
    1.30 +
    1.31 +char* get_resource(char* uri);
    1.32 +
    1.33 +bool is_file_uri(char* str);
    1.34 +
    1.35 +bool is_cid_uri(const char* str);