2 * Copyright 2002-2006, Haiku. All rights reserved.
3 * Distributed under the terms of the MIT License.
8 #ifndef RESOURCE_MANAGER_H
9 #define RESOURCE_MANAGER_H
11 #include "ObjectList.h"
18 class Resource
: public Object
{
21 BString fTransportAddress
;
23 sem_id fResourceAvailable
;
26 Resource(const char* transport
, const char* address
, const char* connection
);
31 bool Equals(const char* transport
, const char* address
, const char* connection
);
33 const BString
& Transport() const { return fTransport
; }
39 class ResourceManager
{
41 BObjectList
<Resource
> fResources
;
43 Resource
* Find(const char* transport
, const char* address
, const char* connection
);
48 Resource
* Allocate(const char* transport
, const char* address
, const char* connection
);
49 void Free(Resource
* r
);