]> git.ipfire.org Git - thirdparty/squid.git/blob - src/snmp/Session.h
Merge from trunk. Remove dead files and fluff changes
[thirdparty/squid.git] / src / snmp / Session.h
1 /*
2 * $Id$
3 *
4 * DEBUG: section 49 SNMP Interface
5 *
6 */
7
8 #ifndef SQUID_SNMPX_SESSION_H
9 #define SQUID_SNMPX_SESSION_H
10
11 #include "config.h"
12 #include "ipc/forward.h"
13 #include "snmp.h"
14 #include "snmp_session.h"
15
16
17 namespace Snmp
18 {
19
20 /// snmp_session wrapper add pack/unpack feature
21 class Session: public snmp_session
22 {
23 public:
24 Session();
25 Session(const Session& session);
26 Session& operator = (const Session& session);
27 ~Session();
28
29 void pack(Ipc::TypedMsgHdr& msg) const; ///< prepare for sendmsg()
30 void unpack(const Ipc::TypedMsgHdr& msg); ///< restore struct from the message
31 void clear(); ///< clear internal members
32
33 private:
34 void free(); ///< free internal members
35 void assign(const Session& session); ///< perform full assignment
36 };
37
38 } // namespace Snmp
39
40 #endif /* SQUID_SNMPX_SESSION_H */