tnt-match

tnt-match —

Synopsis




#define     TNT_MATCH                       (s)
#define     TNT_MATCH_OUT_OF_GRACE
struct      TntMatch;
TntMatch*   tnt_match_new                   (void);
void        tnt_match_free                  (TntMatch *match);
void        tnt_match_reclaim_memory        (void);
gboolean    tnt_match_add_hit               (TntMatch *match,
                                             TntNodeID node_id,
                                             gint num_blocks);
TntAvailability tnt_match_get_availability  (TntMatch *match);
TntCompleteness tnt_match_get_completeness  (TntMatch *match);

Description

Details

TNT_MATCH()

#define TNT_MATCH(s) ((TntMatch *) s)

s :

TNT_MATCH_OUT_OF_GRACE

#define TNT_MATCH_OUT_OF_GRACE  (1 << 2)


struct TntMatch

struct TntMatch {

  guint          flags;
  TntFileMeta   *file_meta;
  TntTimeStamp   first_seen;
  TntMatch      *parent;

  union
  {
    struct
    {
      TntFileID  file_id;
      guint16    avail [TNT_MATCH_HIT_BUCKETS];
    }
    file;

    struct
    {
      GPtrArray *children;
      guint32    total_blocks;
      guint32    hit_blocks;
      guint32    hit_blocks_sum;
      guint      local_files;
      guint      quality_children;
      guint      dimension_ban : 1;
    }
    group;
  }
  u;


tnt_match_new ()

TntMatch*   tnt_match_new                   (void);

Returns :

tnt_match_free ()

void        tnt_match_free                  (TntMatch *match);

match :

tnt_match_reclaim_memory ()

void        tnt_match_reclaim_memory        (void);


tnt_match_add_hit ()

gboolean    tnt_match_add_hit               (TntMatch *match,
                                             TntNodeID node_id,
                                             gint num_blocks);

match :
node_id :
num_blocks :
Returns :

tnt_match_get_availability ()

TntAvailability tnt_match_get_availability  (TntMatch *match);

match :
Returns :

tnt_match_get_completeness ()

TntCompleteness tnt_match_get_completeness  (TntMatch *match);

match :
Returns :