Add account class and missing license

This commit is contained in:
Paul Schaub 2018-02-24 12:43:34 +01:00
parent 05419c3f54
commit 8e51695e69
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
18 changed files with 279 additions and 11 deletions

View File

@ -29,9 +29,6 @@ import java.util.Map;
import de.vanitasvitae.slam.xmpp.Contact; import de.vanitasvitae.slam.xmpp.Contact;
/**
* Created by Paul Schaub on 11.02.18.
*/
public class DummyStore { public class DummyStore {
public final Map<BareJid, List<Message>> conversations = new HashMap<>(); public final Map<BareJid, List<Message>> conversations = new HashMap<>();
@ -45,10 +42,10 @@ public class DummyStore {
private List<Contact> contacts() throws XmppStringprepException { private List<Contact> contacts() throws XmppStringprepException {
List<Contact> l = new ArrayList<>(); List<Contact> l = new ArrayList<>();
l.add(new Contact(JidCreate.entityBareFrom("alice@wonderland.lit"), "Alice")); l.add(new Contact(JidCreate.entityBareFrom("alice@wonderland.lit"), null, "Alice"));
l.add(new Contact(JidCreate.entityBareFrom("bob@builder.tv"))); l.add(new Contact(JidCreate.entityBareFrom("bob@builder.tv"), null));
l.add(new Contact(JidCreate.entityBareFrom("juliet@capulet.lit"), "Juliet")); l.add(new Contact(JidCreate.entityBareFrom("juliet@capulet.lit"), null, "Juliet"));
l.add(new Contact(JidCreate.entityBareFrom("romeo@montague.lit"), "Romeo <3")); l.add(new Contact(JidCreate.entityBareFrom("romeo@montague.lit"), null, "Romeo <3"));
return l; return l;
} }

View File

@ -17,7 +17,6 @@
*/ */
package de.vanitasvitae.slam.mvp.contracts; package de.vanitasvitae.slam.mvp.contracts;
import org.jivesoftware.smack.packet.Message;
import org.jxmpp.jid.EntityBareJid; import org.jxmpp.jid.EntityBareJid;
import java.util.List; import java.util.List;

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.mvp.contracts.message; package de.vanitasvitae.slam.mvp.contracts.message;
/** /**

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.mvp.contracts.message; package de.vanitasvitae.slam.mvp.contracts.message;
/** /**

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.mvp.contracts.message; package de.vanitasvitae.slam.mvp.contracts.message;
/** /**

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.mvp.contracts.message; package de.vanitasvitae.slam.mvp.contracts.message;
/** /**

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.mvp.contracts.message; package de.vanitasvitae.slam.mvp.contracts.message;
/** /**

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.mvp.contracts.message; package de.vanitasvitae.slam.mvp.contracts.message;
/** /**

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.ui; package de.vanitasvitae.slam.ui;
import android.content.Context; import android.content.Context;

View File

@ -0,0 +1,24 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.xmpp;
/**
* Created by Paul Schaub on 24.02.18.
*/
public class Account {
}

View File

@ -25,15 +25,17 @@ import org.jxmpp.jid.BareJid;
public class Contact { public class Contact {
private final BareJid jid; private final BareJid jid;
private final Account account;
private String nickname; private String nickname;
public Contact(BareJid jid) { public Contact(BareJid jid, Account account) {
this(jid, null); this(jid, account, null);
} }
public Contact(BareJid jid, String nickname) { public Contact(BareJid jid, Account account, String nickname) {
this.jid = jid; this.jid = jid;
this.nickname = nickname; this.nickname = nickname;
this.account = account;
} }
public BareJid getJid() { public BareJid getJid() {
@ -43,4 +45,12 @@ public class Contact {
public String getNickname() { public String getNickname() {
return nickname; return nickname;
} }
public Account getAccount() {
return account;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
} }

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.xmpp; package de.vanitasvitae.slam.xmpp;
/** /**

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.xmpp.message; package de.vanitasvitae.slam.xmpp.message;
import org.jxmpp.jid.Jid; import org.jxmpp.jid.Jid;

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.xmpp.message; package de.vanitasvitae.slam.xmpp.message;
import org.jxmpp.jid.Jid; import org.jxmpp.jid.Jid;

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.xmpp.message; package de.vanitasvitae.slam.xmpp.message;
import org.jxmpp.jid.Jid; import org.jxmpp.jid.Jid;

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.xmpp.message; package de.vanitasvitae.slam.xmpp.message;
import org.jxmpp.jid.Jid; import org.jxmpp.jid.Jid;

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.xmpp.message; package de.vanitasvitae.slam.xmpp.message;
import org.jxmpp.jid.Jid; import org.jxmpp.jid.Jid;

View File

@ -1,3 +1,20 @@
/*
* Copyright 2018 Paul Schaub
*
* This code 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
*/
package de.vanitasvitae.slam.xmpp.message; package de.vanitasvitae.slam.xmpp.message;
import org.jxmpp.jid.Jid; import org.jxmpp.jid.Jid;