* Re: [PATCH 1/3] message-waiting: add API to retrieve voicemail number
2011-06-20 15:12 ` [PATCH 1/3] message-waiting: add API to retrieve voicemail number =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
@ 2011-06-20 9:33 ` Denis Kenzior
0 siblings, 0 replies; 5+ messages in thread
From: Denis Kenzior @ 2011-06-20 9:33 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
Hi Frédéric,
On 06/20/2011 10:12 AM, Frédéric Danis wrote:
> ---
> include/message-waiting.h | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/include/message-waiting.h b/include/message-waiting.h
> index b40993e..adb7ef2 100644
> --- a/include/message-waiting.h
> +++ b/include/message-waiting.h
> @@ -33,6 +33,8 @@ struct ofono_message_waiting;
> struct ofono_message_waiting *ofono_message_waiting_create(struct ofono_modem *modem);
> void ofono_message_waiting_register(struct ofono_message_waiting *mw);
> void ofono_message_waiting_remove(struct ofono_message_waiting *mw);
> +const struct ofono_phone_number *ofono_message_waiting_get_voicemail_number(
> + struct ofono_message_waiting *mw);
I'd like to keep this API private for now, so lets move this to ofono.h
and combine patch 1 & 2 together.
Also, can you please use the following signature:
const struct ofono_phone_number *__ofono_message_waiting_get_mbdn(
struct ofono_message_waiting *mw, unsigned int index);
Regards,
-Denis
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 0/3] Add ATD>1; support for HFP emulator
@ 2011-06-20 15:12 =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-20 15:12 ` [PATCH 1/3] message-waiting: add API to retrieve voicemail number =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis @ 2011-06-20 15:12 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 510 bytes --]
Only ATD>1; will be managed through HFP AG, and it will call the
voicemail number retrieved from the message-waiting atom.
Frédéric Danis (3):
message-waiting: add API to retrieve voicemail number
message-waiting: API to retrieve voicemail number
voicecall: add ATD> support for HFP emulator
include/message-waiting.h | 2 ++
src/message-waiting.c | 6 ++++++
src/voicecall.c | 30 +++++++++++++++++++++++++++---
3 files changed, 35 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] message-waiting: add API to retrieve voicemail number
2011-06-20 15:12 [PATCH 0/3] Add ATD>1; support for HFP emulator =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
@ 2011-06-20 15:12 ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-20 9:33 ` Denis Kenzior
2011-06-20 15:12 ` [PATCH 2/3] message-waiting: " =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-20 15:12 ` [PATCH 3/3] voicecall: add ATD> support for HFP emulator =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2 siblings, 1 reply; 5+ messages in thread
From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis @ 2011-06-20 15:12 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 706 bytes --]
---
include/message-waiting.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/message-waiting.h b/include/message-waiting.h
index b40993e..adb7ef2 100644
--- a/include/message-waiting.h
+++ b/include/message-waiting.h
@@ -33,6 +33,8 @@ struct ofono_message_waiting;
struct ofono_message_waiting *ofono_message_waiting_create(struct ofono_modem *modem);
void ofono_message_waiting_register(struct ofono_message_waiting *mw);
void ofono_message_waiting_remove(struct ofono_message_waiting *mw);
+const struct ofono_phone_number *ofono_message_waiting_get_voicemail_number(
+ struct ofono_message_waiting *mw);
#ifdef __cplusplus
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] message-waiting: API to retrieve voicemail number
2011-06-20 15:12 [PATCH 0/3] Add ATD>1; support for HFP emulator =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-20 15:12 ` [PATCH 1/3] message-waiting: add API to retrieve voicemail number =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
@ 2011-06-20 15:12 ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-20 15:12 ` [PATCH 3/3] voicecall: add ATD> support for HFP emulator =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2 siblings, 0 replies; 5+ messages in thread
From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis @ 2011-06-20 15:12 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
---
src/message-waiting.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/message-waiting.c b/src/message-waiting.c
index ad534d9..bce881b 100644
--- a/src/message-waiting.c
+++ b/src/message-waiting.c
@@ -605,6 +605,12 @@ static void mw_cphs_mbdn_changed(int id, void *userdata)
mw_cphs_mbdn_read_cb, mw);
}
+const struct ofono_phone_number *ofono_message_waiting_get_voicemail_number(
+ struct ofono_message_waiting *mw)
+{
+ return &mw->mailbox_number[0];
+}
+
static void mw_mbi_read_cb(int ok, int total_length, int record,
const unsigned char *data,
int record_length, void *userdata)
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] voicecall: add ATD> support for HFP emulator
2011-06-20 15:12 [PATCH 0/3] Add ATD>1; support for HFP emulator =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-20 15:12 ` [PATCH 1/3] message-waiting: add API to retrieve voicemail number =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-20 15:12 ` [PATCH 2/3] message-waiting: " =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
@ 2011-06-20 15:12 ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2 siblings, 0 replies; 5+ messages in thread
From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis @ 2011-06-20 15:12 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1507 bytes --]
---
src/voicecall.c | 30 +++++++++++++++++++++++++++---
1 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/src/voicecall.c b/src/voicecall.c
index 1f0d3b8..06ab3ce 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -3084,6 +3084,7 @@ static void emulator_atd_cb(struct ofono_emulator *em,
struct ofono_emulator_request *req, void *userdata)
{
struct ofono_voicecall *vc = userdata;
+ struct ofono_modem *modem = __ofono_atom_get_modem(vc->atom);
const char *str;
size_t len;
char number[OFONO_MAX_PHONE_NUMBER_LENGTH + 1];
@@ -3102,10 +3103,33 @@ static void emulator_atd_cb(struct ofono_emulator *em,
str[len - 1] != ';')
goto fail;
- strncpy(number, str, len - 1);
- number[len - 1] = '\0';
+ if (len == 3 && str[0] == '>' && str[1] == '1') {
+ struct ofono_atom *mw_atom;
+ struct ofono_message_waiting *mw;
+ const struct ofono_phone_number *ph;
+ const char *num;
- emulator_dial(em, vc, number);
+ mw_atom = __ofono_modem_find_atom(modem,
+ OFONO_ATOM_TYPE_MESSAGE_WAITING);
+
+ if (mw_atom == NULL)
+ goto fail;
+
+ mw = __ofono_atom_get_data(mw_atom);
+ ph = ofono_message_waiting_get_voicemail_number(mw);
+
+ if (ph == NULL)
+ goto fail;
+
+ num = phone_number_to_string(ph);
+
+ emulator_dial(em, vc, num);
+ } else {
+ strncpy(number, str, len - 1);
+ number[len - 1] = '\0';
+
+ emulator_dial(em, vc, number);
+ }
break;
default:
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-20 15:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-20 15:12 [PATCH 0/3] Add ATD>1; support for HFP emulator =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-20 15:12 ` [PATCH 1/3] message-waiting: add API to retrieve voicemail number =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-20 9:33 ` Denis Kenzior
2011-06-20 15:12 ` [PATCH 2/3] message-waiting: " =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-20 15:12 ` [PATCH 3/3] voicecall: add ATD> support for HFP emulator =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.