5 * Copyright (C) 2013 BMW Car IT GmbH. All rights reserved.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 MAP_ET_DELIVERY_SUCCESS,
29 MAP_ET_SENDING_SUCCESS,
30 MAP_ET_DELIVERY_FAILURE,
31 MAP_ET_SENDING_FAILURE,
33 MAP_ET_MEMORY_AVAILABLE,
34 MAP_ET_MESSAGE_DELETED,
39 enum map_event_type type;
50 /* Handle notification in map client.
52 * event: Event report.
54 * Callback shall be called for every received event.
56 typedef void (*map_event_cb) (struct map_event *event, void *user_data);
58 /* Registers client notification handler callback for events that are
59 * addressed to the given mas instance id for the given device.
61 bool map_register_event_handler(struct obc_session *session, int mas_id,
62 map_event_cb cb, void *user_data);
64 /* Unregisters client notification handler callback.
66 void map_unregister_event_handler(struct obc_session *session, int mas_id);
68 /* Dispatch notification to a registered notification handler callback.
70 void map_dispatch_event(int mas_id, const char *device,
71 struct map_event *event);