Main Page | Modules | Alphabetical List | Data Structures | Directories | 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/misc.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.
#define COPY_BUF_SIZE   65536
 Size of the reading buffer.
#define MOVED_MAGIC   0x00c0b100

Functions

workwe_alloc (struct download *d, const gchar *dest, const gchar *ext)
 Allocate work queue entry.
void we_free (gpointer data)
 Freeing of work queue entry.
void d_sighandler (struct bgtask *unused_h, gpointer u, bgsig_t sig)
 Signal handler for termination.
void d_free (gpointer ctx)
 Freeing of computation context.
void d_notify (struct bgtask *unused_h, gboolean on)
 Daemon's notification of start/stop.
void d_start (struct bgtask *h, gpointer ctx, gpointer item)
 Daemon's notification: starting to work on item.
void d_end (struct bgtask *h, gpointer ctx, gpointer item)
 Daemon's notification: finished working on item.
bgret_t d_step_copy (struct bgtask *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

bgtaskmove_daemon


Define Documentation

#define COPY_BLOCK_SHIFT   12
 

Power of two of copy unit credit.

#define COPY_BUF_SIZE   65536
 

Size of the reading buffer.

#define MOVED_MAGIC   0x00c0b100
 


Function Documentation

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

Daemon's notification: finished working on item.

void d_free gpointer  ctx  )  [static]
 

Freeing of computation context.

void d_notify struct bgtask unused_h,
gboolean  on
[static]
 

Daemon's notification of start/stop.

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

Signal handler for termination.

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

Daemon's notification: starting to work on item.

bgret_t d_step_copy struct bgtask 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.

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

Allocate work queue entry.

void we_free gpointer  data  )  [static]
 

Freeing of work queue entry.


Variable Documentation

struct bgtask* move_daemon [static]
 


Generated on Sat Jun 30 17:53:28 2007 for gtk-gnutella by  doxygen 1.3.9.1