diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
commit | 3df4acfa816441fc28a95dee6d0191a927145d95 (patch) | |
tree | b5ae7ca44662cfd8e5c95f1826e4406021a606f5 /apps/drwho/Protocol_Manager.cpp | |
parent | 60a5612b83d856fc0adc52b9f39fac9960ec9818 (diff) | |
download | ATCD-pre-subset.tar.gz |
This commit was manufactured by cvs2svn to create tag 'pre-subset'.pre-subset
Diffstat (limited to 'apps/drwho/Protocol_Manager.cpp')
-rw-r--r-- | apps/drwho/Protocol_Manager.cpp | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/apps/drwho/Protocol_Manager.cpp b/apps/drwho/Protocol_Manager.cpp deleted file mode 100644 index 9545d7ee341..00000000000 --- a/apps/drwho/Protocol_Manager.cpp +++ /dev/null @@ -1,86 +0,0 @@ -// $Id$ - -#include "ace/config.h" -#include "ace/Log_Msg.h" - -#include "Options.h" -#include "Protocol_Manager.h" - -// Returns a pointer to the Drwho_Node associated with HOST_NAME (if -// it exists, otherwise a new node is created. Note that if a -// Drwho_Node is found it is moved to the front of the list so that -// subsequent finds are faster (i.e., self-organizing!) - -Drwho_Node * -Protocol_Manager::get_drwho_node (char *key_name, Drwho_Node *&head) -{ - Drwho_Node **temp = &head; - for (; *temp != 0; temp = &(*temp)->next_) - if (ACE_OS::strcmp (key_name, - (*temp)->get_login_name ()) == 0) - break; - - if (*temp == 0) - ACE_NEW_RETURN (head, - Drwho_Node (key_name, head), - 0); - else - { - Drwho_Node *t = *temp; - - *temp = (*temp)->next_; - t->next_ = head; - - head = t; - } - - return head; -} - -Protocol_Manager::Protocol_Manager (void) - : total_users (0) -{ -} - -Protocol_Manager::~Protocol_Manager (void) -{ - if (Options::get_opt (Options::DEBUG)) - ACE_DEBUG ((LM_DEBUG, - "disposing Protocol_Manager\n")); -} - -// Returns the next friend in the sequence of sorted friends. - -Protocol_Record * -Protocol_Manager::get_next_friend (void) -{ - return this->ss->get_next_entry (); -} - -Protocol_Record * -Protocol_Manager::get_each_friend (void) -{ - return this->ss->get_each_entry (); -} - -// Returns the number of friends. - -int -Protocol_Manager::friend_count (void) -{ - return this->ss->n_elems (); -} - -// Returns total number of users logged in throughout the system. - -int -Protocol_Manager::get_total_users (void) -{ - return Protocol_Manager::total_users; -} - -void -Protocol_Manager::increment_total_users (int remote_users) -{ - Protocol_Manager::total_users += remote_users; -} |