| OLD | NEW |
| 1 /* | 1 /* |
| 2 * | 2 * |
| 3 * Connection Manager | 3 * Connection Manager |
| 4 * | 4 * |
| 5 * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. | 5 * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. |
| 6 * | 6 * |
| 7 * This program is free software; you can redistribute it and/or modify | 7 * This program is free software; you can redistribute it and/or modify |
| 8 * it under the terms of the GNU General Public License version 2 as | 8 * it under the terms of the GNU General Public License version 2 as |
| 9 * published by the Free Software Foundation. | 9 * published by the Free Software Foundation. |
| 10 * | 10 * |
| 11 * This program is distributed in the hope that it will be useful, | 11 * This program is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 * GNU General Public License for more details. | 14 * GNU General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU General Public License | 16 * You should have received a copy of the GNU General Public License |
| 17 * along with this program; if not, write to the Free Software | 17 * along with this program; if not, write to the Free Software |
| 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 * | 19 * |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #ifndef __CONNMAN_NOTIFIER_H | 22 #ifndef __CONNMAN_NOTIFIER_H |
| 23 #define __CONNMAN_NOTIFIER_H | 23 #define __CONNMAN_NOTIFIER_H |
| 24 | 24 |
| 25 #include <connman/profile.h> |
| 25 #include <connman/service.h> | 26 #include <connman/service.h> |
| 26 | 27 |
| 27 #ifdef __cplusplus | 28 #ifdef __cplusplus |
| 28 extern "C" { | 29 extern "C" { |
| 29 #endif | 30 #endif |
| 30 | 31 |
| 31 /** | 32 /** |
| 32 * SECTION:notifier | 33 * SECTION:notifier |
| 33 * @title: Notifier premitives | 34 * @title: Notifier premitives |
| 34 * @short_description: Functions for registering notifier modules | 35 * @short_description: Functions for registering notifier modules |
| 35 */ | 36 */ |
| 36 | 37 |
| 37 #define CONNMAN_NOTIFIER_PRIORITY_LOW -100 | 38 #define CONNMAN_NOTIFIER_PRIORITY_LOW -100 |
| 38 #define CONNMAN_NOTIFIER_PRIORITY_DEFAULT 0 | 39 #define CONNMAN_NOTIFIER_PRIORITY_DEFAULT 0 |
| 39 #define CONNMAN_NOTIFIER_PRIORITY_HIGH 100 | 40 #define CONNMAN_NOTIFIER_PRIORITY_HIGH 100 |
| 40 | 41 |
| 41 struct connman_notifier { | 42 struct connman_notifier { |
| 42 const char *name; | 43 const char *name; |
| 43 int priority; | 44 int priority; |
| 44 void (*service_enabled) (enum connman_service_type type, | 45 void (*service_enabled) (enum connman_service_type type, |
| 45 connman_bool_t enabled); | 46 connman_bool_t enabled); |
| 46 void (*offline_mode) (connman_bool_t enabled); | 47 void (*offline_mode) (connman_bool_t enabled); |
| 47 void (*default_changed) (struct connman_service *service); | 48 void (*default_changed) (struct connman_service *service); |
| 48 void (*service_state_changed) (struct connman_service *service); | 49 void (*service_state_changed) (struct connman_service *service); |
| 49 void (*system_suspend) (void); | 50 void (*system_suspend) (void); |
| 50 void (*system_resume) (void); | 51 void (*system_resume) (void); |
| 52 void (*profile_push) (struct connman_profile *profile); |
| 53 void (*profile_pop) (struct connman_profile *profile); |
| 51 }; | 54 }; |
| 52 | 55 |
| 53 int connman_notifier_register(struct connman_notifier *notifier); | 56 int connman_notifier_register(struct connman_notifier *notifier); |
| 54 void connman_notifier_unregister(struct connman_notifier *notifier); | 57 void connman_notifier_unregister(struct connman_notifier *notifier); |
| 55 | 58 |
| 56 #ifdef __cplusplus | 59 #ifdef __cplusplus |
| 57 } | 60 } |
| 58 #endif | 61 #endif |
| 59 | 62 |
| 60 #endif /* __CONNMAN_NOTIFIER_H */ | 63 #endif /* __CONNMAN_NOTIFIER_H */ |
| OLD | NEW |