aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--introspection/Makefile.am6
-rw-r--r--introspection/all.xml5
-rw-r--r--introspection/mm-mobile-error.xml318
-rw-r--r--introspection/mm-modem-connect-error.xml30
-rw-r--r--introspection/mm-modem-error.xml18
-rw-r--r--introspection/mm-serial-error.xml24
-rw-r--r--src/mm-errors.c112
-rw-r--r--src/mm-errors.h2
-rw-r--r--src/mm-manager.c1
9 files changed, 457 insertions, 59 deletions
diff --git a/introspection/Makefile.am b/introspection/Makefile.am
index d318088a..3b8e3d18 100644
--- a/introspection/Makefile.am
+++ b/introspection/Makefile.am
@@ -1,10 +1,14 @@
EXTRA_DIST = \
mm-manager.xml \
+ mm-mobile-error.xml \
mm-modem.xml \
mm-modem-cdma.xml \
+ mm-modem-connect-error.xml \
+ mm-modem-error.xml \
mm-modem-gsm-card.xml \
mm-modem-gsm-contacts.xml \
mm-modem-gsm-hso.xml \
mm-modem-gsm-network.xml \
- mm-modem-gsm-sms.xml
+ mm-modem-gsm-sms.xml \
+ mm-serial-error.xml
diff --git a/introspection/all.xml b/introspection/all.xml
index 940ae598..dfe33b37 100644
--- a/introspection/all.xml
+++ b/introspection/all.xml
@@ -30,4 +30,9 @@
<xi:include href="mm-modem-gsm-network.xml"/>
<xi:include href="mm-modem-gsm-sms.xml"/>
<xi:include href="mm-modem-gsm-hso.xml"/>
+
+ <xi:include href="mm-serial-error.xml"/>
+ <xi:include href="mm-modem-error.xml"/>
+ <xi:include href="mm-modem-connect-error.xml"/>
+ <xi:include href="mm-mobile-error.xml"/>
</tp:spec>
diff --git a/introspection/mm-mobile-error.xml b/introspection/mm-mobile-error.xml
new file mode 100644
index 00000000..5edbcb76
--- /dev/null
+++ b/introspection/mm-mobile-error.xml
@@ -0,0 +1,318 @@
+<?xml version="1.0" ?>
+<tp:errors xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
+ namespace="org.freedesktop.ModemManager.Modem.Gsm">
+ <tp:copyright>Copyright (C) 2008 Novell, Inc.</tp:copyright>
+
+ <tp:error name="PhoneFailure">
+ <tp:docstring>
+ A phone failure.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="NoConnection">
+ <tp:docstring>
+ No connection to phone.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="LinkReserved">
+ <tp:docstring>
+ Phone-adaptor link reserved.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="OperationNotAllowed">
+ <tp:docstring>
+ Operation not allowed.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="OperationNotSupported">
+ <tp:docstring>
+ Operation not supported.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="PhSimPinRequired">
+ <tp:docstring>
+ PH-SIM PIN required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="PhFSimPinRequired">
+ <tp:docstring>
+ PH-FSIM PIN required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="PhFSimPukRequired">
+ <tp:docstring>
+ PH-FSIM PUK required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="SimNotInserted">
+ <tp:docstring>
+ SIM not inserted.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="SimPinRequired">
+ <tp:docstring>
+ SIM PIN required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="SimPukRequired">
+ <tp:docstring>
+ SIM PUK required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="SimFailure">
+ <tp:docstring>
+ SIM failure.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="SimBusy">
+ <tp:docstring>
+ SIM busy.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="SimWrong">
+ <tp:docstring>
+ SIM wrong.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="IncorrectPassword">
+ <tp:docstring>
+ Incorrect password.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="SimPin2Required">
+ <tp:docstring>
+ SIM PIN2 required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="SimPuk2Required">
+ <tp:docstring>
+ SIM PUK2 required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="MemoryFull">
+ <tp:docstring>
+ Memory full.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="InvalidIndex">
+ <tp:docstring>
+ Invalid index.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="NotFound">
+ <tp:docstring>
+ Not found.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="MemoryFailure">
+ <tp:docstring>
+ Memory failure.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="TextTooLong">
+ <tp:docstring>
+ Text string too long.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="InvalidChars">
+ <tp:docstring>
+ Invalid characters in text string.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="DialStringTooLong">
+ <tp:docstring>
+ Dial string too long.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="InvalidDialString">
+ <tp:docstring>
+ Invalid characters in dial string.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="NoNetwork">
+ <tp:docstring>
+ No network service.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="NetworkTimeout">
+ <tp:docstring>
+ Network timeout.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="NetworkNotAllowed">
+ <tp:docstring>
+ Network not allowed - emergency calls only.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="NetworkPinRequired">
+ <tp:docstring>
+ Network personalization PIN required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="NetworkPukRequired">
+ <tp:docstring>
+ Network personalization PUK required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="NetworkSubsetPinRequired">
+ <tp:docstring>
+ Network subset personalization PIN required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="NetworkSubsetPukRequired">
+ <tp:docstring>
+ Network subset personalization PUK required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="ServicePinRequired">
+ <tp:docstring>
+ Service provider personalization PIN required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="ServicePukRequired">
+ <tp:docstring>
+ Service provider personalization PUK required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="CorporatePinRequired">
+ <tp:docstring>
+ Corporate personalization PIN required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="CorporatePukRequired">
+ <tp:docstring>
+ Corporate personalization PUK required.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="HiddenKeyRequired">
+ <tp:docstring>
+ Hidden key required. This key is required when accessing hidden phonebook entries.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="EapMethodNotSupported">
+ <tp:docstring>
+ EAP method not supported.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="IncorrectParams">
+ <tp:docstring>
+ Incorrect parameters.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="Unknown">
+ <tp:docstring>
+ An unknown error.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="GprsIllegalMs">
+ <tp:docstring>
+ Illegal MS.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="GprsIllegalMe">
+ <tp:docstring>
+ Illegal ME.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="GprsServiceNotAllowed">
+ <tp:docstring>
+ GPRS services not allowed.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="GprsPlmnNotAllowed">
+ <tp:docstring>
+ PLMN not allowed.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="GprsLocationNotAllowed">
+ <tp:docstring>
+ Location area not allowed.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="GprsRoamingNotAllowed">
+ <tp:docstring>
+ Roaming not allowed in this location area.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="GprsOptionNotSupported">
+ <tp:docstring>
+ Service option not supported.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="GprsNotSubscribed">
+ <tp:docstring>
+ Requested service option not subscribed.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="GprsOutOfOrder">
+ <tp:docstring>
+ Service option temporarily out of order.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="GprsPdpAuthFailure">
+ <tp:docstring>
+ PDP authentication failure.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="GprsUnspecified">
+ <tp:docstring>
+ Unspecified GPRS error
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="GprsInvalidClass">
+ <tp:docstring>
+ Invalid mobile class.
+ </tp:docstring>
+ </tp:error>
+
+</tp:errors>
diff --git a/introspection/mm-modem-connect-error.xml b/introspection/mm-modem-connect-error.xml
new file mode 100644
index 00000000..ea0d24bd
--- /dev/null
+++ b/introspection/mm-modem-connect-error.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" ?>
+<tp:errors xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
+ namespace="org.freedesktop.ModemManager.Modem">
+ <tp:copyright>Copyright (C) 2008 Novell, Inc.</tp:copyright>
+
+ <tp:error name="NoCarrier">
+ <tp:docstring>
+ No carrier.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="NoDialtone">
+ <tp:docstring>
+ No dialtone.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="Busy">
+ <tp:docstring>
+ Busy.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="NoAnser">
+ <tp:docstring>
+ No answer.
+ </tp:docstring>
+ </tp:error>
+
+</tp:errors>
diff --git a/introspection/mm-modem-error.xml b/introspection/mm-modem-error.xml
new file mode 100644
index 00000000..d80df6c1
--- /dev/null
+++ b/introspection/mm-modem-error.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+<tp:errors xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
+ namespace="org.freedesktop.ModemManager.Modem">
+ <tp:copyright>Copyright (C) 2008 Novell, Inc.</tp:copyright>
+
+ <tp:error name="General">
+ <tp:docstring>
+ A generic error. An example of a generic error is ModemManager not being able to parse the response from modem.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="OperationNotSupported">
+ <tp:docstring>
+ Operation not implemented by modem.
+ </tp:docstring>
+ </tp:error>
+
+</tp:errors>
diff --git a/introspection/mm-serial-error.xml b/introspection/mm-serial-error.xml
new file mode 100644
index 00000000..338a2232
--- /dev/null
+++ b/introspection/mm-serial-error.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" ?>
+<tp:errors xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
+ namespace="org.freedesktop.ModemManager.Modem">
+ <tp:copyright>Copyright (C) 2008 Novell, Inc.</tp:copyright>
+
+ <tp:error name="SerialOpenFailed">
+ <tp:docstring>
+ Could not open serial device.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="SerialSendFailed">
+ <tp:docstring>
+ Could not write to the serial device.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="SerialResponseTimeout">
+ <tp:docstring>
+ A response was not received in time.
+ </tp:docstring>
+ </tp:error>
+
+</tp:errors>
diff --git a/src/mm-errors.c b/src/mm-errors.c
index 129275fd..2523e5fc 100644
--- a/src/mm-errors.c
+++ b/src/mm-errors.c
@@ -7,91 +7,91 @@
GQuark
mm_serial_error_quark (void)
{
- static GQuark ret = 0;
+ static GQuark ret = 0;
- if (ret == 0)
- ret = g_quark_from_static_string ("mm_serial_error");
+ if (ret == 0)
+ ret = g_quark_from_static_string ("mm_serial_error");
- return ret;
+ return ret;
}
GType
mm_serial_error_get_type (void)
{
- static GType etype = 0;
+ static GType etype = 0;
- if (etype == 0) {
- static const GEnumValue values[] = {
- ENUM_ENTRY (MM_SERIAL_OPEN_FAILED, "SerialOpenFailed"),
- ENUM_ENTRY (MM_SERIAL_SEND_FAILED, "SerialSendfailed"),
- ENUM_ENTRY (MM_SERIAL_RESPONSE_TIMEOUT, "SerialResponseTimeout"),
- { 0, 0, 0 }
- };
+ if (etype == 0) {
+ static const GEnumValue values[] = {
+ ENUM_ENTRY (MM_SERIAL_OPEN_FAILED, "SerialOpenFailed"),
+ ENUM_ENTRY (MM_SERIAL_SEND_FAILED, "SerialSendfailed"),
+ ENUM_ENTRY (MM_SERIAL_RESPONSE_TIMEOUT, "SerialResponseTimeout"),
+ { 0, 0, 0 }
+ };
- etype = g_enum_register_static ("MMSerialError", values);
- }
+ etype = g_enum_register_static ("MMSerialError", values);
+ }
- return etype;
+ return etype;
}
GQuark
mm_modem_error_quark (void)
{
- static GQuark ret = 0;
+ static GQuark ret = 0;
- if (ret == 0)
- ret = g_quark_from_static_string ("mm_modem_error");
+ if (ret == 0)
+ ret = g_quark_from_static_string ("mm_modem_error");
- return ret;
+ return ret;
}
GType
mm_modem_error_get_type (void)
{
- static GType etype = 0;
+ static GType etype = 0;
- if (etype == 0) {
- static const GEnumValue values[] = {
+ if (etype == 0) {
+ static const GEnumValue values[] = {
ENUM_ENTRY (MM_MODEM_ERROR_GENERAL, "Generial"),
- ENUM_ENTRY (MM_MODEM_ERROR_OPERATION_NOT_SUPPORTED, "OperationNotSupported"),
- { 0, 0, 0 }
- };
+ ENUM_ENTRY (MM_MODEM_ERROR_OPERATION_NOT_SUPPORTED, "OperationNotSupported"),
+ { 0, 0, 0 }
+ };
- etype = g_enum_register_static ("MMModemError", values);
- }
+ etype = g_enum_register_static ("MMModemError", values);
+ }
- return etype;
+ return etype;
}
GQuark
mm_modem_connect_error_quark (void)
{
- static GQuark ret = 0;
+ static GQuark ret = 0;
- if (ret == 0)
- ret = g_quark_from_static_string ("mm_modem_connect_error");
+ if (ret == 0)
+ ret = g_quark_from_static_string ("mm_modem_connect_error");
- return ret;
+ return ret;
}
GType
mm_modem_connect_error_get_type (void)
{
- static GType etype = 0;
+ static GType etype = 0;
- if (etype == 0) {
- static const GEnumValue values[] = {
- ENUM_ENTRY (MM_MODEM_CONNECT_ERROR_NO_CARRIER, "NoCarrier"),
+ if (etype == 0) {
+ static const GEnumValue values[] = {
+ ENUM_ENTRY (MM_MODEM_CONNECT_ERROR_NO_CARRIER, "NoCarrier"),
ENUM_ENTRY (MM_MODEM_CONNECT_ERROR_NO_DIALTONE, "NoDialtone"),
- ENUM_ENTRY (MM_MODEM_CONNECT_ERROR_BUSY, "Busy"),
- ENUM_ENTRY (MM_MODEM_CONNECT_ERROR_NO_ANSWER, "NoAnswer"),
- { 0, 0, 0 }
- };
+ ENUM_ENTRY (MM_MODEM_CONNECT_ERROR_BUSY, "Busy"),
+ ENUM_ENTRY (MM_MODEM_CONNECT_ERROR_NO_ANSWER, "NoAnswer"),
+ { 0, 0, 0 }
+ };
- etype = g_enum_register_static ("MMModemConnectError", values);
- }
+ etype = g_enum_register_static ("MMModemConnectError", values);
+ }
- return etype;
+ return etype;
}
GError *
@@ -127,22 +127,22 @@ mm_modem_connect_error_for_code (int error_code)
GQuark
mm_mobile_error_quark (void)
{
- static GQuark ret = 0;
+ static GQuark ret = 0;
- if (ret == 0)
- ret = g_quark_from_static_string ("mm_mobile_error");
+ if (ret == 0)
+ ret = g_quark_from_static_string ("mm_mobile_error");
- return ret;
+ return ret;
}
GType
mm_mobile_error_get_type (void)
{
- static GType etype = 0;
+ static GType etype = 0;
- if (etype == 0) {
- static const GEnumValue values[] = {
- ENUM_ENTRY (MM_MOBILE_ERROR_PHONE_FAILURE, "PhoneFailure"),
+ if (etype == 0) {
+ static const GEnumValue values[] = {
+ ENUM_ENTRY (MM_MOBILE_ERROR_PHONE_FAILURE, "PhoneFailure"),
ENUM_ENTRY (MM_MOBILE_ERROR_NO_CONNECTION, "NoConnection"),
ENUM_ENTRY (MM_MOBILE_ERROR_LINK_RESERVED, "LinkReserved"),
ENUM_ENTRY (MM_MOBILE_ERROR_NOT_ALLOWED, "OperationNotAllowed"),
@@ -194,13 +194,13 @@ mm_mobile_error_get_type (void)
ENUM_ENTRY (MM_MOBILE_ERROR_GPRS_PDP_AUTH_FAILURE, "GprsPdpAuthFailure"),
ENUM_ENTRY (MM_MOBILE_ERROR_GPRS_UNKNOWN, "GprsUnspecified"),
ENUM_ENTRY (MM_MOBILE_ERROR_GPRS_INVALID_CLASS, "GprsInvalidClass"),
- { 0, 0, 0 }
- };
+ { 0, 0, 0 }
+ };
- etype = g_enum_register_static ("MMMobileError", values);
- }
+ etype = g_enum_register_static ("MMMobileError", values);
+ }
- return etype;
+ return etype;
}
GError *
diff --git a/src/mm-errors.h b/src/mm-errors.h
index a17f428e..e9fa3ace 100644
--- a/src/mm-errors.h
+++ b/src/mm-errors.h
@@ -7,7 +7,7 @@
enum {
MM_SERIAL_OPEN_FAILED = 0,
- MM_SERIAL_SEND_FAILED = 1,
+ MM_SERIAL_SEND_FAILED = 1,
MM_SERIAL_RESPONSE_TIMEOUT = 2
};
diff --git a/src/mm-manager.c b/src/mm-manager.c
index e7a30d7d..367053ee 100644
--- a/src/mm-manager.c
+++ b/src/mm-manager.c
@@ -454,7 +454,6 @@ mm_manager_class_init (MMManagerClass *manager_class)
dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (manager_class),
&dbus_glib_mm_manager_object_info);
- /* FIXME: Sigh, these don't work either */
dbus_g_error_domain_register (MM_SERIAL_ERROR, "org.freedesktop.ModemManager.Modem", MM_TYPE_SERIAL_ERROR);
dbus_g_error_domain_register (MM_MODEM_ERROR, "org.freedesktop.ModemManager.Modem", MM_TYPE_MODEM_ERROR);
dbus_g_error_domain_register (MM_MODEM_CONNECT_ERROR, "org.freedesktop.ModemManager.Modem", MM_TYPE_MODEM_CONNECT_ERROR);