3 //=============================================================================
5 * @file Protocol_Manager.h
7 * @author Douglas C. Schmidt
9 //=============================================================================
12 #ifndef _PROTOCOL_MANAGER_H
13 #define _PROTOCOL_MANAGER_H
15 #include "ace/config-all.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "Search_Struct.h"
23 #include "Protocol_Record.h"
26 * @class Protocol_Manager
28 * @brief A base class that consolidates friend management functionality
29 * shared by both clients and servers.
31 class Protocol_Manager
35 virtual ~Protocol_Manager ();
37 virtual int encode (char *packet
, int &total_bytes
) = 0;
38 virtual int decode (char *packet
, int &total_bytes
) = 0;
46 Drwho_Node
*get_drwho_node (char *host_name
, Drwho_Node
*&head
);
47 int get_total_users ();
48 void increment_total_users (int remote_users
= 1);
50 Protocol_Record
*get_next_friend ();
51 Protocol_Record
*get_each_friend ();
53 virtual Protocol_Record
*insert_protocol_info (Protocol_Record
&protocol_record
) = 0;
56 #endif /* _PROTOCOL_MANAGER_H */