diff options
author | Faiyaz Baxamusa <faiyaz.baxamusa@nokia.com> | 2011-01-20 13:42:37 -0800 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-01-20 14:58:31 -0600 |
commit | 76081700a9457f3b3623a861eff2e369caa6eb27 (patch) | |
tree | 9d462fbe50a5fe8497c8b10a063aae812a27544b /src/message.h | |
parent | 2da4496e1e6c0a6476db2056fd54379c1e545199 (diff) | |
download | ofono-76081700a9457f3b3623a861eff2e369caa6eb27.tar.bz2 |
sms: Break out message objects into message.[ch]
These can be used as is by the CDMA SMS manager atom
Diffstat (limited to 'src/message.h')
-rw-r--r-- | src/message.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/message.h b/src/message.h new file mode 100644 index 00000000..14e66c30 --- /dev/null +++ b/src/message.h @@ -0,0 +1,54 @@ +/* + * + * oFono - Open Source Telephony + * + * Copyright (C) 2008-2011 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <ofono/types.h> + +enum message_state { + MESSAGE_STATE_PENDING, + MESSAGE_STATE_SENT, + MESSAGE_STATE_FAILED +}; + +struct ofono_atom; +struct message; + +struct message *message_create(const struct ofono_uuid *uuid, + struct ofono_atom *atom); + +gboolean message_dbus_register(struct message *m); +void message_dbus_unregister(struct message *m); + +const struct ofono_uuid *message_get_uuid(const struct message *m); + +void message_set_state(struct message *m, enum message_state new_state); + +void message_append_properties(struct message *m, DBusMessageIter *dict); + +void message_emit_added(struct message *m, const char *interface); + +void message_emit_removed(struct message *m, const char *interface); + +void *message_get_data(struct message *m); + +void message_set_data(struct message *m, void *data); + +const char *message_path_from_uuid(struct ofono_atom *atom, + const struct ofono_uuid *uuid); |