load_error_callout_library.cc 1.32 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// Copyright (C) 2013  Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.

/// @file
Stephen Morris's avatar
Stephen Morris committed
16
/// @brief Error load library
17
///
Stephen Morris's avatar
Stephen Morris committed
18 19 20
/// This is source of a test library for various test (LibraryManager and
/// HooksManager).  The characteristics of the library produced from this
/// file are:
21
///
Stephen Morris's avatar
Stephen Morris committed
22 23
/// - All framework functions are supplied.  "version" returns the correct
///   value, but "load" and unload return an error.
24 25 26 27 28 29 30 31 32 33 34

#include <hooks/hooks.h>

using namespace isc::hooks;

extern "C" {

// Framework functions

int
version() {
35
    return (KEA_HOOKS_VERSION);
36 37
}

Stephen Morris's avatar
Stephen Morris committed
38 39 40 41 42 43 44
int
load(LibraryHandle&) {
    return (1);
}

int
unload() {
45 46 47 48 49
    return (1);
}

};