00001 /* libIntegra multimedia module definition interface 00002 * 00003 * Copyright (C) 2007 Jamie Bullock, Henrik Frisk 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00018 * USA. 00019 */ 00020 00021 #ifndef INTEGRA_PATH_H 00022 #define INTEGRA_PATH_H 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 00029 #include <Integra/integra_error.h> 00030 #ifdef DEPRECATED 00031 00032 typedef struct ntg_node_ { 00033 00034 char *classname; 00035 char *instancename; 00036 00037 } ntg_node; 00038 #endif 00039 00040 typedef struct ntg_path_ { 00041 char **elems; 00042 int n_elems; 00043 } ntg_path; 00044 00045 00047 typedef struct ntg_node_list_ { 00048 00049 ntg_path **nodes; 00050 int n_nodes; 00051 00052 } ntg_node_list; 00053 00055 ntg_path *ntg_path_from_string(const char *path_string); 00056 00058 char *ntg_path_to_string(const ntg_path *path); 00059 00060 /* \brief pop an element from a path, returning that element as a string 00061 * a new path containing the remaining elements is pointed to by *new_path 00062 */ 00063 char *ntg_path_pop_element(const ntg_path *path, ntg_path **new_path); 00064 00065 /* \brief append an element to the end of a path 00066 */ 00067 ntg_path *ntg_path_append_element(ntg_path *path, const char *element); 00068 00069 /* \brief Join two paths to create a new path 00070 */ 00071 ntg_path *ntg_path_join(ntg_path *start, ntg_path *end); 00072 00073 00074 ntg_error_code ntg_path_validate(const ntg_path *path); 00075 00076 ntg_path *ntg_path_new(void); 00077 00078 ntg_error_code ntg_path_free(ntg_path *path); 00079 00080 #ifdef __cplusplus 00081 } 00082 #endif 00083 00084 #endif