package org.linphone.utils;


import android.content.Context;
import android.content.SharedPreferences;

public class SecondSessionManager {

    private static final String GYNAE = "Second_";
    private static final String IS_FIRST_INSTALL = "FirstInstall";
    private SharedPreferences pref;
    private SharedPreferences.Editor editor;
    private Context context;
    private int PRIVATE_MODE = 0;
    private static final String username = "username";
    private static final String password = "password";

    public SecondSessionManager(Context con) {
        // TODO Auto-generated constructor stub
        this.context = con;
        pref = context.getSharedPreferences(GYNAE, PRIVATE_MODE);
        editor = pref.edit();

    }

    public void setFirstInstall(boolean bool) {
        editor.putBoolean(IS_FIRST_INSTALL, bool);
        editor.commit();
    }

    public boolean getFirstInstall() {
        return pref.getBoolean(IS_FIRST_INSTALL, true);

    }

    public void setUsername(String user_id) {
        editor.putString(username, user_id);
        editor.commit();
    }

    public String getUsername() {
        return pref.getString(username, "");
    }

    public void setPassword(String pwd) {
        editor.putString(password, pwd);
        editor.commit();
    }

    public String getPassword() {
        return pref.getString(password, "");
    }
}