Classes | Defines | Typedefs | Enumerations | Functions | Variables

ut_go_file.cpp File Reference

#include "ut_go_file.h"
#include <gsf/gsf-impl-utils.h>
#include <gsf/gsf-input.h>
#include <gsf/gsf-input-impl.h>
#include <gsf/gsf-output-impl.h>
#include <gsf/gsf-input-memory.h>
#include <gsf/gsf-output-memory.h>
#include <gsf/gsf-input-stdio.h>
#include <gsf/gsf-output-stdio.h>
#include <glib/gstdio.h>
#include <libxml/encoding.h>
#include <stdio.h>
#include <gsf/gsf-input-gio.h>
#include <gsf/gsf-output-gio.h>
#include <string>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include "ut_types.h"


struct  _GsfOutputProxy
struct  GsfOutputProxyClass


#define _(X)   X
#define GSF_OUTPUT_PROXY_TYPE   (gsf_output_proxy_get_type ())


typedef struct _GsfOutputProxy GsfOutputProxy


enum  { PROP_0, PROP_SINK }


GsfInput * gsf_input_memory_new_from_file (FILE *input)
GType gsf_output_proxy_get_type (void) G_GNUC_CONST
void gsf_output_proxy_register_type (GTypeModule *module)
GsfOutput * gsf_output_proxy_new (GsfOutput *sink)
 gsf_output_proxy_new :
static gboolean gsf_output_proxy_close (GsfOutput *object)
static void gsf_output_proxy_finalize (GObject *object)
static gboolean gsf_output_proxy_seek (GsfOutput *object, gsf_off_t offset, GSeekType whence)
static gboolean gsf_output_proxy_write (GsfOutput *object, size_t num_bytes, guint8 const *buffer)
static gsf_off_t gsf_output_proxy_vprintf (GsfOutput *object, char const *format, va_list args) G_GNUC_PRINTF(2
static void gsf_output_proxy_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
static void gsf_output_proxy_set_sink (GsfOutputProxy *proxy, GsfOutput *sink)
static void gsf_output_proxy_set_property (GObject *object, guint property_id, GValue const *value, GParamSpec *pspec)
static void gsf_output_proxy_init (GObject *object)
static void gsf_output_proxy_class_init (GObjectClass *gobject_class)
 GSF_CLASS (GsfOutputProxy, gsf_output_proxy, gsf_output_proxy_class_init, gsf_output_proxy_init, GSF_OUTPUT_TYPE) static gboolean is_fd_uri(const char *uri
gboolean UT_go_path_is_uri (const char *path)
gboolean UT_go_path_is_path (const char *path)
char * UT_go_filename_from_uri (const char *uri)
char * UT_go_filename_to_uri (const char *filename)
char * UT_go_filename_simplify (const char *filename, UT_GODotDot dotdot, gboolean make_absolute)
static char * simplify_path (const char *uri)
static char * simplify_host_path (const char *uri, size_t hstart)
char * UT_go_url_simplify (const char *uri)
static gboolean is_uri_relative (const char *uri)
static void remove_internal_relative_components (char *uri_current)
static char * make_full_uri_from_relative (const char *base_uri, const char *uri)
char * UT_go_url_resolve_relative (const char *ref_uri, const char *rel_uri)
static char * make_rel (const char *uri, const char *ref_uri, const char *uri_host, const char *slash)
char * UT_go_url_make_relative (const char *uri, const char *ref_uri)
char * UT_go_shell_arg_to_uri (const char *arg)
char * UT_go_basename_from_uri (const char *uri)
 UT_go_basename_from_uri: :
char * UT_go_dirname_from_uri (const char *uri, gboolean brief)
 UT_go_dirname_from_uri: :
gboolean UT_go_directory_create (char const *uri, GError **error)
static gboolean is_fd_uri (const char *uri, int *fd)
static GsfInput * open_plain_file (const char *path, GError **err)
static GsfInput * UT_go_file_open_impl (char const *uri, GError **err)
GsfInput * UT_go_file_open (char const *uri, GError **err)
 UT_go_file_open : : : GError.
static GsfOutput * gsf_output_proxy_create (GsfOutput *wrapped, char const *uri, GError **err)
static GsfOutput * UT_go_file_create_impl (char const *uri, GError **err)
GsfOutput * UT_go_file_create (char const *uri, GError **err)
gboolean UT_go_file_remove (char const *uri, GError **err)
gboolean UT_go_file_exists (char const *uri)
UT_GOFilePermissionsUT_go_get_file_permissions (char const *uri)
void UT_go_set_file_permissions (char const *uri, UT_GOFilePermissions *file_permissions)
static time_t UT_go_file_get_date (char const *uri, UT_GOFileDateType type)
time_t UT_go_file_get_date_accessed (char const *uri)
time_t UT_go_file_get_date_modified (char const *uri)
time_t UT_go_file_get_date_changed (char const *uri)
GError * UT_go_url_show (gchar const *url)
gchar * UT_go_get_mime_type (gchar const *uri)
gint UT_go_utf8_collate_casefold (const char *a, const char *b)


static GsfOutputClass * parent_class
int * fd

Define Documentation

#define _ (   X  )     X
#define GSF_OUTPUT_PROXY_TYPE   (gsf_output_proxy_get_type ())

Referenced by gsf_output_proxy_new().

Typedef Documentation

Enumeration Type Documentation

anonymous enum

Function Documentation

GSF_CLASS ( GsfOutputProxy  ,
gsf_output_proxy  ,
gsf_output_proxy_class_init  ,
gsf_output_proxy_init  ,
) const
GsfInput* gsf_input_memory_new_from_file ( FILE *  input  ) 

Referenced by UT_go_file_open_impl().

static void gsf_output_proxy_class_init ( GObjectClass *  gobject_class  )  [static]

References parent_class, and PROP_SINK.

static gboolean gsf_output_proxy_close ( GsfOutput *  object  )  [static]
static GsfOutput* gsf_output_proxy_create ( GsfOutput *  wrapped,
char const *  uri,
GError **  err 
) [static]
static void gsf_output_proxy_finalize ( GObject *  object  )  [static]
static void gsf_output_proxy_get_property ( GObject *  object,
guint  property_id,
GValue *  value,
GParamSpec *  pspec 
) [static]

References PROP_SINK, and _GsfOutputProxy::sink.

GType gsf_output_proxy_get_type ( void   ) 
static void gsf_output_proxy_init ( GObject *  object  )  [static]
GsfOutput * gsf_output_proxy_new ( GsfOutput *  sink  ) 

gsf_output_proxy_new :

Returns a new file or NULL.


Referenced by gsf_output_proxy_create().

void gsf_output_proxy_register_type ( GTypeModule *  module  ) 
static gboolean gsf_output_proxy_seek ( GsfOutput *  object,
gsf_off_t  offset,
GSeekType  whence 
) [static]
static void gsf_output_proxy_set_property ( GObject *  object,
guint  property_id,
GValue const *  value,
GParamSpec *  pspec 
) [static]
static void gsf_output_proxy_set_sink ( GsfOutputProxy proxy,
GsfOutput *  sink 
) [static]
static gsf_off_t static gsf_off_t gsf_output_proxy_vprintf ( GsfOutput *  object,
char const *  format,
va_list  args 
) [static]
static gboolean gsf_output_proxy_write ( GsfOutput *  object,
size_t  num_bytes,
guint8 const *  buffer 
) [static]
static gboolean is_fd_uri ( const char *  uri,
int *  fd 
) [static]
static gboolean is_uri_relative ( const char *  uri  )  [static]
static char* make_full_uri_from_relative ( const char *  base_uri,
const char *  uri 
) [static]
static char* make_rel ( const char *  uri,
const char *  ref_uri,
const char *  uri_host,
const char *  slash 
) [static]

Referenced by UT_go_url_make_relative().

static GsfInput* open_plain_file ( const char *  path,
GError **  err 
) [static]

Referenced by UT_go_file_open_impl().

static void remove_internal_relative_components ( char *  uri_current  )  [static]
static char* simplify_host_path ( const char *  uri,
size_t  hstart 
) [static]

References simplify_path().

Referenced by UT_go_url_simplify().

static char* simplify_path ( const char *  uri  )  [static]

Referenced by simplify_host_path().

char* UT_go_basename_from_uri ( const char *  uri  ) 
gboolean UT_go_directory_create ( char const *  uri,
GError **  error 
char* UT_go_dirname_from_uri ( const char *  uri,
gboolean  brief 

UT_go_dirname_from_uri: :

: if TRUE, hide "file://" if present.

Decode the all but the final path component. Returns as UTF-8 encoded suitable for display.

References UT_go_filename_from_uri().

Referenced by s_LaTeX_Listener::_handleImage(), and XAP_UnixDialog_FileOpenSaveAs::runModal().

GsfOutput* UT_go_file_create ( char const *  uri,
GError **  err 
static GsfOutput* UT_go_file_create_impl ( char const *  uri,
GError **  err 
) [static]
gboolean UT_go_file_exists ( char const *  uri  ) 
static time_t UT_go_file_get_date ( char const *  uri,
UT_GOFileDateType  type 
) [static]
time_t UT_go_file_get_date_accessed ( char const *  uri  ) 
time_t UT_go_file_get_date_changed ( char const *  uri  ) 
time_t UT_go_file_get_date_modified ( char const *  uri  ) 
GsfInput* UT_go_file_open ( char const *  uri,
GError **  err 
static GsfInput* UT_go_file_open_impl ( char const *  uri,
GError **  err 
) [static]
gboolean UT_go_file_remove ( char const *  uri,
GError **  err 
char* UT_go_filename_from_uri ( const char *  uri  ) 
char* UT_go_filename_simplify ( const char *  filename,
UT_GODotDot  dotdot,
gboolean  make_absolute 
char* UT_go_filename_to_uri ( const char *  filename  ) 
UT_GOFilePermissions* UT_go_get_file_permissions ( char const *  uri  ) 
gchar* UT_go_get_mime_type ( gchar const *  uri  ) 
gboolean UT_go_path_is_path ( const char *  path  ) 
gboolean UT_go_path_is_uri ( const char *  path  ) 
void UT_go_set_file_permissions ( char const *  uri,
UT_GOFilePermissions file_permissions 
char* UT_go_shell_arg_to_uri ( const char *  arg  ) 
char* UT_go_url_make_relative ( const char *  uri,
const char *  ref_uri 

References make_rel().

char* UT_go_url_resolve_relative ( const char *  ref_uri,
const char *  rel_uri 
GError* UT_go_url_show ( gchar const *  url  ) 
char* UT_go_url_simplify ( const char *  uri  ) 
gint UT_go_utf8_collate_casefold ( const char *  a,
const char *  b 

Variable Documentation

int* fd
GsfOutputClass* parent_class [static]