diff options
author | Andrzej Zaborowski <andrew.zaborowski@intel.com> | 2010-07-28 12:26:06 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-07-30 17:19:54 -0500 |
commit | 573c806fcd9343cd07df8546703c1ed9c81c8778 (patch) | |
tree | c537e6f816968bcb2d2e6bc8867cf1fa5ae59b8c /src/stkagent.h | |
parent | 924deeff06983af4db76a6295efcba13e31fb49a (diff) | |
download | ofono-573c806fcd9343cd07df8546703c1ed9c81c8778.tar.gz |
Add STK agent utilities and logic.
Diffstat (limited to 'src/stkagent.h')
-rw-r--r-- | src/stkagent.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/stkagent.h b/src/stkagent.h new file mode 100644 index 00000000..bcb0f152 --- /dev/null +++ b/src/stkagent.h @@ -0,0 +1,47 @@ +/* + * + * oFono - Open Source Telephony + * + * Copyright (C) 2008-2010 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 + * + */ + +enum stk_agent_result { + STK_AGENT_RESULT_OK, + STK_AGENT_RESULT_BACK, + STK_AGENT_RESULT_TERMINATE, + STK_AGENT_RESULT_HELP, + STK_AGENT_RESULT_TIMEOUT, + STK_AGENT_RESULT_CANCEL, +}; + +typedef void (*stk_agent_generic_cb)(enum stk_agent_result result, + void *user_data); + +struct stk_agent; + +struct stk_agent *stk_agent_new(const char *path, const char *sender, + ofono_bool_t is_default); + +void stk_agent_remove(struct stk_agent *agent); + +ofono_bool_t stk_agent_busy(struct stk_agent *agent); +ofono_bool_t stk_agent_matches(struct stk_agent *agent, + const char *path, const char *sender); +void stk_agent_set_destroy_watch(struct stk_agent *agent, GDestroyNotify notify, + void *user_data); + +void stk_agent_request_cancel(struct stk_agent *agent); |