epoc32/include/non_foundation_paths.hrh
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
       
     1 /*
       
     2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  This file defines macros to be used by non-foundation code.
       
    15 *                Main thing is that non_foundation code should NEVER for instance export 
       
    16 *                headers to same directories in epoc32/include as the foundation code.
       
    17 *                
       
    18 *                However to support transition from non-foundation code to foundation code asset
       
    19 *                we introduce same layers as in foundation.
       
    20 
       
    21 * Usage examples:
       
    22 *      #include <non_foundation_paths.hrh>
       
    23 *    
       
    24 *     *************************************************************
       
    25 *     * MMP file related macro usages to add the system include paths
       
    26 *     * 
       
    27 *     * The include paths has to be related to the layer in which your SW 
       
    28 *     * resides. Thus as an example: a component residing in middleware
       
    29 *     * layer should use the MW specific macro.
       
    30 *     * Keep this as a separate line in the mmp-files. If you need to
       
    31 *     * add your own SYSTEMINCLUDE paths, please defined them as
       
    32 *     * separate statement.
       
    33 *     * In addition to these , the non-foundation code should also use
       
    34 *     * one of the foundation specific macros. (APP_LAYER_SYSTEMINCLUDE,
       
    35 *     * MW_LAYER_SYSTEMINCLUDE or OS_LAYER_SYSTEMINCLUDE)
       
    36 *     *************************************************************
       
    37 *         NON_FOUNDATION_APP_LAYER_SYSTEMINCLUDE
       
    38 *         NON_FOUNDATION_MW_LAYER_SYSTEMINCLUDE
       
    39 *         NON_FOUNDATION_OS_LAYER_SYSTEMINCLUDE
       
    40 *         NON_FOUNDATION_ADAPT_LAYER_SYSTEMINCLUDE
       
    41 *
       
    42 *     *************************************************************
       
    43 *     * Macros related to exporting non-foundation headers  into 
       
    44 *     * correct place in the new system. 
       
    45 *     *
       
    46 *     * The macro that you should use depends on 2 things:
       
    47 *     *  - in which layer your package, which exports the APIs resides
       
    48 *     *  - what is the visibility of the API (public or platform)
       
    49 *     *************************************************************
       
    50 *      // the exporting of public APIs should use one of below macros
       
    51 *      // depending on which layer the API belogs to
       
    52 *      NON_FOUNDATION_APP_LAYER_EXPORT_PATH
       
    53 *      NON_FOUNDATION_MW_LAYER_EXPORT_PATH
       
    54 *      NON_FOUNDATION_OS_LAYER_EXPORT_PATH
       
    55 *      NON_FOUNDATION_ADAPT_LAYER_EXPORT_PATH
       
    56 *
       
    57 *      The hierarchy how APIs should reside in foundation has been specified
       
    58 *      in developer documentation. See further details from documentation.
       
    59 *      Below is example case relying on the structure
       
    60 *        my_own_api/group/bld.inf
       
    61 *        my_own_api/inc/header1.h
       
    62 *        my_own_api/inc/subdir/header2.h
       
    63 *  
       
    64 *      Assuming that the API is in middleware layer and a public API. 
       
    65 *      Then the bld.inf should have the following      
       
    66 *        ../inc/header1.h  NON_FOUNDATION_APP_LAYER_EXPORT_PATH(header1.h)
       
    67 *        ../inc/subdir/header2.h  NON_FOUNDATION_APP_LAYER_EXPORT_PATH(subdir/header2.h)
       
    68 *  
       
    69 *      In the above case the locations are as follow (with current MACRO settings):
       
    70 *        header1.h in /epoc32/include/ext/app
       
    71 *        header2.h in /epoc32/include/ext/app/subdir
       
    72 *
       
    73 *
       
    74 *
       
    75 */
       
    76 
       
    77 
       
    78 #ifndef NON_FOUNDATION_PATHS_HRH
       
    79 #define NON_FOUNDATION_PATHS_HRH
       
    80 
       
    81 /**
       
    82 * ---------------------------------------
       
    83 * Location, where the non-foundation code should export its headers.
       
    84 * These are specific to layer to which the non-foundation code belongs to.
       
    85 * See usage on top of this hrh-file.
       
    86 * ---------------------------------------
       
    87 */
       
    88 
       
    89 #if __GNUC__ >= 3
       
    90 #define NON_FOUNDATION_APP_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/app/exported
       
    91 #define NON_FOUNDATION_MW_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/mw/exported
       
    92 #define NON_FOUNDATION_OS_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/os/exported
       
    93 #define NON_FOUNDATION_ADAPT_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/adapt/exported
       
    94 #else
       
    95 #define NON_FOUNDATION_APP_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/app/##exported
       
    96 #define NON_FOUNDATION_MW_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/mw/##exported
       
    97 #define NON_FOUNDATION_OS_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/os/##exported
       
    98 #define NON_FOUNDATION_ADAPT_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/adapt/##exported
       
    99 #endif
       
   100 
       
   101 
       
   102 /**
       
   103 **************************************************************************
       
   104 *  General comments about the 3 define statements related to include paths.
       
   105 *  It should be enough only to have one of the below macros and one of the include macros
       
   106 *  from platform_paths.hrh.
       
   107 *  No other systemincludes to epoc32/include or subdirectories. 
       
   108 ****************************************************************************
       
   109 */
       
   110 
       
   111 /**
       
   112 * This define statements defines the SYSTEMINCLUDE-line, which is intended to be 
       
   113 * used in the mmp-files that are part of the applications-layer. 
       
   114 *
       
   115 * Applications layer is the last one in the list, since most likely the most of 
       
   116 * the headers come from middleware or os-layer  => thus they are first.
       
   117 */
       
   118 #define NON_FOUNDATION_APP_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \
       
   119  /epoc32/include/ext/app \
       
   120  /epoc32/include/ext/mw \
       
   121  /epoc32/include/ext/os
       
   122  
       
   123 /**
       
   124 * This define statements defines the SYSTEMINCLUDE-line, which is intended to be
       
   125 * used in the mmp-files that are part of the middleware-layer. 
       
   126 */
       
   127 #define NON_FOUNDATION_MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \
       
   128  /epoc32/include/ext/mw \
       
   129  /epoc32/include/ext/os
       
   130 
       
   131 /**
       
   132 * This define statements defines the SYSTEMINCLUDE-line, which is intended to be
       
   133 * used in the mmp-files that are part of the os-layer.
       
   134 */
       
   135 #define NON_FOUNDATION_OS_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \
       
   136  /epoc32/include/ext/os
       
   137 
       
   138 /**
       
   139 * This define statements defines the SYSTEMINCLUDE-line, which is intended to be
       
   140 * used in the mmp-files that are part of the adapt-layer.
       
   141 */
       
   142 #define NON_FOUNDATION_ADAPT_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \
       
   143  /epoc32/include/ext/os \
       
   144  /epoc32/include/ext/adapt
       
   145 
       
   146 
       
   147 /**
       
   148 ****************************************************************************
       
   149 * Definitions to export IBY files to different folders where they will be taken 
       
   150 * to ROM image
       
   151 ****************************************************************************
       
   152 */
       
   153 
       
   154 // Following three definitions are used for exporting IBY files to 
       
   155 // Core image (ROM+ROFS1). IBY files are exported according to their layer.
       
   156 #if __GNUC__ >= 3
       
   157 #define NON_FOUNDATION_CORE_ADAPT_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/exported
       
   158 #else
       
   159 #define NON_FOUNDATION_CORE_ADAPT_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/##exported
       
   160 #endif
       
   161 
       
   162 
       
   163 
       
   164 #endif  // end of NON_FOUNDATION_PATHS_HRH
       
   165 
       
   166 
       
   167 
       
   168 
       
   169