summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarun Gupta <tarun1995gupta@gmail.com>2015-07-15 23:49:56 (GMT)
committerNick Hudson <nick.hudson@isode.com>2015-07-28 15:42:52 (GMT)
commit251813ccca9404d8d4122b2848f9fec86a451bf5 (patch)
treea1ebb0f6a04547ef6b588ea85c1a50ea5d8e4997 /src/com/isode/stroke/component/ComponentError.java
parent673655830b0325d964e67fa835ea83f485e9beeb (diff)
downloadstroke-251813ccca9404d8d4122b2848f9fec86a451bf5.zip
stroke-251813ccca9404d8d4122b2848f9fec86a451bf5.tar.bz2
Completes Components and AdHoc.
Adds Component, ComponentConnector, ComponentError, ComponentSession, ComponentXMLTracer, CoreComponent, ComponentSessionStanzaChannel, ComponentXMTracer, CoreComponent. Updates CoreClient, StrokeGUI, BasicSessionStream and SessionStream and Client, so that signal definition can be changed. Updates ComponentHandshake element, Entity. Updates OutgoingAdHocCommandSession to have feature parity with Swiften. This patch does not port Client or Session fully, which will be done in separate future patches. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Test added for ComponentSession, which passes. Test for ComponentConnector cannot be ported right now and will be done in future patches, as it requires some bits of Network to be ported. Change-Id: I7138a2041fe28a2be7ac57cb47b15365f9334b24
Diffstat (limited to 'src/com/isode/stroke/component/ComponentError.java')
-rw-r--r--src/com/isode/stroke/component/ComponentError.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/com/isode/stroke/component/ComponentError.java b/src/com/isode/stroke/component/ComponentError.java
new file mode 100644
index 0000000..576e3dc
--- /dev/null
+++ b/src/com/isode/stroke/component/ComponentError.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2010-2015 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+/*
+ * Copyright (c) 2015 Tarun Gupta.
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+package com.isode.stroke.component;
+
+public class ComponentError {
+
+ public enum Type {
+ UnknownError,
+ ConnectionError,
+ ConnectionReadError,
+ ConnectionWriteError,
+ XMLError,
+ AuthenticationFailedError,
+ UnexpectedElementError
+ };
+
+ private Type type_;
+
+ public ComponentError() {
+ this(Type.UnknownError);
+ }
+
+ public ComponentError(Type type) {
+ this.type_ = type;
+ }
+
+ public Type getType() {
+ return type_;
+ }
+} \ No newline at end of file