tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / bin / debug / profile / Team.h
blob772e0e28450e50a36387510f03c7c6d2aef6b2f1
1 /*
2 * Copyright 2008-2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef TEAM_H
6 #define TEAM_H
8 #include <String.h>
10 #include <debug_support.h>
11 #include <ObjectList.h>
12 #include <Referenceable.h>
13 #include <util/DoublyLinkedList.h>
15 #include "Thread.h"
18 class Image;
19 class SharedImage;
20 struct system_profiler_team_added;
23 class Team : public BReferenceable {
24 public:
25 Team();
26 ~Team();
28 status_t Init(team_id teamID, port_id debuggerPort);
29 status_t Init(system_profiler_team_added* addedInfo);
30 status_t InitThread(Thread* thread);
32 void RemoveThread(Thread* thread);
34 void Exec(int32 event, const char* args,
35 const char* threadName);
37 status_t AddImage(SharedImage* sharedImage,
38 const image_info& imageInfo, team_id owner,
39 int32 event);
40 status_t RemoveImage(image_id imageID, int32 event);
42 inline const BObjectList<Image>& Images() const;
43 Image* FindImage(image_id id) const;
45 inline team_id ID() const;
47 private:
48 void _RemoveImage(int32 index, int32 event);
50 bool _SynchronousProfiling() const
51 { return fDebugContext.nub_port < 0; }
53 private:
54 typedef DoublyLinkedList<Thread> ThreadList;
56 team_id fID;
57 BString fArgs;
58 port_id fNubPort;
59 debug_context fDebugContext;
60 ThreadList fThreads;
61 BObjectList<Image> fImages;
65 // #pragma mark -
68 const BObjectList<Image>&
69 Team::Images() const
71 return fImages;
75 team_id
76 Team::ID() const
78 return fID;
82 #endif // TEAM_H