diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-03-03 15:17:01 +0000 | 
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-03-03 16:06:38 +0000 | 
| commit | 7ab8d0b50a230567c3b2ae965ab535500a3e6d3b (patch) | |
| tree | c18f07ec2440e6af214b56f02d71fc46edc8995b | |
| parent | Env import can be const now (diff) | |
| download | icespider-7ab8d0b50a230567c3b2ae965ab535500a3e6d3b.tar.bz2 icespider-7ab8d0b50a230567c3b2ae965ab535500a3e6d3b.tar.xz icespider-7ab8d0b50a230567c3b2ae965ab535500a3e6d3b.zip | |
ICE components can be local... exception the session manager interface
| -rw-r--r-- | icespider/common/http.ice | 12 | ||||
| -rw-r--r-- | icespider/common/routes.ice | 24 | ||||
| -rw-r--r-- | icespider/core/exceptions.h | 2 | 
3 files changed, 19 insertions, 19 deletions
| diff --git a/icespider/common/http.ice b/icespider/common/http.ice index fa85f02..1f7dcd4 100644 --- a/icespider/common/http.ice +++ b/icespider/common/http.ice @@ -3,34 +3,34 @@  module IceSpider {  	["slicer:ignore"] -	exception HttpException { +	local exception HttpException {  		int code;  		string message;  	}; -	enum HttpMethod { +	local enum HttpMethod {  		GET, HEAD, POST, PUT, DELETE, OPTIONS  	}; -	enum ParameterSource { +	local enum ParameterSource {  		URL, Body, QueryString, Header, Cookie  	};  	["slicer:ignore"] -	struct MimeType { +	local struct MimeType {  		string group;  		string type;  	};  	["slicer:ignore"] -	class Accept { +	local class Accept {  		optional(0) string group;  		optional(1) string type;  		float q = 1.0;  	};  	["slicer:json:object"] -	dictionary<string, string> StringMap; +	local dictionary<string, string> StringMap;  };  #endif diff --git a/icespider/common/routes.ice b/icespider/common/routes.ice index 8a40831..4a3d460 100644 --- a/icespider/common/routes.ice +++ b/icespider/common/routes.ice @@ -4,9 +4,9 @@  #include "http.ice"  module IceSpider { -	sequence<string> StringSeq; +	local sequence<string> StringSeq; -	class Parameter { +	local class Parameter {  		ParameterSource source = URL;  		optional(0) string key;  		bool isOptional = false; @@ -19,25 +19,25 @@ module IceSpider {  	};  	["slicer:json:object"] -	dictionary<string, Parameter> Parameters; +	local dictionary<string, Parameter> Parameters; -	class OutputSerializer { +	local class OutputSerializer {  		string serializer;  		StringSeq params;  	};  	["slicer:json:object"] -	dictionary<string, OutputSerializer> OutputSerializers; +	local dictionary<string, OutputSerializer> OutputSerializers; -	class Operation { +	local class Operation {  		string operation;  		StringMap paramOverrides;  	};  	["slicer:json:object"] -	dictionary<string, Operation> Operations; +	local dictionary<string, Operation> Operations; -	class Route { +	local class Route {  		string path;  		HttpMethod method = GET;  		optional(0) string operation; @@ -50,17 +50,17 @@ module IceSpider {  	};  	["slicer:json:object"] -	dictionary<string, Route> Routes; +	local dictionary<string, Route> Routes; -	class RouteBase { +	local class RouteBase {  		StringSeq proxies;  		StringSeq functions;  	};  	["slicer:json:object"] -	dictionary<string, RouteBase> RouteBases; +	local dictionary<string, RouteBase> RouteBases; -	class RouteConfiguration { +	local class RouteConfiguration {  		string name;  		Routes routes;  		RouteBases routeBases; diff --git a/icespider/core/exceptions.h b/icespider/core/exceptions.h index 38df81b..c5076aa 100644 --- a/icespider/core/exceptions.h +++ b/icespider/core/exceptions.h @@ -12,7 +12,7 @@  			static const std::string message; \  	}  #define DefineHttpEx(Name, Code, Message) \ -	Name::Name() : ::IceSpider::HttpException(code, message) { } \ +	Name::Name() : ::IceSpider::HttpException(__FILE__, __LINE__, code, message) { } \  	const int Name::code(Code); \  	const std::string Name::message(Message); | 
