E. Scott Daniels | d486a17 | 2020-07-29 12:39:54 -0400 | [diff] [blame^] | 1 | |
| 2 | // vi: ts=4 sw=4 noet: |
| 3 | /* |
| 4 | ================================================================================== |
| 5 | Copyright (c) 2020 Nokia |
| 6 | Copyright (c) 2020 AT&T Intellectual Property. |
| 7 | |
| 8 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | you may not use this file except in compliance with the License. |
| 10 | You may obtain a copy of the License at |
| 11 | |
| 12 | http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | |
| 14 | Unless required by applicable law or agreed to in writing, software |
| 15 | distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | See the License for the specific language governing permissions and |
| 18 | limitations under the License. |
| 19 | ================================================================================== |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | Mnemonic: notify_cb.cpp |
| 24 | Abstract: Notification drivers. |
| 25 | |
| 26 | Date: 27 July 2020 |
| 27 | Author: E. Scott Daniels |
| 28 | */ |
| 29 | |
| 30 | //#include <cstdlib> |
| 31 | |
| 32 | #include "config.hpp" |
| 33 | #include "config_cb.hpp" |
| 34 | |
| 35 | namespace xapp { |
| 36 | |
| 37 | /* |
| 38 | Builder. |
| 39 | */ |
| 40 | Config_cb::Config_cb( notify_callback ufun, void* udata ) : |
| 41 | user_fun( ufun ), |
| 42 | udata( udata ) |
| 43 | { /* empty body */ } |
| 44 | |
| 45 | |
| 46 | /* |
| 47 | there is nothing to be done from a destruction perspective, so no |
| 48 | destruction function needed at the moment. |
| 49 | */ |
| 50 | |
| 51 | /* |
| 52 | Drive_cb will invoke the callback and pass along the stuff passed here. |
| 53 | */ |
| 54 | void xapp::Config_cb::Drive_cb( xapp::Config& c, void* udata ) { |
| 55 | if( user_fun != NULL ) { |
| 56 | user_fun( c, udata ); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | |
| 61 | |
| 62 | } // namespace |