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

« back to all changes in this revision

Viewing changes to lasso/lasso.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: lasso.h,v 1.13 2004/08/26 16:20:19 fpeters 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_H__
 
27
#define __LASSO_H__
 
28
 
 
29
#ifdef __cplusplus
 
30
extern "C" {
 
31
#endif /* __cplusplus */ 
 
32
    
 
33
#if (defined _MSC_VER || defined MINGW32)
 
34
#   include <windows.h>
 
35
#endif
 
36
 
 
37
#include <lasso/export.h>
 
38
 
 
39
#include <lasso/environs/defederation.h>
 
40
#include <lasso/environs/lecp.h>
 
41
#include <lasso/environs/login.h>
 
42
#include <lasso/environs/logout.h>
 
43
#include <lasso/environs/name_identifier_mapping.h>
 
44
#include <lasso/environs/name_registration.h>
 
45
 
 
46
LASSO_EXPORT int lasso_init(void);
 
47
LASSO_EXPORT int lasso_shutdown(void);
 
48
 
 
49
/**
 
50
 * lassoCheckVersionMode:
 
51
 * @lassoCheckVersionExact:             the version should match exactly.
 
52
 * @lassoCheckVersionABICompatible:     the version should be ABI compatible.
 
53
 *
 
54
 * The lasso library version mode.
 
55
 */
 
56
typedef enum {
 
57
  lassoCheckVersionExact = 0,
 
58
  lassoCheckVersionABICompatible
 
59
} lassoCheckVersionMode;
 
60
 
 
61
/**
 
62
 * lasso_check_version_exact:
 
63
 *
 
64
 * Macro. Returns 1 if the loaded lasso library version exactly matches 
 
65
 * the one used to compile the caller, 0 if it does not or a negative
 
66
 * value if an error occurs.
 
67
 */
 
68
#define lasso_check_version_exact()     \
 
69
    lasso_check_version_ext(LASSO_VERSION_MAJOR, LASSO_VERSION_MINOR, \
 
70
                            LASSO_VERSION_SUBMINOR, lassoCheckVersionExact)
 
71
 
 
72
/**
 
73
 * lasso_check_version:
 
74
 *
 
75
 * Macro. Returns 1 if the loaded lasso library version ABI compatible with
 
76
 * the one used to compile the caller, 0 if it does not or a negative
 
77
 * value if an error occurs.
 
78
 */
 
79
#define lasso_check_version()   \
 
80
    lasso_check_version_ext(LASSO_VERSION_MAJOR, LASSO_VERSION_MINOR, \
 
81
                            LASSO_VERSION_SUBMINOR, \
 
82
                            lassoCheckVersionABICompatible)
 
83
 
 
84
LASSO_EXPORT int lasso_check_version_ext(int major,
 
85
                                         int minor,
 
86
                                         int subminor,
 
87
                                         lassoCheckVersionMode mode);
 
88
 
 
89
#ifdef __cplusplus
 
90
}
 
91
#endif /* __cplusplus */
 
92
 
 
93
#endif /* __LASSO_H__ */