src/resource_id.h
author Krista Bennett <krista@pep-project.org>
Wed, 21 Jun 2017 13:43:55 +0200
branchENGINE-9
changeset 1881 facb0b5b0bce
parent 1880 e2c2680bba23
child 4792 7056435ab9e7
permissions -rw-r--r--
ENGINE-9: moved build_uri to the resource_id files
     1 // This file is under GNU General Public License 3.0
     2 // see LICENSE.txt
     3 
     4 #pragma once
     5 
     6 /* structs to contain info about parsed resource ids (filenames, uids) */
     7 typedef enum _resource_id_type {
     8     PEP_RID_FILENAME,
     9     PEP_RID_CID
    10 } pEp_resource_id_type;
    11 
    12 typedef struct pEp_rid_list_t pEp_rid_list_t;
    13 
    14 struct pEp_rid_list_t {
    15     pEp_resource_id_type rid_type;
    16     char* rid;
    17     pEp_rid_list_t* next;    
    18 };
    19 
    20 pEp_rid_list_t* new_rid_node(pEp_resource_id_type type, const char* resource);
    21 
    22 void free_rid_list(pEp_rid_list_t* list);
    23 
    24 pEp_rid_list_t* parse_uri(const char* uri);
    25 
    26 char* build_uri(const char* uri_prefix, const char* resource);
    27 
    28 const char* get_resource_ptr_noown(const char* uri);
    29 
    30 char* get_resource(char* uri);
    31 
    32 bool is_file_uri(char* str);
    33 
    34 bool is_cid_uri(const char* str);