added setter methods for simpler access from Xamarin code

fix bug in PwDate: wrong conversion from Java time to C-Date, off by one day
This commit is contained in:
Philipp Crocoll 2015-02-02 21:30:55 +01:00
parent b1cec02040
commit fc2e0fa15d
5 changed files with 13 additions and 3 deletions

View File

@ -262,7 +262,7 @@ public class PwDatabaseV3 {
return md.digest();
}
public void super_addGroupTo(PwGroupV3 newGroup, PwGroupV3 parent) {
public void super_addGroupTo(PwGroupV3 newGroup, PwGroupV3 parent) {
// Add group to parent group
if ( parent == null ) {
parent = rootGroup;

View File

@ -159,8 +159,7 @@ public class PwDate implements Cloneable {
int year = cal.get(Calendar.YEAR);
// File format is a 1 based month, java Calendar uses a zero based month
int month = cal.get(Calendar.MONTH) + 1;
// File format is a 0 based day, java Calendar uses a 1 based day
int day = cal.get(Calendar.DAY_OF_MONTH) - 1;
int day = cal.get(Calendar.DAY_OF_MONTH);
int hour = cal.get(Calendar.HOUR_OF_DAY);
int minute = cal.get(Calendar.MINUTE);
int second = cal.get(Calendar.SECOND);

View File

@ -93,6 +93,10 @@ protected static final String PMS_TAN_ENTRY = "<TAN>";
public PwIconStandard getIcon() {
return icon;
}
public void setIcon(PwIconStandard _icon) {
icon = _icon;
}
public boolean isTan() {
return getTitle().equals(PMS_TAN_ENTRY) && (getUsername().length() > 0);

View File

@ -67,6 +67,9 @@ public class PwGroupV3 {
public PwIconStandard getIcon() {
return icon;
}
public void setIcon(PwIconStandard _icon) {
icon = _icon;
}
public void super_initNewGroup(String nm, PwGroupIdV3 newId) {
setId(newId);
@ -145,6 +148,10 @@ public class PwGroupV3 {
public String getName() {
return name;
}
public void setName(String n) {
name = n;
}
public Date getLastMod() {
return tLastMod.getJDate();