Class: Mapi::Pst::Desc
- Inherits:
-
Struct
- Object
- Struct
- Mapi::Pst::Desc
- Includes:
- Module.new
- Defined in:
- lib/mapi/pst.rb
Overview
pst_desc idx_id is a pointer to an idx record which gets the primary data stream for the Desc record. idx2_id gets you an idx record, that when read gives you an ID2 association list, which just maps another set of ids to index values
Constant Summary collapse
- UNPACK_STR =
'V4'
- SIZE =
16
- BLOCK_SIZE =
descriptor blocks was 520 but bogus
512
- COUNT_MAX =
max active desc records (ITEM_COUNT_OFFSET / Desc::SIZE = 31)
31
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#desc_id ⇒ Object
Returns the value of attribute desc_id.
-
#idx2_id ⇒ Object
Returns the value of attribute idx2_id.
-
#idx_id ⇒ Object
Returns the value of attribute idx_id.
-
#parent_desc_id ⇒ Object
Returns the value of attribute parent_desc_id.
-
#pst ⇒ Object
Returns the value of attribute pst.
Instance Method Summary collapse
- #desc ⇒ Object
-
#initialize(data) ⇒ Desc
constructor
A new instance of Desc.
-
#inspect ⇒ Object
show all numbers in hex.
- #list_index ⇒ Object
Constructor Details
#initialize(data) ⇒ Desc
Returns a new instance of Desc.
567 568 569 570 |
# File 'lib/mapi/pst.rb', line 567 def initialize data super(*data.unpack(UNPACK_STR)) @children = [] end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
566 567 568 |
# File 'lib/mapi/pst.rb', line 566 def children @children end |
#desc_id ⇒ Object
Returns the value of attribute desc_id
557 558 559 |
# File 'lib/mapi/pst.rb', line 557 def desc_id @desc_id end |
#idx2_id ⇒ Object
Returns the value of attribute idx2_id
557 558 559 |
# File 'lib/mapi/pst.rb', line 557 def idx2_id @idx2_id end |
#idx_id ⇒ Object
Returns the value of attribute idx_id
557 558 559 |
# File 'lib/mapi/pst.rb', line 557 def idx_id @idx_id end |
#parent_desc_id ⇒ Object
Returns the value of attribute parent_desc_id
557 558 559 |
# File 'lib/mapi/pst.rb', line 557 def parent_desc_id @parent_desc_id end |
#pst ⇒ Object
Returns the value of attribute pst.
565 566 567 |
# File 'lib/mapi/pst.rb', line 565 def pst @pst end |
Instance Method Details
#desc ⇒ Object
572 573 574 |
# File 'lib/mapi/pst.rb', line 572 def desc pst.idx_from_id idx_id end |
#inspect ⇒ Object
show all numbers in hex
581 582 583 |
# File 'lib/mapi/pst.rb', line 581 def inspect super.gsub(/=(\d+)/) { '=0x%x' % $1.to_i } end |
#list_index ⇒ Object
576 577 578 |
# File 'lib/mapi/pst.rb', line 576 def list_index pst.idx_from_id idx2_id end |