00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __URL_H__
00010 #define __URL_H__
00011
00012 #include "actions.h"
00013 #include "global.h"
00014
00019 extern char **url__parm_list;
00021 extern int url__parm_list_used;
00023 extern int url__must_write_defs;
00024
00026 work_t url__work;
00027
00028
00030 int url__load_list(char *dir, int reserve_space);
00032 int url__load_nonempty_list(char *dir, int reserve_space);
00034 int url__output_list(void);
00035
00037 int url__find_by_name(const char *name, struct url_t **storage);
00039 int url__find_by_intnum(int intnum, struct url_t **storage);
00041 int url__find_by_url(char *url, struct url_t **storage);
00042
00044 int url__full_url(struct estat *sts, char **url);
00047 int url__other_full_url(struct estat *sts, struct url_t *url, char **output);
00048
00050 int url__parse(char *input, struct url_t *storage, int *def_parms);
00052 int url__open_session(svn_ra_session_t **session, char **missing_dirs);
00054 int url__find(char *url, struct url_t **output);
00055
00058 int url__current_has_precedence(struct url_t *to_compare);
00060 int url__insert_or_replace(char *eurl,
00061 struct url_t **storage,
00062 int *existed);
00064 int url__allocate(int reserve_space);
00065
00067 int url__close_session(struct url_t *cur);
00069 int url__close_sessions(void);
00070
00072 int url__mark_todo(void);
00074 int url__store_url_name(char *parm);
00076 static inline int url__to_be_handled(const struct url_t *url)
00077 {
00078 return (!url__parm_list_used) || url->to_be_handled;
00079 }
00080
00081
00084 int url__iterator2(svn_revnum_t *target_rev,
00085 int only_if_count, char **missing);
00086 static inline int url__iterator(svn_revnum_t *target_rev)
00087 {
00088 return url__iterator2(target_rev, 0, NULL);
00089 }
00090
00091
00102 static inline int url__sorter(struct url_t *u1, struct url_t *u2)
00103 {
00104 if (u1->priority == u2->priority)
00105 return strcmp(u1->url, u2->url);
00106 else
00107 return u1->priority - u2->priority;
00108 }
00109
00111 int url__indir_sorter(const void *a, const void *b);
00112
00113
00116 int url__canonical_rev( struct url_t *url, svn_revnum_t *rev);
00117
00118 #endif