epoc32/include/tools/certapp-api.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100 (2010-03-31)
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
#ifndef __CERTAPP_API_H__
williamr@2
     2
#define __CERTAPP_API_H__/*
williamr@2
     3
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     4
* All rights reserved.
williamr@2
     5
* This component and the accompanying materials are made available
williamr@2
     6
* under the terms of the License "Eclipse Public License v1.0"
williamr@2
     7
* which accompanies this distribution, and is available
williamr@2
     8
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     9
*
williamr@2
    10
* Initial Contributors:
williamr@2
    11
* Nokia Corporation - initial contribution.
williamr@2
    12
*
williamr@2
    13
* Contributors:
williamr@2
    14
*
williamr@2
    15
* Description: 
williamr@2
    16
*
williamr@2
    17
*/
williamr@2
    18
williamr@2
    19
williamr@2
    20
/**
williamr@2
    21
 @file
williamr@2
    22
 @publishedAll
williamr@2
    23
 @released
williamr@2
    24
*/
williamr@2
    25
williamr@2
    26
#ifdef  __cplusplus
williamr@2
    27
extern "C" {
williamr@2
    28
#endif
williamr@2
    29
/**
williamr@2
    30
   RunCertApp
williamr@2
    31
williamr@2
    32
This API will run certapp as separate process and returns the 
williamr@2
    33
result. This approach is taken so that the caller is protected from 
williamr@2
    34
any possible certapp failure. Even if certapp crashes, RunCertApp will 
williamr@2
    35
return without crashing the caller. 
williamr@2
    36
 
williamr@2
    37
Certapp guarantees to return a non-zero status if it fails, which 
williamr@2
    38
means you don't need to parse its output to deduce if it worked or 
williamr@2
    39
not. 
williamr@2
    40
 
williamr@2
    41
The certapp executable must be in the current search path. 
williamr@2
    42
 
williamr@2
    43
The caller will be blocked whilst certapp runs. 
williamr@2
    44
 
williamr@2
    45
There are two logging arguments, aProgress and aErrors. These may be 
williamr@2
    46
set to either a filename to write the output to or to "-" which means 
williamr@2
    47
standard output. If both logging arguments are identical, then the 
williamr@2
    48
output will be merged to a single location. 
williamr@2
    49
 
williamr@2
    50
Progress and warning messages are written to aProgress. 
williamr@2
    51
 
williamr@2
    52
Fatal errors will be logged to aErrors, and RunCertApp will return a
williamr@2
    53
non-zero number. An error code of -1 means the certapp executable
williamr@2
    54
failed or was not found, other error codes indicate problems launching
williamr@2
    55
the executable.
williamr@2
    56
 
williamr@2
    57
The argc argument should be set to the count of the argv arguments. 
williamr@2
    58
 
williamr@2
    59
The argv argument should be set to an array of const char * ptrs to 
williamr@2
    60
the remaining arguments. 
williamr@2
    61
 
williamr@2
    62
The argv arguments maybe any of the arguments accepted by the certapp 
williamr@2
    63
executable, run "certapp -h" for further information. 
williamr@2
    64
*/
williamr@2
    65
int RunCertApp(const char *aProgress, const char *aErrors,
williamr@2
    66
			   int argc, char **argv);
williamr@2
    67
williamr@2
    68
#ifdef  __cplusplus
williamr@2
    69
}
williamr@2
    70
#endif
williamr@2
    71
williamr@2
    72
#endif