devd.hh (226775) | devd.hh (228618) |
---|---|
1/*- 2 * Copyright (c) 2002-2003 M. Warner Losh. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2002-2003 M. Warner Losh. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sbin/devd/devd.hh 226775 2011-10-26 02:11:28Z hrs $ | 26 * $FreeBSD: head/sbin/devd/devd.hh 228618 2011-12-17 01:54:51Z dim $ |
27 */ 28 29#ifndef DEVD_HH 30#define DEVD_HH 31 32class config; 33 34/** --- 25 unchanged lines hidden (view full) --- 60private: 61 std::map<std::string, std::string> _vars; 62}; 63 64/** 65 * eps is short for event_proc_single. It is a single entry in an 66 * event_proc. Each keyword needs its own subclass from eps. 67 */ | 27 */ 28 29#ifndef DEVD_HH 30#define DEVD_HH 31 32class config; 33 34/** --- 25 unchanged lines hidden (view full) --- 60private: 61 std::map<std::string, std::string> _vars; 62}; 63 64/** 65 * eps is short for event_proc_single. It is a single entry in an 66 * event_proc. Each keyword needs its own subclass from eps. 67 */ |
68class eps | 68struct eps |
69{ 70public: 71 eps() {} 72 virtual ~eps() {} 73 /** Does this eps match the current config? 74 */ 75 virtual bool do_match(config &) = 0; 76 /** Perform some action for this eps. --- 44 unchanged lines hidden (view full) --- 121 action(const char *cmd); 122 virtual ~action(); 123 virtual bool do_match(config &) { return true; } 124 virtual bool do_action(config &); 125private: 126 std::string _cmd; 127}; 128 | 69{ 70public: 71 eps() {} 72 virtual ~eps() {} 73 /** Does this eps match the current config? 74 */ 75 virtual bool do_match(config &) = 0; 76 /** Perform some action for this eps. --- 44 unchanged lines hidden (view full) --- 121 action(const char *cmd); 122 virtual ~action(); 123 virtual bool do_match(config &) { return true; } 124 virtual bool do_action(config &); 125private: 126 std::string _cmd; 127}; 128 |
129class event_proc | 129struct event_proc |
130{ 131public: 132 event_proc(); 133 virtual ~event_proc(); 134 int get_priority() const { return (_prio); } 135 void set_priority(int prio) { _prio = prio; } 136 void add(eps *); 137 bool matches(config &); --- 48 unchanged lines hidden --- | 130{ 131public: 132 event_proc(); 133 virtual ~event_proc(); 134 int get_priority() const { return (_prio); } 135 void set_priority(int prio) { _prio = prio; } 136 void add(eps *); 137 bool matches(config &); --- 48 unchanged lines hidden --- |