Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members  

RemoteRoster.h

00001 // RemoteRoster.h
00002 // 
00003 // Copyright (c) 2004, Ingo Weinhold (bonefish@cs.tu-berlin.de)
00004 // 
00005 // Permission is hereby granted, free of charge, to any person obtaining a
00006 // copy of this software and associated documentation files (the "Software"),
00007 // to deal in the Software without restriction, including without limitation 
00008 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
00009 // and/or sell copies of the Software, and to permit persons to whom the
00010 // Software is furnished to do so, subject to the following conditions:
00011 // 
00012 // The above copyright notice and this permission notice shall be included in
00013 // all copies or substantial portions of the Software.
00014 // 
00015 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00016 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00017 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00018 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00019 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00020 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00021 // DEALINGS IN THE SOFTWARE.
00022 // 
00023 // Except as contained in this notice, the name of a copyright holder shall
00024 // not be used in advertising or otherwise to promote the sale, use or other
00025 // dealings in this Software without prior written authorization of the
00026 // copyright holder.
00027 
00028 #ifndef REMOTE_ROSTER_H
00029 #define REMOTE_ROSTER_H
00030 
00031 #include <RMessageBuild.h>
00032 
00033 #include <Archivable.h>
00034 #include <Messenger.h>
00035 #include <NetAddress.h>
00036 #include <OS.h>
00037 
00038 struct app_info;
00039 class BList;
00040 class RemoteRosterImpl;
00041 
00042 class _IMPEXP_RMESSAGE RemoteRoster {
00043 public:
00044                                 RemoteRoster(const BNetAddress* address = NULL);
00045                                 RemoteRoster(const char* host);
00046                                 ~RemoteRoster();
00047 
00048             status_t            SetTo(const BNetAddress* address);
00049             status_t            SetTo(const char* host);
00050             void                Unset();
00051             status_t            InitCheck() const;
00052 
00053             status_t            GetAppList(BList* teams) const;
00054             status_t            GetAppList(const char* signature,
00055                                     BList* teams) const;
00056             team_id             TeamFor(const char* signature) const;
00057             status_t            GetRunningAppInfo(const char* signature,
00058                                     app_info* info) const;
00059             status_t            GetRunningAppInfo(team_id team,
00060                                     app_info* info) const;
00061             status_t            GetActiveAppInfo(app_info* info) const;
00062 
00063             status_t            GetMessenger(const char* signature,
00064                                     BMessenger* messenger,
00065                                     bool byName = false) const;
00066             status_t            GetMessenger(team_id team,
00067                                     BMessenger* messenger) const;
00068 
00069 private:
00070             status_t            fInitStatus;
00071             BNetAddress*        fAddress;
00072             RemoteRosterImpl*   fImpl;
00073 };
00074 
00075 #endif  // REMOTE_ROSTER_H

Generated at Mon Mar 22 02:35:22 2004 for RMessage by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000