00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __EDELIB_EDBUSOBJECTPATH_H__
00022 #define __EDELIB_EDBUSOBJECTPATH_H__
00023
00024 #include "String.h"
00025
00026 EDELIB_NS_BEGIN
00027
00058 class EDELIB_API EdbusObjectPath {
00059 private:
00060 String val;
00061 EdbusObjectPath& operator=(const EdbusObjectPath&);
00062
00063 public:
00067 EdbusObjectPath();
00068
00075 EdbusObjectPath(const char* str);
00076
00080 EdbusObjectPath(const EdbusObjectPath&);
00081
00085 ~EdbusObjectPath();
00086
00095 void append(const char* str);
00096
00100 void clear(void);
00101
00105 const char* path(void) const { return val.c_str(); }
00106
00112 bool operator==(const EdbusObjectPath& other) { return val == other.val; }
00113
00119 bool operator!=(const EdbusObjectPath& other) { return !operator==(other); }
00120
00127 static bool valid_element(const char* str);
00128
00135 static bool valid_path(const char* str);
00136
00144 static bool valid_path(const EdbusObjectPath& path) { return valid_path(path.path()); }
00145 };
00146
00151 inline EdbusObjectPath& operator<<(EdbusObjectPath& p, const char* el) {
00152 p.append(el);
00153 return p;
00154 }
00155
00156 EDELIB_NS_END
00157 #endif