xmlsecurityengine/xmlsec/src/xmlsec_error_flag.c
changeset 0 e35f40988205
equal deleted inserted replaced
-1:000000000000 0:e35f40988205
       
     1 /*
       
     2 * Copyright (c) 2006-2006 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 "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Functions handling error situations.
       
    15 *
       
    16 */
       
    17 
       
    18 #include <e32def.h>
       
    19 
       
    20 #include "xmlsec_globals.h"
       
    21 #include "xmlsec_error_flag.h"
       
    22 
       
    23 static int XmlSecErrorFlag = 0;
       
    24 
       
    25 // ---------------------------------------------------------------------------
       
    26 // Set out of memory flag.
       
    27 // ---------------------------------------------------------------------------
       
    28 //
       
    29 EXPORT_C 
       
    30 void xmlSecSetErrorFlag(int error)
       
    31     {
       
    32     XmlSecErrorFlag = error;
       
    33     }
       
    34     
       
    35 // ---------------------------------------------------------------------------
       
    36 // Reset out of memory flag.
       
    37 // ---------------------------------------------------------------------------
       
    38 //
       
    39 EXPORT_C 
       
    40 void xmlSecResetErrorFlag()
       
    41     {
       
    42     XmlSecErrorFlag = 0;
       
    43     }
       
    44 
       
    45 // ---------------------------------------------------------------------------
       
    46 // Check out of memory flag.
       
    47 // ---------------------------------------------------------------------------
       
    48 //
       
    49 EXPORT_C 
       
    50 int xmlSecCheckErrorFlag()
       
    51     {
       
    52     return XmlSecErrorFlag;
       
    53     }