summaryrefslogtreecommitdiff
path: root/server/server/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/server/config.h')
-rwxr-xr-xserver/server/config.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/server/server/config.h b/server/server/config.h
index 9b15208..40f5985 100755
--- a/server/server/config.h
+++ b/server/server/config.h
@@ -18,6 +18,24 @@ public:
proxy_type type;
proxy_entry_base(): port(0), speed(0), type(UNKNOWN)
{}
+ bool operator==(const proxy_entry_base& e)
+ {
+ if(host != e.host)
+ return false;
+ if(login != e.login)
+ return false;
+ if(password != e.password)
+ return false;
+ if(port != e.port)
+ return false;
+ if(type != e.type)
+ return false;
+ return true;
+ }
+ bool operator!=(const proxy_entry_base& e)
+ {
+ return !((*this) == e);
+ }
};
struct proxy_entry : public proxy_entry_base
{
@@ -33,6 +51,18 @@ public:
city = city_;
type = t;
}
+ bool operator==(const proxy_entry& e)
+ {
+ if((proxy_entry_base)(*this) != (proxy_entry_base)e)
+ return false;
+ if(country != e.country)
+ return false;
+ if(state != e.state)
+ return false;
+ if(city != e.city)
+ return false;
+ return true;
+ }
};
struct static_proxy_entry : public proxy_entry_base
@@ -51,6 +81,16 @@ public:
position = position_;
type = t;
}
+ bool operator==(const static_proxy_entry& e)
+ {
+ if((proxy_entry_base)(*this) != (proxy_entry_base)e)
+ return false;
+ if(position != e.position)
+ return false;
+ if(label != e.label)
+ return false;
+ return true;
+ }
};
struct s_i