LOM2M  0.8.0
Redirector.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2013-2021 LAAS-CNRS (www.laas.fr)
3  7 Colonel Roche 31077 Toulouse - France
4 
5  The use of this source code requires an agreement with the CNRS.
6 
7  Initial Contributors:
8  David Gauchard, Guillaume Garzone, Thierry Monteil.
9 */
10 
11 #ifndef __LOM2M_REDIRECTOR_H
12 #define __LOM2M_REDIRECTOR_H
13 
14 
15 #include "ResponsePrimitive.h"
16 #include "RequestPrimitive.h"
17 
24 {
25 public:
31  {
32  // NB: response is global, if multithread, need to update this
33  response->init();
34  response->setTo(req.getFrom());
35  response->setFrom(req.getTo());
37  }
43  static void retarget(RequestPrimitive* request, ResponsePrimitive* response);
50  static void sendRequest(RequestPrimitive* request, RemoteCse* csr, ResponsePrimitive* response);
56  //static ResponsePrimitive* retargetNotify(RequestPrimitive* request);
57 };
58 
59 
60 #endif
ResponsePrimitive * response
Definition: Notify.cpp:100
Definition: Redirector.h:24
static void retarget(RequestPrimitive *request, ResponsePrimitive *response)
Definition: Redirector.cpp:17
static void initResponse(RequestPrimitive &req, ResponsePrimitive *response)
Definition: Redirector.h:30
static void sendRequest(RequestPrimitive *request, RemoteCse *csr, ResponsePrimitive *response)
Definition: Redirector.cpp:131
Definition: RequestPrimitive.h:41
String getFrom() const
Definition: RequestPrimitive.h:321
const String & getTo() const
Definition: RequestPrimitive.h:311
const String & getRequestId() const
Definition: RequestPrimitive.h:331
Definition: ResponsePrimitive.h:49
void setFrom(const String &from)
Definition: ResponsePrimitive.h:211
void init()
Definition: ResponsePrimitive.cpp:15
void setTo(const String &to)
Definition: ResponsePrimitive.h:201
void setRequestId(const String &ri)
Definition: ResponsePrimitive.h:221
Definition: Entity.h:459