/usr/include/Eris-1.3/Eris/Response.h is in liberis-1.3-dev 1.3.23-6ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | #ifndef ERIS_RESPONSE_H
#define ERIS_RESPONSE_H
#include <Atlas/Objects/ObjectsFwd.h>
#include <map>
namespace Eris
{
class ResponseBase
{
public:
virtual ~ResponseBase();
/**
Process a response. Return true if the operation was handled, and false
if it should be processed by the router system as normal.
*/
virtual bool responseReceived(const Atlas::Objects::Operation::RootOperation& op) = 0;
};
class NullResponse : public ResponseBase
{
public:
virtual bool responseReceived(const Atlas::Objects::Operation::RootOperation&);
};
void* clearMemberResponse(void*);
template <class T>
class MemberResponse : public ResponseBase
{
public:
typedef void (T::*T_method)(const Atlas::Objects::Operation::RootOperation& op);
MemberResponse(T *obj, void (T::*method)(const Atlas::Objects::Operation::RootOperation& op)) :
m_object(obj),
m_func(method)
{
obj->add_destroy_notify_callback(&m_object, &clearMemberResponse);
}
~MemberResponse()
{
if (m_object) m_object->remove_destroy_notify_callback(&m_object);
}
virtual bool responseReceived(const Atlas::Objects::Operation::RootOperation& op)
{
if (m_object) (m_object->*m_func)(op);
return true;
}
private:
T* m_object;
T_method m_func;
};
class ResponseTracker
{
public:
~ResponseTracker();
void await(int serialno, ResponseBase*);
template <class T>
void await(int serial, T* ins, void (T::*method)(const Atlas::Objects::Operation::RootOperation& op) )
{
await(serial, new MemberResponse<T>(ins, method));
}
void ignore(int serial)
{
await(serial, new NullResponse());
}
bool handleOp(const Atlas::Objects::Operation::RootOperation& op);
private:
typedef std::map<int, ResponseBase*> RefnoResponseMap;
RefnoResponseMap m_pending;
};
} // of namespace
#endif // of ERIS_RESPONSE_H
|