xref: /titanic_50/usr/src/lib/sun_fc/common/EventBridgeFactory.h (revision 1747673f150798edc5519c1e6d968616fff11b69)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_EVENTBRIDGEFACTORY_H
27 #define	_EVENTBRIDGEFACTORY_H
28 
29 
30 
31 #include "AdapterAddEventBridge.h"
32 #include "AdapterEventBridge.h"
33 #include "AdapterPortEventBridge.h"
34 #include "AdapterDeviceEventBridge.h"
35 #include "AdapterPortStatEventBridge.h"
36 #include "LinkEventBridge.h"
37 #include "TargetEventBridge.h"
38 
39 /*
40  * @memo	    Static routines to build the proper event bridge
41  *		    for the current version of the library.
42  *
43  * @doc		    To keep client code isolated from the underlying
44  *		    event infrastructure (eg: sysevent, IOCTLs, etc.)
45  *		    Bridge classes are used for registration.  This
46  *		    factory interface allows client code to be compiled
47  *		    once without knowledge of the underlying details.
48  *		    The concrete implementation of this class will
49  *		    define which concrete bridge instance(s)
50  *		    are returned.
51  */
52 class EventBridgeFactory {
53 public:
54     static AdapterAddEventBridge* fetchAdapterAddEventBridge();
55     static AdapterEventBridge* fetchAdapterEventBridge();
56     static AdapterPortEventBridge* fetchAdapterPortEventBridge();
57     static AdapterDeviceEventBridge* fetchAdapterDeviceEventBridge();
58     static AdapterPortStatEventBridge* fetchAdapterPortStatEventBridge();
59     static TargetEventBridge* fetchTargetEventBridge();
60     static LinkEventBridge* fetchLinkEventBridge();
61 };
62 
63 #endif /* _EVENTBRIDGEFACTORY_H */
64