Debian Codegraph @

src/bnetd/watch.h

raw symbols SCIP
1 /*
2 * Copyright (C) 1999 Ross Combs ([email protected])
3 * Copyright (C) 2005 Dizzy
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */
19 #ifndef PVPGN_BNETD_WATCH_H
20 #define PVPGN_BNETD_WATCH_Hcxx . . $ `src/bnetd/watch.h:20:9`!
21
22 #include <list>
23
24 #include "common/scoped_ptr.h"cxx . . $ `<file>/src/common/scoped_ptr.h`/
25
26 #include "account.h"cxx . . $ `<file>/src/bnetd/account.h`/
27 #include "connection.h"cxx . . $ `<file>/src/bnetd/connection.h`/
28 #include "common/tag.h"cxx . . $ `<file>/src/common/tag.h`/
29
30 namespace pvpgncxx . . $ pvpgn/
31 {
32
33 namespace bnetdcxx . . $ pvpgn/bnetd/
34 {
35
36 class Watchcxx . . $ pvpgn/bnetd/Watch#
37 {
38 public:
39 enum EventTypecxx . . $ pvpgn/bnetd/Watch#EventType#
40 {
41 ET_logincxx . . $ pvpgn/bnetd/Watch#ET_login. = 1,
42 ET_logoutcxx . . $ pvpgn/bnetd/Watch#ET_logout. = 2,
43 ET_joingamecxx . . $ pvpgn/bnetd/Watch#ET_joingame. = 4,
44 ET_leavegamecxx . . $ pvpgn/bnetd/Watch#ET_leavegame. = 8
45 };
46
47 Watchcxx . . $ pvpgn/bnetd/Watch#Watch(3ec15225d867d3da).(t_connection* owner_, t_accountcxx . . $ pvpgn/bnetd/t_account#* who_, unsigned what_, t_clienttagcxx . . $ pvpgn/t_clienttag# ctag_);
48 ~cxx . . $ pvpgn/bnetd/Watch#`~Watch`(ced63f7c635d850d).Watchcxx . . $ pvpgn/bnetd/Watch#() throw();
49
50 t_connection* getOwnercxx . . $ pvpgn/bnetd/Watch#getOwner(ee9430605b44e25e).() const;
51 t_accountcxx . . $ pvpgn/bnetd/t_account#* getAccountcxx . . $ pvpgn/bnetd/Watch#getAccount(bd50dfe41cbbfab3).() const;
52 unsigned getEventMaskcxx . . $ pvpgn/bnetd/Watch#getEventMask(ddd8539a2fcdd4ce).() const;
53 t_clienttagcxx . . $ pvpgn/t_clienttag# getClientTagcxx . . $ pvpgn/bnetd/Watch#getClientTag(ddd8539a2fcdd4ce).() const;
54
55 void setEventMaskcxx . . $ pvpgn/bnetd/Watch#setEventMask(cb2f890c2fdad230).(unsigned what_);
56
57 private:
58 t_connection * ownercxx . . $ pvpgn/bnetd/Watch#owner.; /* who to notify */
59 t_accountcxx . . $ pvpgn/bnetd/t_account# * whocxx . . $ pvpgn/bnetd/Watch#who.; /* when this account */
60 unsigned whatcxx . . $ pvpgn/bnetd/Watch#what.; /* does one of these things */
61 t_clienttagcxx . . $ pvpgn/t_clienttag# ctagcxx . . $ pvpgn/bnetd/Watch#ctag.; /* while logged in with this clienttag (0 for any) */
62 };
63
64 class WatchComponentcxx . . $ pvpgn/bnetd/WatchComponent#
65 {
66 public:
67 WatchComponentcxx . . $ pvpgn/bnetd/WatchComponent#WatchComponent(49f6e7a06ebc5aa8).();
68 ~cxx . . $ pvpgn/bnetd/WatchComponent#`~WatchComponent`(ced63f7c635d850d).WatchComponentcxx . . $ pvpgn/bnetd/WatchComponent#() throw();
69
70 void addcxx . . $ pvpgn/bnetd/WatchComponent#add(3ec15225d867d3da).(t_connection * owner, t_accountcxx . . $ pvpgn/bnetd/t_account# * who, t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag, unsigned events);
71 int delcxx . . $ pvpgn/bnetd/WatchComponent#del(4da098f4e89597b2).(t_connection * owner, t_accountcxx . . $ pvpgn/bnetd/t_account# * who, t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag, unsigned events);
72 void delcxx . . $ pvpgn/bnetd/WatchComponent#del(428cd989165da3c5).(t_connection * owner);
73 int dispatchcxx . . $ pvpgn/bnetd/WatchComponent#dispatch(5f92e2dc3f12ba14).(t_accountcxx . . $ pvpgn/bnetd/t_account# * who, char const * gamename, t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag, Watchcxx . . $ pvpgn/bnetd/Watch#::EventTypecxx . . $ pvpgn/bnetd/Watch#EventType# event) const;
74
75 private:
76 typedef stdcxx . . $ std/::listcxx . . $ std/__cxx11/list#<Watchcxx . . $ pvpgn/bnetd/Watch#> WatchListcxx . . $ pvpgn/bnetd/WatchComponent#WatchList#;
77
78 WatchListcxx . . $ pvpgn/bnetd/WatchComponent#WatchList# wlistcxx . . $ pvpgn/bnetd/WatchComponent#wlist.;
79
80 int dispatch_whispercxx . . $ pvpgn/bnetd/WatchComponent#dispatch_whisper(5f92e2dc3f12ba14).(t_accountcxx . . $ pvpgn/bnetd/t_account# *account, char const *gamename, t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag, Watchcxx . . $ pvpgn/bnetd/Watch#::EventTypecxx . . $ pvpgn/bnetd/Watch#EventType# event) const;
81 };
82
83 extern scoped_ptrcxx . . $ pvpgn/scoped_ptr#<WatchComponentcxx . . $ pvpgn/bnetd/WatchComponent#> watchlistcxx . . $ pvpgn/bnetd/watchlist.;
84
85 }
86
87 }
88
89 #endif