summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJonatan Pålsson <jonatan.palsson@pelagicore.com>2014-02-12 16:31:58 +0100
committerJonatan Pålsson <jonatan.palsson@pelagicore.com>2014-02-16 15:26:15 +0100
commit426cdb955dcc78283c952aa126183082993e4070 (patch)
tree8d089d75e82fd9ef91284faa44910a3b3fbdcf53 /common
parent41d97ab8fac99137fff982d0ce3b0d6cbd01782d (diff)
downloadbrowser-poc-426cdb955dcc78283c952aa126183082993e4070.tar.gz
Added errorlogger stub
Diffstat (limited to 'common')
-rw-r--r--common/IErrorLogger.xml37
-rw-r--r--common/INetworkManager.xml45
-rw-r--r--common/browserdefs.h81
3 files changed, 163 insertions, 0 deletions
diff --git a/common/IErrorLogger.xml b/common/IErrorLogger.xml
new file mode 100644
index 0000000..9beca00
--- /dev/null
+++ b/common/IErrorLogger.xml
@@ -0,0 +1,37 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+
+
+<node>
+ <interface name="conn.brw.IErrorLogger">
+ <version>1.0.0</version>
+ <doc>
+ <line>Error logger. Provides list of the errors.</line>
+ </doc>
+
+ <method name="getItemsCount">
+ <arg name="retval" type="u" direction="out"/>
+ <arg name="a_i64TimeFrom" type="x" direction="in"/>
+ <arg name="a_i64TimeTo" type="x" direction="in"/>
+ </method>
+
+ <method name="getItems">
+ <arg name="a_i64TimeFrom" type="x" direction="in"/>
+ <arg name="a_i64TimeTo" type="x" direction="in"/>
+ <arg name="a_eSortType" type="(i)" direction="in"/>
+ <arg name="a_u32StartIndex" type="u" direction="in"/>
+ <arg name="a_u32ItemsCount" type="u" direction="in"/>
+ <arg name="retval" type="(i)" direction="out"/>
+ <arg name="a_oItems" type="a(xsssss)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="conn::brw::ERROR_SORT_TYPE" />
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="conn::brw::ErrorItemList" />
+ </method>
+
+ <signal name="onErrorListChanged" />
+
+ <signal name="onNewErrorItem">
+ <arg name="a_rNewErrorItem" type="(xsssss)"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="const conn::brw::ErrorItem &amp;" />
+ </signal>
+ </interface>
+</node>
diff --git a/common/INetworkManager.xml b/common/INetworkManager.xml
new file mode 100644
index 0000000..a4e9d9d
--- /dev/null
+++ b/common/INetworkManager.xml
@@ -0,0 +1,45 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+
+<node>
+ <interface name="conn.brw.INetworkManager">
+
+ <method name="closeAuthenticationDialog">
+ <arg name="a_eResult" type="(i)" direction="in"/>
+ <arg name="a_oAuthenticationData" type="(sssb)" direction="in"/>
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="const conn::brw::DIALOG_RESULT" />
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="const conn::brw::AuthenticationData &amp;" />
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="closeSslErrorDialog">
+ <arg name="a_eResult" type="(i)" direction="in"/>
+ <arg name="a_bSaveCertificate" type="b" direction="in"/>
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="const conn::brw::DIALOG_RESULT" />
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <signal name="onAuthenticationDialog">
+ <arg name="a_oAuthenticationData" type="(sssb)"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="const conn::brw::AuthenticationData &amp;" />
+ </signal>
+
+ <signal name="onAuthenticationDialogCancel">
+ <arg name="a_oAuthenticationData" type="(sssb)"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="const conn::brw::AuthenticationData &amp;" />
+ </signal>
+
+ <signal name="onSslErrorDialog">
+ <arg name="a_eSsLError" type="(iss)"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="const conn::brw::SslError &amp;" />
+ </signal>
+
+ <signal name="onSslErrorDialogCancel">
+ <arg name="a_eSsLError" type="(iss)"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="const conn::brw::SslError &amp;" />
+ </signal>
+
+ </interface>
+</node>
+
diff --git a/common/browserdefs.h b/common/browserdefs.h
index c72e05d..8499904 100644
--- a/common/browserdefs.h
+++ b/common/browserdefs.h
@@ -578,6 +578,84 @@ namespace conn {
return args;
//#]
}
+
+ /*!
+ * Defines sorting order of error items:
+ EST_DATE_ASCENDING - the error items are sorted by the date in ascending order;
+ EST_DATE_DESCENDING - the error items are sorted by the date in descending order;
+
+ */
+ //## type ERROR_SORT_TYPE
+ enum ERROR_SORT_TYPE
+ {
+ EST_DATE_ASCENDING = 0,
+ EST_DATE_DESCENDING = 1
+ };
+
+ struct ErrorItem
+ {
+ /*!
+ * Timestamp when the error happened
+ */
+ qlonglong i64DateTime; //## attribute i64DateTime
+ /*!
+ * Browser version
+ */
+ QString strBrowserVersion; //## attribute strBrowserVersion
+ /*!
+ * Internet connection used.
+ */
+ QString strConnectionType; //## attribute strConnectionType
+ /*!
+ * Error code. It could be HTTP error codes, or internal codes.
+ */
+ QString strCode; //## attribute strCode
+ /*!
+ * Information about the place where the error happened. Could be name of a module, class or method.
+ */
+ QString strSource; //## attribute strSource
+ /*!
+ * Short text description of the error.
+ */
+ QString strDescription; //## attribute strDescription
+ };
+
+ //## package connInterfaces::connPublic::conn::brw::def
+ //## class ErrorItemList
+ /*!
+ *
+ */
+ typedef QList<conn::brw::ErrorItem> ErrorItemList;
+
+ //## operation operator>>(QDBusArgument,ErrorItem)
+ inline const QDBusArgument& operator>>(const QDBusArgument& args, ErrorItem& error) {
+ //#[ operation operator>>(QDBusArgument,ErrorItem)
+ args.beginStructure();
+ args >> error.i64DateTime
+ >> error.strBrowserVersion
+ >> error.strConnectionType
+ >> error.strCode
+ >> error.strSource
+ >> error.strDescription;
+ args.endStructure();
+ return args;
+ //#]
+ }
+
+ //## operation operator<<(QDBusArgument,ErrorItem)
+ inline QDBusArgument& operator<<(QDBusArgument& args, const ErrorItem& error) {
+ //#[ operation operator<<(QDBusArgument,ErrorItem)
+ args.beginStructure();
+ args << error.i64DateTime
+ << error.strBrowserVersion
+ << error.strConnectionType
+ << error.strCode
+ << error.strSource
+ << error.strDescription;
+ args.endStructure();
+ return args;
+ //#]
+ }
}
}
@@ -596,5 +674,8 @@ Q_DECLARE_METATYPE(conn::brw::OBJECT_HANDLE)
Q_DECLARE_METATYPE(conn::brw::ObjectHandleList)
Q_DECLARE_METATYPE(conn::brw::SelectableOption);
Q_DECLARE_METATYPE(conn::brw::CACHE_POLICY);
+Q_DECLARE_METATYPE(conn::brw::ErrorItemList);
+Q_DECLARE_METATYPE(conn::brw::ErrorItem);
+Q_DECLARE_METATYPE(conn::brw::ERROR_SORT_TYPE);
#endif // BROWSERDEFS_H