updated to the new Pikotools api (new Space struct)
This commit is contained in:
@@ -46,7 +46,6 @@
|
||||
#include "templates/htmltextstream.h"
|
||||
#include "date/date.h"
|
||||
#include "space/space.h"
|
||||
#include "space/spacetojson.h"
|
||||
#include "textstream/textstream.h"
|
||||
#include "outstreams.h"
|
||||
|
||||
@@ -308,11 +307,6 @@ struct Request
|
||||
// additional info added when sending the JSON answer
|
||||
PT::Space info;
|
||||
|
||||
// info serializer
|
||||
// if not set then the json_generic_serializer from App will be used
|
||||
// default: null (json_generic_serializer used)
|
||||
PT::SpaceToJSON * info_serializer;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -392,10 +386,10 @@ struct Request
|
||||
// value - cookie value (can be everything which can be put to PT::WTextStream stream)
|
||||
// the return std::wstring reference is a reference to the cookie inserted value (in out_cookies structure)
|
||||
template<typename NameType, typename ValueType>
|
||||
std::wstring & AddCookie(const NameType & name, const ValueType & value, PT::Date * expires = 0);
|
||||
void AddCookie(const NameType & name, const ValueType & value, PT::Date * expires = 0);
|
||||
|
||||
template<typename NameType, typename ValueType>
|
||||
std::wstring & AddCookie(const NameType & name, const ValueType & value, PT::Date & expires);
|
||||
void AddCookie(const NameType & name, const ValueType & value, PT::Date & expires);
|
||||
|
||||
|
||||
|
||||
@@ -415,9 +409,9 @@ private:
|
||||
|
||||
|
||||
template<typename NameType, typename ValueType>
|
||||
std::wstring & Request::AddCookie(const NameType & name, const ValueType & value, PT::Date * expires)
|
||||
void Request::AddCookie(const NameType & name, const ValueType & value, PT::Date * expires)
|
||||
{
|
||||
PT::WTextStream cookie;
|
||||
PT::WTextStream cookie;
|
||||
|
||||
cookie << value;
|
||||
|
||||
@@ -439,14 +433,14 @@ PT::WTextStream cookie;
|
||||
will be lost (the session cookie will be overwritten in the client's browser)
|
||||
*/
|
||||
|
||||
return out_cookies.Add(name, cookie);
|
||||
out_cookies.add_stream(name, cookie);
|
||||
}
|
||||
|
||||
|
||||
template<typename NameType, typename ValueType>
|
||||
std::wstring & Request::AddCookie(const NameType & name, const ValueType & value, PT::Date & expires)
|
||||
void Request::AddCookie(const NameType & name, const ValueType & value, PT::Date & expires)
|
||||
{
|
||||
return AddCookie(name, value, &expires);
|
||||
AddCookie(name, value, &expires);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user