src/resource_id.h
author Krista Bennett <krista@pep-project.org>
Wed, 21 Jun 2017 13:20:50 +0200
branchENGINE-9
changeset 1880 e2c2680bba23
child 1881 facb0b5b0bce
permissions -rw-r--r--
ENGINE-9: forgot to add resource_id.*
     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 const char* get_resource_ptr_noown(const char* uri);
    27 
    28 char* get_resource(char* uri);
    29 
    30 bool is_file_uri(char* str);
    31 
    32 bool is_cid_uri(const char* str);