seahorse-unknown-source.h 2.81 KB
Newer Older
1 2 3
/*
 * Seahorse
 *
4
 * Copyright (C) 2006 Stefan Walter
5 6 7 8 9 10 11 12 13 14 15
 *
 * This program 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 program 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
Daniel Mustieles's avatar
Daniel Mustieles committed
16
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 18 19 20 21
 */
 
#ifndef __SEAHORSE_UNKNOWN_SOURCE_H__
#define __SEAHORSE_UNKNOWN_SOURCE_H__

22 23
#include "seahorse-object.h"
#include "seahorse-source.h"
24 25 26 27 28 29 30 31 32 33 34 35

#define SEAHORSE_TYPE_UNKNOWN_SOURCE            (seahorse_unknown_source_get_type ())
#define SEAHORSE_UNKNOWN_SOURCE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAHORSE_TYPE_UNKNOWN_SOURCE, SeahorseUnknownSource))
#define SEAHORSE_UNKNOWN_SOURCE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), SEAHORSE_TYPE_UNKNOWN_SOURCE, SeahorseUnknownSourceClass))
#define SEAHORSE_IS_UNKNOWN_SOURCE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAHORSE_TYPE_UNKNOWN_SOURCE))
#define SEAHORSE_IS_UNKNOWN_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAHORSE_TYPE_UNKNOWN_SOURCE))
#define SEAHORSE_UNKNOWN_SOURCE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAHORSE_TYPE_UNKNOWN_SOURCE, SeahorseUnknownSourceClass))

typedef struct _SeahorseUnknownSource SeahorseUnknownSource;
typedef struct _SeahorseUnknownSourceClass SeahorseUnknownSourceClass;
typedef struct _SeahorseUnknownSourcePrivate SeahorseUnknownSourcePrivate;

36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
/**
 * SeahorseUnknownSource:
 * @parent: The parent #GObject
 * @ktype: The #GQuark key type for the source
 *
 * A  source for unknown objects
 *
 * - Derived from SeahorseSource
 * - Is used for objects that haven't been found on a key server.
 *
 * Properties:
 *  ktype: (GQuark) The ktype (ie: SKEY_UNKNOWN) of keys originating from this
           key source.
 *  location: (SeahorseLocation) The location of objects that come from this
 *         source. (ie: SEAHORSE_LOCATION_MISSING)
 */

53
struct _SeahorseUnknownSource {
54 55
	GObject parent;
	GQuark ktype;
56 57 58
};

struct _SeahorseUnknownSourceClass {
59
	GObjectClass parent_class;
60 61 62 63 64 65
};

GType                    seahorse_unknown_source_get_type      (void);

SeahorseUnknownSource*   seahorse_unknown_source_new           (GQuark ktype);

66 67
SeahorseObject*          seahorse_unknown_source_add_object    (SeahorseUnknownSource *usrc,
                                                                GQuark id,
68 69 70
                                                                SeahorseOperation *search);

#endif /* __SEAHORSE_UNKNOWN_SOURCE_H__ */