Back to index

nordugrid-arc-nox  1.1.0~rc6
URLMap.h
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #ifndef __ARC_URLMAP_H__
00004 #define __ARC_URLMAP_H__
00005 
00006 #include <list>
00007 
00008 #include <arc/URL.h>
00009 #include <arc/Logger.h>
00010 
00011 namespace Arc {
00012 
00013   class URLMap {
00014   private:
00015     class map_entry {
00016     public:
00017       URL initial;
00018       URL replacement;
00019       URL access;
00020       map_entry() {}
00021       map_entry(const URL& templ, const URL& repl, const URL& accs = URL())
00022         : initial(templ),
00023           replacement(repl),
00024           access(accs) {}
00025     };
00026     std::list<map_entry> entries;
00027     static Logger logger;
00028   public:
00029     URLMap();
00030     ~URLMap();
00031     bool map(URL& url) const;
00032     bool local(const URL& url) const;
00033     void add(const URL& templ, const URL& repl, const URL& accs = URL());
00034   };
00035 
00036 } // namespace Arc
00037 
00038 #endif // __ARC_URLMAP_H__