Logo Search packages:      
Sourcecode: pan version File versions

void DataImpl::xover_ref ( const Quark group  )  [virtual]

The first call to xover_ref() for a group can indicate to Data to set up internal scaffolding it needs for the xover_add() calls that are about to come flooding in.

This is ref/unref rather than begin/end so that multiple connections can be used during an xref session.

See also:

xover_unref ()

Implements pan::Data.

Definition at line 166 of file xover.cc.

References pan::DataImpl::XOverEntry::_subject_lookup, pan::Quark::empty(), pan::Scorefile::get_matching_sections(), pan::DataImpl::XOverEntry::refcount, pan::DataImpl::XOverEntry::score_sections, pan::Article::subject, and xover_get_workarea().

  // sanity clause
  pan_return_if_fail (!group.empty());

  // ref the articles
  ref_group (group);

  // ref the xover
  XOverEntry& workarea (xover_get_workarea (group));

  // populate the normalized lookup for multipart detection...
  GroupHeaders * h (get_group_headers (group));
  foreach_const (nodes_t, h->_nodes, it) {
    const Quark& mid (it->first);
    const Article * a (it->second->_article);
    if (a != 0)
      workarea._subject_lookup.insert (std::pair<Quark,Quark>(a->subject,mid));

  // FIXME: this could possibly cause a memory problem if
  // user changes the scorefile while downloading new headers.
  // it might be better to make a copy of these
  // rather than just holding the pointers.
  _scorefile.get_matching_sections (StringView(group), workarea.score_sections);

Generated by  Doxygen 1.6.0   Back to index