Enable unsollicited service data messages by default
This commit is contained in:
parent
4029a89b56
commit
77d1502993
@ -280,7 +280,6 @@ typedef enum _ModemRequestType
|
|||||||
MODEM_REQUEST_REGISTRATION,
|
MODEM_REQUEST_REGISTRATION,
|
||||||
MODEM_REQUEST_REGISTRATION_REPORT,
|
MODEM_REQUEST_REGISTRATION_REPORT,
|
||||||
MODEM_REQUEST_SIGNAL_LEVEL,
|
MODEM_REQUEST_SIGNAL_LEVEL,
|
||||||
MODEM_REQUEST_SUPPLEMENTARY_SERVICE_NOTIFICATIONS,
|
|
||||||
MODEM_REQUEST_UNSUPPORTED
|
MODEM_REQUEST_UNSUPPORTED
|
||||||
} ModemRequestType;
|
} ModemRequestType;
|
||||||
# define MODEM_REQUEST_LAST MODEM_REQUEST_UNSUPPORTED
|
# define MODEM_REQUEST_LAST MODEM_REQUEST_UNSUPPORTED
|
||||||
|
8
po/fr.po
8
po/fr.po
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Phone 0.0.0\n"
|
"Project-Id-Version: Phone 0.0.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2011-08-12 01:44+0200\n"
|
"POT-Creation-Date: 2011-08-13 01:21+0200\n"
|
||||||
"PO-Revision-Date: 2010-04-24 02:07+0200\n"
|
"PO-Revision-Date: 2010-04-24 02:07+0200\n"
|
||||||
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
|
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
|
||||||
"Language-Team: French\n"
|
"Language-Team: French\n"
|
||||||
@ -310,16 +310,16 @@ msgstr "Le numéro ne peut être vide"
|
|||||||
msgid "Message sent"
|
msgid "Message sent"
|
||||||
msgstr "Message envoyé"
|
msgstr "Message envoyé"
|
||||||
|
|
||||||
#: ../src/phone.c:3642
|
#: ../src/phone.c:3643
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Wrong %s"
|
msgid "Wrong %s"
|
||||||
msgstr "Mauvais %s"
|
msgstr "Mauvais %s"
|
||||||
|
|
||||||
#: ../src/phone.c:3649
|
#: ../src/phone.c:3650
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s is valid"
|
msgid "%s is valid"
|
||||||
msgstr "%s valide"
|
msgstr "%s valide"
|
||||||
|
|
||||||
#: ../src/phone.c:3712
|
#: ../src/phone.c:3713
|
||||||
msgid "Raw data (not shown)"
|
msgid "Raw data (not shown)"
|
||||||
msgstr "Données brutes (non affichées)"
|
msgstr "Données brutes (non affichées)"
|
||||||
|
@ -180,6 +180,9 @@ enum
|
|||||||
HAYES_REQUEST_REGISTRATION_UNSOLLICITED_ENABLE,
|
HAYES_REQUEST_REGISTRATION_UNSOLLICITED_ENABLE,
|
||||||
HAYES_REQUEST_SIGNAL_LEVEL,
|
HAYES_REQUEST_SIGNAL_LEVEL,
|
||||||
HAYES_REQUEST_SIM_PIN_VALID,
|
HAYES_REQUEST_SIM_PIN_VALID,
|
||||||
|
HAYES_REQUEST_SUPPLEMENTARY_SERVICE_DATA_CANCEL,
|
||||||
|
HAYES_REQUEST_SUPPLEMENTARY_SERVICE_DATA_ENABLE,
|
||||||
|
HAYES_REQUEST_SUPPLEMENTARY_SERVICE_DATA_DISABLE,
|
||||||
HAYES_REQUEST_VENDOR,
|
HAYES_REQUEST_VENDOR,
|
||||||
HAYES_REQUEST_VERBOSE,
|
HAYES_REQUEST_VERBOSE,
|
||||||
HAYES_REQUEST_VERSION
|
HAYES_REQUEST_VERSION
|
||||||
@ -308,6 +311,7 @@ static void _on_trigger_cpin(ModemPlugin * modem, char const * answer);
|
|||||||
static void _on_trigger_creg(ModemPlugin * modem, char const * answer);
|
static void _on_trigger_creg(ModemPlugin * modem, char const * answer);
|
||||||
static void _on_trigger_cring(ModemPlugin * modem, char const * answer);
|
static void _on_trigger_cring(ModemPlugin * modem, char const * answer);
|
||||||
static void _on_trigger_csq(ModemPlugin * modem, char const * answer);
|
static void _on_trigger_csq(ModemPlugin * modem, char const * answer);
|
||||||
|
static void _on_trigger_cusd(ModemPlugin * modem, char const * answer);
|
||||||
|
|
||||||
/* helpers */
|
/* helpers */
|
||||||
static int _is_figure(int c);
|
static int _is_figure(int c);
|
||||||
@ -462,6 +466,12 @@ static HayesRequestHandler _hayes_request_handlers[] =
|
|||||||
_on_request_generic },
|
_on_request_generic },
|
||||||
{ HAYES_REQUEST_SIM_PIN_VALID, "AT+CPIN?",
|
{ HAYES_REQUEST_SIM_PIN_VALID, "AT+CPIN?",
|
||||||
_on_request_authentication },
|
_on_request_authentication },
|
||||||
|
{ HAYES_REQUEST_SUPPLEMENTARY_SERVICE_DATA_CANCEL,"AT+CUSD=2",
|
||||||
|
_on_request_generic },
|
||||||
|
{ HAYES_REQUEST_SUPPLEMENTARY_SERVICE_DATA_DISABLE,"AT+CUSD=0",
|
||||||
|
_on_request_generic },
|
||||||
|
{ HAYES_REQUEST_SUPPLEMENTARY_SERVICE_DATA_ENABLE,"AT+CUSD=1",
|
||||||
|
_on_request_generic },
|
||||||
{ HAYES_REQUEST_VENDOR, "AT+CGMI",
|
{ HAYES_REQUEST_VENDOR, "AT+CGMI",
|
||||||
_on_request_model },
|
_on_request_model },
|
||||||
{ HAYES_REQUEST_VERBOSE, "ATV1",
|
{ HAYES_REQUEST_VERBOSE, "ATV1",
|
||||||
@ -515,6 +525,7 @@ static HayesTriggerHandler _hayes_trigger_handlers[] =
|
|||||||
{ "+CREG", _on_trigger_creg },
|
{ "+CREG", _on_trigger_creg },
|
||||||
{ "+CRING", _on_trigger_cring },
|
{ "+CRING", _on_trigger_cring },
|
||||||
{ "+CSQ", _on_trigger_csq },
|
{ "+CSQ", _on_trigger_csq },
|
||||||
|
{ "+CUSD", _on_trigger_cusd },
|
||||||
{ "BUSY", _on_trigger_call_error },
|
{ "BUSY", _on_trigger_call_error },
|
||||||
{ "CONNECT", _on_trigger_connect },
|
{ "CONNECT", _on_trigger_connect },
|
||||||
{ "NO CARRIER", _on_trigger_call_error },
|
{ "NO CARRIER", _on_trigger_call_error },
|
||||||
@ -756,7 +767,7 @@ static char * _request_attention_call_hangup(ModemPlugin * modem)
|
|||||||
ModemEvent * event = &hayes->events[MODEM_EVENT_TYPE_CONNECTION];
|
ModemEvent * event = &hayes->events[MODEM_EVENT_TYPE_CONNECTION];
|
||||||
|
|
||||||
/* FIXME check that this works on all phones, including:
|
/* FIXME check that this works on all phones, including:
|
||||||
* - while calling (still ringing)
|
* - while calling (still ringing) => simply inject "\r\n"?
|
||||||
* - while ringing (incoming) */
|
* - while ringing (incoming) */
|
||||||
if(hayes->mode == HAYES_MODE_DATA)
|
if(hayes->mode == HAYES_MODE_DATA)
|
||||||
{
|
{
|
||||||
@ -2154,8 +2165,12 @@ static HayesCommandStatus _on_request_authentication(HayesCommand * command,
|
|||||||
/* force a registration report */
|
/* force a registration report */
|
||||||
request.type = HAYES_REQUEST_REGISTRATION;
|
request.type = HAYES_REQUEST_REGISTRATION;
|
||||||
_hayes_request(modem, &request);
|
_hayes_request(modem, &request);
|
||||||
|
/* report new messages */
|
||||||
request.type = HAYES_REQUEST_MESSAGE_UNSOLLICITED_ENABLE;
|
request.type = HAYES_REQUEST_MESSAGE_UNSOLLICITED_ENABLE;
|
||||||
_hayes_request(modem, &request);
|
_hayes_request(modem, &request);
|
||||||
|
/* report new notifications */
|
||||||
|
request.type = HAYES_REQUEST_SUPPLEMENTARY_SERVICE_DATA_ENABLE;
|
||||||
|
_hayes_request(modem, &request);
|
||||||
/* refresh the current call status */
|
/* refresh the current call status */
|
||||||
_hayes_trigger(modem, MODEM_EVENT_TYPE_CALL);
|
_hayes_trigger(modem, MODEM_EVENT_TYPE_CALL);
|
||||||
/* refresh the contact list */
|
/* refresh the contact list */
|
||||||
@ -3226,6 +3241,17 @@ static void _on_trigger_csq(ModemPlugin * modem, char const * answer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* on_trigger_cusd */
|
||||||
|
static void _on_trigger_cusd(ModemPlugin * modem, char const * answer)
|
||||||
|
{
|
||||||
|
unsigned int u;
|
||||||
|
|
||||||
|
/* FIXME really implement */
|
||||||
|
if(sscanf(answer, "%u", &u) != 1)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* helpers */
|
/* helpers */
|
||||||
/* is_figure */
|
/* is_figure */
|
||||||
static int _is_figure(int c)
|
static int _is_figure(int c)
|
||||||
|
@ -326,7 +326,7 @@ static const struct
|
|||||||
GtkTreeModelFilterVisibleFunc filter;
|
GtkTreeModelFilterVisibleFunc filter;
|
||||||
} _phone_message_filters[5] =
|
} _phone_message_filters[5] =
|
||||||
{
|
{
|
||||||
/* FIXME provide the icons ourselves */
|
/* FIXME provide the icon ourselves */
|
||||||
{ "stock_all", N_("All"), _phone_messages_filter_all },
|
{ "stock_all", N_("All"), _phone_messages_filter_all },
|
||||||
{ "phone-inbox", N_("Inbox"), _phone_messages_filter_inbox },
|
{ "phone-inbox", N_("Inbox"), _phone_messages_filter_inbox },
|
||||||
{ "phone-sent", N_("Outbox"), _phone_messages_filter_outbox },
|
{ "phone-sent", N_("Outbox"), _phone_messages_filter_outbox },
|
||||||
@ -3611,6 +3611,7 @@ static void _phone_modem_event(void * priv, ModemEvent * event)
|
|||||||
modem_request_type(phone->modem,
|
modem_request_type(phone->modem,
|
||||||
MODEM_REQUEST_CONTACT_LIST);
|
MODEM_REQUEST_CONTACT_LIST);
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
|
/* FIXME this is clearly out of place */
|
||||||
_phone_track(phone, PHONE_TRACK_MESSAGE_LIST, TRUE);
|
_phone_track(phone, PHONE_TRACK_MESSAGE_LIST, TRUE);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user