001/**
002 *
003 * Copyright 2017 Paul Schaub
004 *
005 * This file is part of smack-omemo-signal.
006 *
007 * smack-omemo-signal is free software; you can redistribute it and/or modify
008 * it under the terms of the GNU General Public License as published by
009 * the Free Software Foundation; either version 3 of the License, or
010 * (at your option) any later version.
011 *
012 * This program is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
015 * GNU General Public License for more details.
016 *
017 * You should have received a copy of the GNU General Public License
018 * along with this program; if not, write to the Free Software Foundation,
019 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
020 */
021package org.jivesoftware.smackx.omemo.signal;
022
023import java.io.File;
024
025import org.jivesoftware.smackx.omemo.FileBasedOmemoStore;
026import org.jivesoftware.smackx.omemo.util.OmemoKeyUtil;
027
028import org.whispersystems.libsignal.IdentityKey;
029import org.whispersystems.libsignal.IdentityKeyPair;
030import org.whispersystems.libsignal.SessionCipher;
031import org.whispersystems.libsignal.SignalProtocolAddress;
032import org.whispersystems.libsignal.ecc.ECPublicKey;
033import org.whispersystems.libsignal.state.PreKeyBundle;
034import org.whispersystems.libsignal.state.PreKeyRecord;
035import org.whispersystems.libsignal.state.SessionRecord;
036import org.whispersystems.libsignal.state.SignedPreKeyRecord;
037
038/**
039 * Implementation of a FileBasedOmemoStore for the smack-omemo-signal module.
040 *
041 * @author Paul Schaub
042 */
043@SuppressWarnings("unused")
044public class SignalFileBasedOmemoStore
045        extends FileBasedOmemoStore<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, SessionRecord,
046        SignalProtocolAddress, ECPublicKey, PreKeyBundle, SessionCipher> {
047
048    public SignalFileBasedOmemoStore(File base) {
049        super(base);
050    }
051
052    @Override
053    public OmemoKeyUtil<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, SessionRecord, ECPublicKey, PreKeyBundle> keyUtil() {
054        return new SignalOmemoKeyUtil();
055    }
056}