Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

move.c File Reference


Detailed Description

Asychronous file moving operations.

Author:
Raphael Manfredi
Date:
2002-2003

#include "common.h"
#include "downloads.h"
#include "fileinfo.h"
#include "move.h"
#include "lib/atoms.h"
#include "lib/bg.h"
#include "lib/file.h"
#include "lib/tm.h"
#include "lib/walloc.h"
#include "if/gnet_property.h"
#include "if/gnet_property_priv.h"
#include "lib/override.h"

Data Structures

struct  moved
 Moving daemon context. More...

struct  work
 Work queue entry. More...


Defines

#define COPY_BLOCK_SHIFT   12 /**< Power of two of copy unit credit */
 Power of two of copy unit credit.

#define COPY_BUF_SIZE   65536 /**< Size of the reading buffer */
 Size of the reading buffer.

#define MOVED_MAGIC   0x00c0b100

Functions

 RCSID ("$Id:move.c, v 1.7 2005/08/31 21:37:28 rmanfredi Exp $")
workwe_alloc (struct download *d, const gchar *dest, const gchar *ext)
 we_alloc

void we_free (gpointer data)
 we_free

void d_sighandler (gpointer unused_h, gpointer u, bgsig_t sig)
 Signal handler for termination.

void d_free (gpointer ctx)
 d_free

void d_notify (gpointer unused_h, gboolean on)
 Daemon's notification of start/stop.

void d_start (gpointer h, gpointer ctx, gpointer item)
 Daemon's notification: starting to work on item.

void d_end (gpointer h, gpointer ctx, gpointer item)
 Daemon's notification: finished working on item.

bgret_t d_step_copy (gpointer h, gpointer u, gint ticks)
 Copy file around, incrementally.

void move_queue (struct download *d, const gchar *dest, const gchar *ext)
 Enqueue completed download file for verification.

void move_init (void)
 Initializes the background moving/copying task.

void move_close (void)
 Called at shutdown time.


Variables

gpointer move_daemon = NULL


Define Documentation

#define COPY_BLOCK_SHIFT   12 /**< Power of two of copy unit credit */
 

Power of two of copy unit credit.

#define COPY_BUF_SIZE   65536 /**< Size of the reading buffer */
 

Size of the reading buffer.

#define MOVED_MAGIC   0x00c0b100
 


Function Documentation

void d_end gpointer  h,
gpointer  ctx,
gpointer  item
[static]
 

Daemon's notification: finished working on item.

void d_free gpointer  ctx  )  [static]
 

d_free

Freeing of computation context.

void d_notify gpointer  unused_h,
gboolean  on
[static]
 

Daemon's notification of start/stop.

void d_sighandler gpointer  unused_h,
gpointer  u,
bgsig_t  sig
[static]
 

Signal handler for termination.

void d_start gpointer  h,
gpointer  ctx,
gpointer  item
[static]
 

Daemon's notification: starting to work on item.

bgret_t d_step_copy gpointer  h,
gpointer  u,
gint  ticks
[static]
 

Copy file around, incrementally.

void move_close void   ) 
 

Called at shutdown time.

void move_init void   ) 
 

Initializes the background moving/copying task.

void move_queue struct download d,
const gchar *  dest,
const gchar *  ext
 

Enqueue completed download file for verification.

RCSID "$Id:move.  c,
v 1.7 2005/08/31 21:37:28 rmanfredi Exp $" 
 

struct work* we_alloc struct download d,
const gchar *  dest,
const gchar *  ext
[static]
 

we_alloc

Allocate work queue entry.

void we_free gpointer  data  )  [static]
 

we_free

Freeing of work queue entry.


Variable Documentation

gpointer move_daemon = NULL [static]
 


Generated on Sun Feb 12 10:50:04 2006 for Gtk-Gnutella by doxygen 1.3.6