nautilus/libnautilus-private/nautilus-metafile-server.idl
Alexander Larsson 67e2a42fea Merge bonobo-slay-branch
2004-11-22  Alexander Larsson  <alexl@redhat.com>
        * Merge bonobo-slay-branch
2004-11-22 15:24:38 +00:00

92 lines
3.1 KiB
Text

/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
/* nautilus-metafile-server.idl - Interface for components to access Nautilus metadata
*
* Copyright (C) 2001 Eazel, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef NAUTILUS_METAFILE_SERVER_IDL_INCLUDED
#define NAUTILUS_METAFILE_SERVER_IDL_INCLUDED
#include <Bonobo.idl>
module Nautilus {
typedef string URI;
typedef sequence<string> FileNameList;
/* NautilusFiles creates (and registers) MetafileMonitors in order
* to get notified of metafile changes.
*/
interface MetafileMonitor : ::Bonobo::Unknown {
void metafile_changed (in FileNameList file_names);
void metafile_ready ();
};
typedef sequence<string> MetadataList;
/* A Metafile provides access to the metadata for the files
* in a directory.
*
* Note: file names within the directory are specified, by
* strings whose special characters have been URI encoded.
*/
interface Metafile : ::Bonobo::Unknown {
/* returns whether the metadata has been read in yet */
boolean is_read ();
/* getters for a file's metadata */
string get (in string file_name,
in string key,
in string default_value);
MetadataList get_list (in string file_name,
in string list_key,
in string list_subkey);
/* setters for a file's metadata */
void set (in string file_name,
in string key,
in string default_value,
in string metadata);
void set_list (in string file_name,
in string list_key,
in string list_subkey,
in MetadataList list);
/* calls to keep metadata in sync with file operations */
void copy (in string source_file_name,
in URI destination_directory_uri,
in string destination_file_name);
void remove (in string file_name);
void rename (in string old_file_name,
in string new_file_name);
void rename_directory (in string new_directory_uri);
/* calls for registering a MetafileMonitor with a Metafile */
void register_monitor (in MetafileMonitor monitor);
void unregister_monitor (in MetafileMonitor monitor);
};
/* Components use the MetafileFactory to get a Metafile for a directory. */
interface MetafileFactory : ::Bonobo::Unknown {
Metafile open (in URI directory);
};
};
#endif /* NAUTILUS_METAFILE_SERVER_IDL_INCLUDED */