Class: Keepass::Group
- Inherits:
-
Object
- Object
- Keepass::Group
- Defined in:
- ext/keepass.c,
ext/keepass.c
Overview
A class representing a group of entries in a Keepass database.
Instance Method Summary collapse
-
#atime ⇒ Object
Returns the last access time of this group.
-
#ctime ⇒ Object
Returns the creation time of this group.
-
#entries ⇒ Object
Returns the entries contained within this group.
-
#etime ⇒ Object
Returns the expire time of this group.
-
#mtime ⇒ Object
Returns the modification time of this group.
-
#name ⇒ Object
Returns the name of this group.
Instance Method Details
#atime ⇒ Object
Returns the last access time of this group.
431 432 433 434 435 |
# File 'ext/keepass.c', line 431
VALUE
rb_kp_grp_atime(VALUE self)
{
return rb_ivar_get(self, rb_intern("@atime"));
}
|
#ctime ⇒ Object
Returns the creation time of this group.
419 420 421 422 423 |
# File 'ext/keepass.c', line 419
VALUE
rb_kp_grp_ctime(VALUE self)
{
return rb_ivar_get(self, rb_intern("@ctime"));
}
|
#entries ⇒ Object
Returns the entries contained within this group.
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'ext/keepass.c', line 527
VALUE
rb_kp_grp_entries(VALUE self)
{
VALUE kdb_object;
kpass_db *kdb;
VALUE entries;
uint32_t i;
uint32_t group_id;
kdb_object = rb_ivar_get(self, rb_intern("@kdb")); /* fetch the Keepass::Database */
kdb_object = rb_ivar_get(kdb_object, rb_intern("@kdb")); /* fetch the wrapper object */
Data_Get_Struct(kdb_object, kpass_db, kdb);
group_id = NUM2INT(rb_ivar_get(self, rb_intern("@id")));
entries = rb_ary_new();
for(i = 0; i < kdb->entries_len; i++) {
kpass_entry *entry = kdb->entries[i];
VALUE rb_entry;
if(entry->group_id != group_id) {
continue;
}
if(! strcmp(entry->title, "Meta-Info")) {
continue;
}
rb_entry = _create_ruby_entry(entry);
rb_ary_push(entries, rb_entry);
}
return entries;
}
|
#etime ⇒ Object
Returns the expire time of this group.
443 444 445 446 447 |
# File 'ext/keepass.c', line 443
VALUE
rb_kp_grp_etime(VALUE self)
{
return rb_ivar_get(self, rb_intern("@etime"));
}
|
#mtime ⇒ Object
Returns the modification time of this group.
407 408 409 410 411 |
# File 'ext/keepass.c', line 407
VALUE
rb_kp_grp_mtime(VALUE self)
{
return rb_ivar_get(self, rb_intern("@mtime"));
}
|
#name ⇒ Object
Returns the name of this group.
395 396 397 398 399 |
# File 'ext/keepass.c', line 395
VALUE
rb_kp_grp_name(VALUE self)
{
return rb_ivar_get(self, rb_intern("@name"));
}
|