2018-07-19 18:51:22 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2018 Paul Schaub
|
|
|
|
*
|
|
|
|
* This file is part of OXClient.
|
|
|
|
*
|
|
|
|
* OXClient is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
2018-06-01 15:55:00 +02:00
|
|
|
package de.vanitasvitae.oxclient;
|
|
|
|
|
|
|
|
import java.util.Scanner;
|
2018-06-21 15:21:06 +02:00
|
|
|
import java.util.logging.ConsoleHandler;
|
|
|
|
import java.util.logging.Level;
|
|
|
|
import java.util.logging.Logger;
|
2018-06-01 15:55:00 +02:00
|
|
|
|
|
|
|
import org.jivesoftware.smack.SmackConfiguration;
|
|
|
|
|
|
|
|
public class Main {
|
|
|
|
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
|
2018-07-19 18:51:22 +02:00
|
|
|
/*
|
2018-06-21 15:21:06 +02:00
|
|
|
SmackConfiguration.DEBUG = true;
|
2018-07-19 18:51:22 +02:00
|
|
|
/*/
|
|
|
|
SmackConfiguration.DEBUG = false;
|
|
|
|
//*
|
|
|
|
|
2018-06-01 15:55:00 +02:00
|
|
|
SmackConfiguration.setDefaultReplyTimeout(10 * 1000);
|
2018-06-21 15:21:06 +02:00
|
|
|
ConsoleHandler handler = new ConsoleHandler();
|
|
|
|
handler.setLevel(Level.FINER);
|
|
|
|
Logger.getGlobal().addHandler(handler);
|
2018-06-01 15:55:00 +02:00
|
|
|
|
|
|
|
String username, password;
|
|
|
|
Scanner scanner = new Scanner(System.in);
|
|
|
|
System.out.println("Please enter your JID:");
|
|
|
|
username = scanner.nextLine();
|
|
|
|
System.out.println("Please enter your password:");
|
|
|
|
password = scanner.nextLine();
|
|
|
|
|
|
|
|
Client client = new Client(username, password);
|
|
|
|
client.start();
|
|
|
|
}
|
|
|
|
}
|