Android Open Source - CipherChat Globals






From Project

Back to project page CipherChat.

License

The source code is released under:

MIT License

If you think the Android project CipherChat 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 com.ist.cipherchat.networking;
/*from  w  w  w.  j a va2 s.  c o  m*/
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;

import javax.crypto.spec.SecretKeySpec;

public class Globals {

  private static Socket ClientSocket;
  private static Socket ServerSocket;

  private static String thisUsername;
  private static String otherUsername;

  private static SecretKeySpec sessionKey;

  private static ObjectInputStream ois;
  private static ObjectOutputStream oos;

  private Globals() {

  }

  public static synchronized Socket getClientSocket() {
    return ClientSocket;
  }

  public static synchronized void setClientSocket(Socket clientSocket) {
    ClientSocket = clientSocket;
  }

  public static synchronized Socket getServerSocket() {
    return ServerSocket;
  }

  public static synchronized void setServerSocket(Socket serverSocket) {
    ServerSocket = serverSocket;
  }

  public static synchronized String getThisUsername() {
    return thisUsername;
  }

  public static synchronized void setThisUsername(String thisUsername) {
    Globals.thisUsername = thisUsername;
  }

  public static synchronized String getOtherUsername() {
    return otherUsername;
  }

  public static synchronized void setOtherUsername(String otherUsername) {
    Globals.otherUsername = otherUsername;
  }

  public static synchronized SecretKeySpec getSessionKey() {
    return sessionKey;
  }

  public static synchronized void setSessionKey(SecretKeySpec sessionKey) {
    Globals.sessionKey = sessionKey;
  }

  public static synchronized ObjectInputStream getOis() {
    System.out.println("OIS gotten here");
    return ois;
  }

  public static synchronized void setOis(ObjectInputStream ois) {
    Globals.ois = ois;
    System.out.println("OIS set here");
  }

  public static synchronized ObjectOutputStream getOos() {
    System.out.println("OOS gotten here");
    return oos;

  }

  public static synchronized void setOos(ObjectOutputStream oos) {
    Globals.oos = oos;
    System.out.println("OOS set here");
  }
}




Java Source Code List

com.desperate.AdminConsole.java
com.desperate.ClientHandler.java
com.desperate.CryptoServer.java
com.desperate.UserDatabase.java
com.desperate.User.java
com.desperate.common.Message.java
com.desperate.common.NoncePacket.java
com.desperate.common.SessionKeyRequestInfo.java
com.desperate.common.TestCipherSerializable.java
com.desperate.common.Utilities.java
com.desperate.common.messages.ChatMessage.java
com.desperate.common.messages.IPMessage.java
com.desperate.common.messages.LoginMessage.java
com.desperate.common.messages.LogoutMessage.java
com.desperate.common.messages.RegisterMessage.java
com.desperate.common.messages.SessionKeyRequestMessage.java
com.desperate.common.messages.StartChatMessage.java
com.desperate.common.messages.UserListMessage.java
com.desperate.common.replies.CheckSessionMessage.java
com.desperate.common.replies.IPReplyMessage.java
com.desperate.common.replies.LoginReplyMessage.java
com.desperate.common.replies.LogoutReplyMessage.java
com.desperate.common.replies.NeedhamSchroederSuccessReply.java
com.desperate.common.replies.RegisterReplyMessage.java
com.desperate.common.replies.ReplyMessage.java
com.desperate.common.replies.SessionKeyReplyMessage.java
com.desperate.common.replies.StartChatReply.java
com.desperate.common.replies.UserListReplyMessage.java
com.desperate.debug.DebugClient.java
com.desperate.debug.DebugCryptoClient.java
com.desperate.debug.PlainServer.java
com.ist.cipherchat.gui.ChatActivity.java
com.ist.cipherchat.gui.ChooseServerActivity.java
com.ist.cipherchat.gui.Contacts.java
com.ist.cipherchat.gui.Origin.java
com.ist.cipherchat.networking.ChatActivityRunnable.java
com.ist.cipherchat.networking.ChatInRunnable.java
com.ist.cipherchat.networking.ChatOutHandler.java
com.ist.cipherchat.networking.Core.java
com.ist.cipherchat.networking.Globals.java
com.ist.cipherchat.networking.OutputSocketHandler.java
com.ist.cipherchat.networking.PhoneServerSocketHandler.java
com.ist.cipherchat.networking.ThreadComm.java