Annotation of embedaddon/strongswan/src/charon-nm/nm/nm_handler.h, revision 1.1

1.1     ! misho       1: /*
        !             2:  * Copyright (C) 2009 Martin Willi
        !             3:  * HSR Hochschule fuer Technik Rapperswil
        !             4:  *
        !             5:  * This program is free software; you can redistribute it and/or modify it
        !             6:  * under the terms of the GNU General Public License as published by the
        !             7:  * Free Software Foundation; either version 2 of the License, or (at your
        !             8:  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
        !             9:  *
        !            10:  * This program is distributed in the hope that it will be useful, but
        !            11:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
        !            12:  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
        !            13:  * for more details.
        !            14:  */
        !            15: 
        !            16: /**
        !            17:  * @defgroup nm_handler nm_handler
        !            18:  * @{ @ingroup nm
        !            19:  */
        !            20: 
        !            21: #ifndef NM_HANDLER_H_
        !            22: #define NM_HANDLER_H_
        !            23: 
        !            24: #include <attributes/attribute_handler.h>
        !            25: 
        !            26: typedef struct nm_handler_t nm_handler_t;
        !            27: 
        !            28: /**
        !            29:  * Handles DNS/NBNS attributes to pass to NM.
        !            30:  */
        !            31: struct nm_handler_t {
        !            32: 
        !            33:        /**
        !            34:         * Implements attribute handler interface
        !            35:         */
        !            36:        attribute_handler_t handler;
        !            37: 
        !            38:        /**
        !            39:         * Create an enumerator over received attributes of a given kind.
        !            40:         *
        !            41:         * @param type          type of attributes to enumerate
        !            42:         * @return                      enumerator over attribute data (chunk_t*)
        !            43:         */
        !            44:        enumerator_t* (*create_enumerator)(nm_handler_t *this,
        !            45:                                                                           configuration_attribute_type_t type);
        !            46: 
        !            47:        /**
        !            48:         * Reset state, flush all received attributes.
        !            49:         */
        !            50:        void (*reset)(nm_handler_t *this);
        !            51: 
        !            52:        /**
        !            53:         * Destroy a nm_handler_t.
        !            54:         */
        !            55:        void (*destroy)(nm_handler_t *this);
        !            56: };
        !            57: 
        !            58: /**
        !            59:  * Create a nm_handler instance.
        !            60:  */
        !            61: nm_handler_t *nm_handler_create();
        !            62: 
        !            63: #endif /** NM_HANDLER_H_ @}*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>