Annotation of embedaddon/strongswan/src/libimcv/pts/pts_symlinks.h, revision 1.1

1.1     ! misho       1: /*
        !             2:  * Copyright (C) 2020 Andreas Steffen
        !             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 pts_symlinks pts_symlinks
        !            18:  * @{ @ingroup pts
        !            19:  */
        !            20: 
        !            21: #ifndef PTS_SYMLINKS_H_
        !            22: #define PTS_SYMLINKS_H_
        !            23: 
        !            24: #include <library.h>
        !            25: 
        !            26: typedef struct pts_symlinks_t pts_symlinks_t;
        !            27: 
        !            28: 
        !            29: /**
        !            30:  * Class storing a list of symbolic links pointing to directories
        !            31:  */
        !            32: struct pts_symlinks_t {
        !            33: 
        !            34:        /**
        !            35:         * Get the number of symbolic link entries
        !            36:         *
        !            37:         * @return                              Number of symbolic links
        !            38:         */
        !            39:        int (*get_count)(pts_symlinks_t *this);
        !            40: 
        !            41:        /**
        !            42:         * Add a symbolic link pointing to a directory
        !            43:         *
        !            44:         * @param symlink               Pathname of symbolic link
        !            45:         * @param dir               Pathname of directory the symlink points to
        !            46:         */
        !            47:        void (*add)(pts_symlinks_t *this, chunk_t symlink, chunk_t dir);
        !            48: 
        !            49:        /**
        !            50:          * Create a symlink enumerator
        !            51:          *
        !            52:          * @return                             Enumerator returning (chunk_t symlink, chunk_t dir)
        !            53:          */
        !            54:        enumerator_t* (*create_enumerator)(pts_symlinks_t *this);
        !            55: 
        !            56:        /**
        !            57:         * Get a new reference to the list of symbolic links
        !            58:         *
        !            59:         * @return                      this, with an increased refcount
        !            60:         */
        !            61:        pts_symlinks_t* (*get_ref)(pts_symlinks_t *this);
        !            62: 
        !            63: 
        !            64:        /**
        !            65:         * Destroys a pts_symlinks_t object.
        !            66:         */
        !            67:        void (*destroy)(pts_symlinks_t *this);
        !            68: 
        !            69: };
        !            70: 
        !            71: /**
        !            72:  * Creates a pts_symlinks_t object
        !            73:  */
        !            74: pts_symlinks_t* pts_symlinks_create();
        !            75: 
        !            76: #endif /** PTS_SYMLINKS_H_ @}*/

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