Android Open Source - schat Content






From Project

Back to project page schat.

License

The source code is released under:

MIT License

If you think the Android project schat listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package data;
//ww w.  jav a  2 s.  co m
import java.io.Serializable;

/**
 * This is the super-class of all message contents. The message content, is the part of the message, which will be sealed before
 * transmission.
 *
 * @author Elias Frantar
 * @version 15.11.2013
 */
public abstract class Content implements Serializable { // there should not exist any instances of this class

    /**
     * The different content-types of a message.
     */
    public static enum Type {
        CHAT_MESSAGE,
        LOGIN,
        REGISTRATION, PUBLIC_KEY_REQUEST, PUBLIC_KEY_RESPONSE,
        LOGIN_SUCCESS
    }

    protected transient Type type; // this attribute must not be serialized (it is also contained in the SecureMessage class

    /**
     * Returns the type of this content.
     *
     * @return the content type (contained in the Type-enum)
     */
    public Type getType() {
        return type;
    }

    /**
     * Returns the content, properly formatted and readable in a String.
     *
     * @return the content in a String
     */
    public abstract String toString(); // must be overridden by every sub-class
}




Java Source Code List

.ServerMain.java
com.activities.Activity_Chat.java
com.activities.Activity_ContactList.java
com.activities.ContactView.java
com.data.AddContact.java
com.data.AndroidSQLManager.java
com.data.ApplicationUser.java
com.data.ChatAdapter.java
com.data.ChatArrayList.java
com.data.MySQLiteHelper.java
com.security.AndroidKeyPairManager.java
com.security.PRNGFixes.java
com.services.MessageService.java
crypto.CryptoConstants.java
crypto.Cryptography.java
crypto.Envelope.java
crypto.SecureMessage.java
crypto.TestCrypto.java
data.ChatMessage.java
data.Content.java
data.DatabaseManager.java
data.KeyPairManager.java
data.Message.java
data.SQLiteManager.java
data.User.java
data.contents.ChatContent.java
data.contents.LoginSuccess.java
data.contents.Login.java
data.contents.PublicKeyRequest.java
data.contents.PublicKeyResponse.java
data.contents.Registration.java
networking.SChatClientListener.java
networking.SChatClientWriter.java
networking.SChatClient.java
networking.SChatServerThread.java
networking.SChatServer.java