FCSyseventBridge.h revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _FCSYSEVENTBRIDGE_H
#define _FCSYSEVENTBRIDGE_H
#include "AdapterAddEventBridge.h"
#include "AdapterEventBridge.h"
#include "AdapterPortEventBridge.h"
#include "AdapterDeviceEventBridge.h"
#include "TargetEventBridge.h"
#include "Lockable.h"
#include <vector>
#include <libsysevent.h>
/**
* Note: Even though we take various arguments in within the API,
* we don't actually filter anything, since sys-even is either on
* or off. The idea is that the actual Listener themselves will perform
* a final filter pass, so why do the work twice. If we were going to
* use proprietary IOCTLs or some other event plumbing that allowed filtering,
* we could use the passed in arguments to do useful work. In short,
* once turned on, we send events of a given type and rely on
* someone downstream to filter.
*/
static FCSyseventBridge* getInstance();
/* Private function, called by handler. Friend maybe? */
/**
* Subscribe if we need to, or unsubscribe if nobody is left
* Instance lock must already be held!
*/
void validateRegistration();
static FCSyseventBridge* _instance;
};
#endif /* _FCSYSEVENTBRIDGE_H */