Class: Mapi::Pst::Desc

Inherits:
Struct
  • Object
show all
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

Instance Method Summary collapse

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

#childrenObject (readonly)

Returns the value of attribute children.



566
567
568
# File 'lib/mapi/pst.rb', line 566

def children
  @children
end

#desc_idObject

Returns the value of attribute desc_id

Returns:

  • (Object)

    the current value of desc_id



557
558
559
# File 'lib/mapi/pst.rb', line 557

def desc_id
  @desc_id
end

#idx2_idObject

Returns the value of attribute idx2_id

Returns:

  • (Object)

    the current value of idx2_id



557
558
559
# File 'lib/mapi/pst.rb', line 557

def idx2_id
  @idx2_id
end

#idx_idObject

Returns the value of attribute idx_id

Returns:

  • (Object)

    the current value of idx_id



557
558
559
# File 'lib/mapi/pst.rb', line 557

def idx_id
  @idx_id
end

#parent_desc_idObject

Returns the value of attribute parent_desc_id

Returns:

  • (Object)

    the current value of parent_desc_id



557
558
559
# File 'lib/mapi/pst.rb', line 557

def parent_desc_id
  @parent_desc_id
end

#pstObject

Returns the value of attribute pst.



565
566
567
# File 'lib/mapi/pst.rb', line 565

def pst
  @pst
end

Instance Method Details

#descObject



572
573
574
# File 'lib/mapi/pst.rb', line 572

def desc
	pst.idx_from_id idx_id
end

#inspectObject

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_indexObject



576
577
578
# File 'lib/mapi/pst.rb', line 576

def list_index
	pst.idx_from_id idx2_id
end