graphicscomposition/openwfcompositionengine/adaptation/include/owfconfig.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 /* Copyright (c) 2009 The Khronos Group Inc.
       
     2  *
       
     3  * Permission is hereby granted, free of charge, to any person obtaining a
       
     4  * copy of this software and/or associated documentation files (the
       
     5  * "Materials"), to deal in the Materials without restriction, including
       
     6  * without limitation the rights to use, copy, modify, merge, publish,
       
     7  * distribute, sublicense, and/or sell copies of the Materials, and to
       
     8  * permit persons to whom the Materials are furnished to do so, subject to
       
     9  * the following conditions:
       
    10  *
       
    11  * The above copyright notice and this permission notice shall be included
       
    12  * in all copies or substantial portions of the Materials.
       
    13  *
       
    14  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
       
    15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
       
    16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
       
    17  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
       
    18  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
       
    19  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
       
    20  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
       
    21  */
       
    22 
       
    23 /*!
       
    24  * \file owfconfig.h
       
    25  *
       
    26  */
       
    27 
       
    28 #ifndef OWFCONFIG_H_
       
    29 #define OWFCONFIG_H_
       
    30 
       
    31 #include "owftypes.h"
       
    32 
       
    33 
       
    34 #ifdef __cplusplus
       
    35 extern "C" {
       
    36 #endif
       
    37 
       
    38 
       
    39 typedef void* OWF_CONF_DOCUMENT;
       
    40 typedef void* OWF_CONF_GROUP;
       
    41 typedef void* OWF_CONF_ELEMENT;
       
    42 
       
    43 OWF_API_CALL OWF_CONF_DOCUMENT
       
    44 OWF_Conf_GetGetDocument(const char* str);
       
    45 
       
    46 OWF_API_CALL OWF_CONF_GROUP
       
    47 OWF_Conf_GetRoot(OWF_CONF_DOCUMENT doc, const char* name);
       
    48 
       
    49 OWF_API_CALL OWF_CONF_ELEMENT
       
    50 OWF_Conf_GetElement(const OWF_CONF_GROUP cur,
       
    51                     const char* elementName);
       
    52 
       
    53 OWF_API_CALL OWFint
       
    54 OWF_Conf_GetNbrElements(const OWF_CONF_GROUP cur,
       
    55                         const char* elementName);
       
    56 
       
    57 OWF_API_CALL OWF_CONF_ELEMENT
       
    58 OWF_Conf_GetNextElement(const OWF_CONF_ELEMENT cur,
       
    59                         const char* elementName);
       
    60 
       
    61 OWF_API_CALL OWFint
       
    62 OWF_Conf_GetContenti(const OWF_CONF_ELEMENT cur, OWFint deflt);
       
    63 
       
    64 OWF_API_CALL OWFfloat
       
    65 OWF_Conf_GetContentf(const OWF_CONF_ELEMENT cur, OWFfloat deflt);
       
    66 
       
    67 OWF_API_CALL char*
       
    68 OWF_Conf_GetContentStr(const OWF_CONF_ELEMENT cur,
       
    69                        char* deflt);
       
    70 
       
    71 OWF_API_CALL OWFint
       
    72 OWF_Conf_GetElementContenti(const OWF_CONF_GROUP cur,
       
    73                             const char* elementName,
       
    74                             OWFint deflt);
       
    75 
       
    76 OWF_API_CALL OWFfloat
       
    77 OWF_Conf_GetElementContentf(const OWF_CONF_GROUP cur,
       
    78                             const char* elementName,
       
    79                             OWFfloat deflt);
       
    80 
       
    81 /* \brief Get string element content
       
    82  *
       
    83  * String must be free by  OWF_Conf_FreeContent() call;
       
    84  */
       
    85 OWF_API_CALL char*
       
    86 OWF_Conf_GetElementContentStr(const OWF_CONF_GROUP cur,
       
    87                               const char* elementName,
       
    88                               char* deflt);
       
    89 
       
    90 OWF_API_CALL void
       
    91 OWF_Conf_Cleanup(OWF_CONF_DOCUMENT doc);
       
    92 
       
    93 OWF_API_CALL void
       
    94 OWF_Conf_FreeContent(char* str);
       
    95 
       
    96 #ifdef __cplusplus
       
    97 }
       
    98 #endif
       
    99 
       
   100 
       
   101 
       
   102 #endif /* OWFCONFIG_H_ */