~ubuntu-branches/ubuntu/utopic/lasso/utopic-proposed

« back to all changes in this revision

Viewing changes to lasso/environs/identity.h

  • Committer: Bazaar Package Importer
  • Author(s): Frederic Peters
  • Date: 2004-09-13 09:26:34 UTC
  • Revision ID: james.westby@ubuntu.com-20040913092634-01vdfl8j9cp94exa
Tags: upstream-0.4.1
ImportĀ upstreamĀ versionĀ 0.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: identity.h,v 1.7 2004/07/30 14:22:57 valos Exp $
 
2
 *
 
3
 * Lasso - A free implementation of the Liberty Alliance specifications.
 
4
 *
 
5
 * Copyright (C) 2004 Entr'ouvert
 
6
 * http://lasso.entrouvert.org
 
7
 * 
 
8
 * Authors: Nicolas Clapies <nclapies@entrouvert.com>
 
9
 *          Valery Febvre <vfebvre@easter-eggs.com>
 
10
 *
 
11
 * This program is free software; you can redistribute it and/or modify
 
12
 * it under the terms of the GNU General Public License as published by
 
13
 * the Free Software Foundation; either version 2 of the License, or
 
14
 * (at your option) any later version.
 
15
 * 
 
16
 * This program is distributed in the hope that it will be useful,
 
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
19
 * GNU General Public License for more details.
 
20
 * 
 
21
 * You should have received a copy of the GNU General Public License
 
22
 * along with this program; if not, write to the Free Software
 
23
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
24
 */
 
25
 
 
26
#ifndef __LASSO_IDENTITY_H__
 
27
#define __LASSO_IDENTITY_H__
 
28
 
 
29
#ifdef __cplusplus
 
30
extern "C" {
 
31
#endif /* __cplusplus */ 
 
32
 
 
33
#include <lasso/xml/xml.h>
 
34
#include <lasso/protocols/federation.h>
 
35
 
 
36
#define LASSO_TYPE_IDENTITY (lasso_identity_get_type())
 
37
#define LASSO_IDENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IDENTITY, LassoIdentity))
 
38
#define LASSO_IDENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_IDENTITY, LassoIdentityClass))
 
39
#define LASSO_IS_IDENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IDENTITY))
 
40
#define LASSO_IS_IDENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_IDENTITY))
 
41
#define LASSO_IDENTITY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IDENTITY, LassoIdentityClass)) 
 
42
 
 
43
typedef struct _LassoIdentity LassoIdentity;
 
44
typedef struct _LassoIdentityClass LassoIdentityClass;
 
45
typedef struct _LassoIdentityPrivate LassoIdentityPrivate;
 
46
 
 
47
struct _LassoIdentity {
 
48
  GObject parent;
 
49
 
 
50
  /*< public >*/
 
51
  GPtrArray  *providerIDs; /* list of the remote provider ids for federations hash table */
 
52
  GHashTable *federations; /* hash for federations with remote ProviderID as key */
 
53
 
 
54
  gboolean is_dirty;
 
55
 
 
56
  /*< private >*/
 
57
  LassoIdentityPrivate *private;
 
58
};
 
59
 
 
60
struct _LassoIdentityClass {
 
61
  GObjectClass parent;
 
62
};
 
63
 
 
64
LASSO_EXPORT GType            lasso_identity_get_type                              (void);
 
65
 
 
66
LASSO_EXPORT LassoIdentity*   lasso_identity_new                                   (void);
 
67
 
 
68
LASSO_EXPORT LassoIdentity*   lasso_identity_new_from_dump                         (gchar *dump);
 
69
 
 
70
LASSO_EXPORT gint             lasso_identity_add_federation                        (LassoIdentity   *identity,
 
71
                                                                                    gchar           *remote_providerID,
 
72
                                                                                    LassoFederation *federation);
 
73
 
 
74
LASSO_EXPORT LassoIdentity*   lasso_identity_copy                                  (LassoIdentity *identity);
 
75
 
 
76
LASSO_EXPORT void             lasso_identity_destroy                               (LassoIdentity *identity);
 
77
 
 
78
LASSO_EXPORT gchar*           lasso_identity_dump                                  (LassoIdentity *identity);
 
79
 
 
80
LASSO_EXPORT LassoFederation* lasso_identity_get_federation                        (LassoIdentity *identity,
 
81
                                                                                    gchar         *remote_providerID);
 
82
 
 
83
LASSO_EXPORT gchar*           lasso_identity_get_next_federation_remote_providerID (LassoIdentity *identity);
 
84
 
 
85
LASSO_EXPORT gint             lasso_identity_remove_federation                     (LassoIdentity *identity,
 
86
                                                                                    gchar         *remote_providerID);
 
87
 
 
88
#ifdef __cplusplus
 
89
}
 
90
#endif /* __cplusplus */
 
91
 
 
92
#endif /* __LASSO_IDENTITY_H__ */