1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
/*
* Nautilus
*
* Copyright (C) 1999, 2000 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this library; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Author: Elliot Lee <sopwith@redhat.com>
*
*/
/* ntl-uri-map.h: Interface for mapping a location change request to a set of views and actual URL to be loaded. */
#ifndef NAUTILUS_URI_MAP_H
#define NAUTILUS_URI_MAP_H
#include <glib.h>
#include <libgnomevfs/gnome-vfs-types.h>
#include <libnautilus/nautilus.h>
#include <libnautilus/nautilus-directory.h>
typedef struct NautilusNavigationInfo NautilusNavigationInfo;
/* These are the different ways that Nautilus can fail to
* display the contents of a given uri. NAUTILUS_NAVIGATION_RESULT_OK
* means the uri was displayed successfully. These are similar to
* GnomeVFSResults but there are nautilus-specific codes and many of
* the GnomeVFSResults are treated the same here.
*/
typedef enum {
NAUTILUS_NAVIGATION_RESULT_OK,
NAUTILUS_NAVIGATION_RESULT_UNSPECIFIC_ERROR,
NAUTILUS_NAVIGATION_RESULT_NO_HANDLER_FOR_TYPE,
NAUTILUS_NAVIGATION_RESULT_NOT_FOUND,
NAUTILUS_NAVIGATION_RESULT_UNSUPPORTED_SCHEME,
NAUTILUS_NAVIGATION_RESULT_INVALID_URI
} NautilusNavigationResult;
typedef void (*NautilusNavigationCallback) (NautilusNavigationResult result,
NautilusNavigationInfo *info,
gpointer callback_data);
struct NautilusNavigationInfo {
Nautilus_NavigationInfo navinfo;
char *referring_iid; /* iid of content view that we're coming from */
char *initial_content_iid; /* iid to use for content view that we're going to display */
GSList *content_identifiers; /* list of NautilusViewIdentifiers */
GSList *meta_iids; /* list of iid strings */
/* internal usage */
NautilusNavigationCallback callback;
gpointer callback_data;
GnomeVFSAsyncHandle *ah;
NautilusDirectory *directory;
};
NautilusNavigationInfo *nautilus_navigation_info_new (Nautilus_NavigationRequestInfo *request,
Nautilus_NavigationInfo *previous_location,
NautilusNavigationCallback ready_callback,
gpointer callback_data,
const char *referring_iid);
void nautilus_navigation_info_cancel (NautilusNavigationInfo *info);
void nautilus_navigation_info_free (NautilusNavigationInfo *info);
#endif
|