Restore the "GPL licensing not permitted" in GLUT license headers.
[haiku.git] / headers / build / os / app / Messenger.h
blob73c592616d6713ba9f4a1cda14de78e8b6c452b4
1 /*
2 * Copyright 2001-2007, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Ingo Weinhold (bonefish@users.sf.net)
7 */
8 #ifndef _MESSENGER_H
9 #define _MESSENGER_H
12 #include <OS.h>
13 #include <ByteOrder.h>
14 #include <Message.h>
16 class BHandler;
17 class BLooper;
20 class BMessenger {
21 public:
22 BMessenger();
23 BMessenger(const BMessenger &from);
24 ~BMessenger();
26 // Operators and misc
28 BMessenger &operator=(const BMessenger &from);
29 bool operator==(const BMessenger &other) const;
31 bool IsValid() const;
32 team_id Team() const;
34 //----- Private or reserved -----------------------------------------
36 class Private;
38 private:
39 friend class Private;
41 void _SetTo(team_id team, port_id port, int32 token);
43 private:
44 port_id fPort;
45 int32 fHandlerToken;
46 team_id fTeam;
48 int32 _reserved[3];
51 bool operator<(const BMessenger &a, const BMessenger &b);
52 bool operator!=(const BMessenger &a, const BMessenger &b);
54 #endif // _MESSENGER_H