epoc32/include/mw/ocrsrv.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     1
/*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     2
* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     3
* All rights reserved.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     4
* This component and the accompanying materials are made available
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     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
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     6
* which accompanies this distribution, and is available
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     7
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     8
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     9
* Initial Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    10
* Nokia Corporation - initial contribution.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    11
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    12
* Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    13
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    14
* Description:  APIs of the OCR(Optical Character Recognition), current engine
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    15
*                can recognize 24 bit colored image and 8 bit gray scale image
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    16
*                in BMP format.And the size of images are also limited within
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    17
*                1600x1200 in pixel
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    18
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    19
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    20
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    21
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    22
 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    23
#ifndef OCRSRV_H
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    24
#define OCRSRV_H
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    25
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    26
//  INCLUDE FILES
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    27
#include <ocrcommon.h>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    28
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    29
//  Constants
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    30
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    31
//class declaration
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    32
class OCREngineFactory;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    33
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    34
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    35
 *  OCR (Optical Character Recognition) Engine Observer
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    36
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    37
 *  This set of interfaces defines the observers of the OCR engine. This is the unique set
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    38
 *  for all types of engines. User needs to implement a concrete class which is derived from
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    39
 *  this class.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    40
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    41
 *  @lib ocrsrv.lib
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    42
 *  @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    43
 */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    44
class MOCREngineObserver  
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    45
    {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    46
    public:    
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    47
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    48
         * This interface will be called after the Block Recognition is completed. This calling
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    49
         * only valid when using the EEngineRecognizeBlock type of engine   
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    50
         * @see OCREngineFactory::TEngineType
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    51
         * @see MOCREngineRecognizeBlock
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    52
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    53
         * @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    54
         * @param aError Error code to indicate the completion status
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    55
         * @param aBlocks Pointer to the text information of the recognized image block, Please note
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    56
                         that the memory ownership belongs to the OCR engine and will not be passed
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    57
                         to your procedure after this calling
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    58
         * @param aBlockCount Number of block identified
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    59
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    60
         */  
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    61
        virtual void RecognizeBlockComplete(TInt aError, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    62
                                            const TOCRTextRgnInfo* aBlocks, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    63
                                            const TInt aBlockCount) = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    64
        
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    65
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    66
         * This interface will be called after the Special Region Recognition is completed. This calling
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    67
         * only valid when using the EEngineRecognizeBlock type of engine   
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    68
         * @see OCREngineFactory::TEngineType
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    69
         * @see MOCREngineRecognizeBlock 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    70
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    71
         * @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    72
         * @param aError Error code to indicate the completion status
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    73
         * @param aBlocks Pointer to the text information of the recognized image block, Please note
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    74
                         that the memory ownership belongs to the OCR engine and will not be passed
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    75
                         to your procedure after this calling
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    76
         * @param aBlockCount Number of block identified
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    77
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    78
         */  
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    79
        virtual void RecognizeSpecialRegionComplete(TInt aError, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    80
                                                    const TOCRTextRgnInfo* aBlocks, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    81
                                                    const TInt aBlockCount) = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    82
     
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    83
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    84
         * This interface will be called after the Full Image Recognition is completed. This calling
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    85
         * only valid when using the EEngineLayoutRecognize type of engine   
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    86
         * @see OCREngineFactory::TEngineType
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    87
         * @see MOCREngineLayoutRecognize
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    88
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    89
         * @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    90
         * @param aError Error code to indicate the completion status
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    91
         * @param aBlocks Pointer to the text information of the recognized image block, Please note
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    92
                         that the memory ownership belongs to the OCR engine and will not be passed
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    93
                         to your procedure after this calling
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    94
         * @param aBlockCount Number of block identified
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    95
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    96
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    97
        virtual void RecognizeComplete(TInt aError, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    98
                                       const TOCRTextRgnInfo* aBlocks, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    99
                                       const TInt aBlockCount) = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   100
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   101
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   102
         * This interface will be called after the Full Image Layout Analysis is completed. This calling
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   103
         * only valid when using the EEngineLayoutRecognize type of engine  
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   104
         * @see OCREngineFactory::TEngineType
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   105
         * @see MOCREngineLayoutRecognize
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   106
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   107
         * @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   108
         * @param aError Error code to indicate the completion status
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   109
         * @param aBlocks Pointer to the text information of the recognized image block, Please note
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   110
                         that the memory ownership belongs to the OCR engine and will not be passed
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   111
                         to your procedure after this calling
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   112
         * @param aBlockCount Number of block identified
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   113
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   114
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   115
        virtual void LayoutComplete(TInt aError, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   116
                                    const TOCRBlockInfo* aBlocks, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   117
                                    const TInt aBlockCount) = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   118
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   119
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   120
         * This interface will be called during the procession and indicates the progress.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   121
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   122
         * @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   123
         * @param aPercent A percentage of the current progression
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   124
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   125
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   126
        virtual void RecognizeProcess(const TUint aPercent) = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   127
    };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   128
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   129
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   130
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   131
 *  OCR (Optical Character Recognition) Engine Base
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   132
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   133
 *  Base class of the OCR engine, this offers definitions of the features which
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   134
 *  all engines shall give support
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   135
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   136
 *  @lib ocrsrv.lib
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   137
 *  @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   138
 */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   139
class MOCREngineBase  
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   140
    {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   141
    public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   142
    
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   143
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   144
         * Get the current version of the OCR interfaces
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   145
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   146
         * @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   147
         * @return Current version
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   148
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   149
        virtual TVersion GetVersion() const = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   150
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   151
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   152
         * This interface refreshes the installed language packages. The OCR engine
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   153
         * supports the languages to be installed as SIS packages and can be installed
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   154
         * or uninstalled dynamically. This method shall be called after changes made
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   155
         * on the installed language packages
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   156
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   157
         * @leave KErrNotFound No OCR engine found
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   158
         * @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   159
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   160
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   161
        virtual void RefreshInstalledLanguageL() = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   162
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   163
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   164
         * This method sets the languages for the recognition, maximum 2 languages can
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   165
         * be passed together, regardless of their position in the array
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   166
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   167
         * @since S60 3.1         
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   168
         * @param aActiveLanguage Array of specified languages @see GetInstalledLanguage
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   169
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   170
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   171
         * @leave KErrArgument Language count is more than two
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   172
         * @leave KErrNotSupported The language is not supported by current OCR engine
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   173
         * @leave KErrOcrBadLanguage Unsupported language
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   174
         * @leave KErrOcrBadDictFile Not set any language packages
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   175
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   176
        virtual void SetActiveLanguageL(const RArray<TLanguage>& aActiveLanguage) = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   177
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   178
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   179
         * This method gets the languages which are currently installed and supported
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   180
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   181
         * @since S60 3.1         
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   182
         * @param aLanguages Array of installed languages @see SetActiveLanguageL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   183
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   184
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   185
        virtual void GetInstalledLanguage(RArray<TLanguage>& aLanguages) const = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   186
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   187
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   188
         * This method cancels the recognition
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   189
         * Call to this method the process will be terminated, and a KErrCancel flag
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   190
         * will be passed to MOCREngineObserver's observers and through the aError
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   191
         * parameter. Call this method when the engine is not working will not take
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   192
         * any effect, this method internally calls IsEngineActive method 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   193
         * @see MOCREngineObserver
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   194
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   195
         * @since S60 3.1         
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   196
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   197
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   198
        virtual void CancelOperation() = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   199
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   200
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   201
         * This method judges whether a language is supported
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   202
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   203
         * @since S60 3.1 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   204
         * @param aLanguage A language specifed    
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   205
         * @return ETrue if supported; EFalse otherwise
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   206
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   207
        virtual TBool IsLanguageSupported(const TLanguage aLanguage) = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   208
        
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   209
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   210
         * This method tests whether the engine is working or not
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   211
         * Typically you could call this method to test whether there is
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   212
         * an outstanding request or not.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   213
         * Note that when you are trying to exit the application when
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   214
         * there's an outstanding issue, you should first call this method
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   215
         * and call CancelOperation method before really terminate the 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   216
         * client application
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   217
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   218
         * @since S60 3.1  
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   219
         * @return ETrue if the engine is working; EFalse otherwise
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   220
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   221
         virtual TBool IsEngineActive() const = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   222
    };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   223
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   224
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   225
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   226
 *  OCR (Optical Character Recognition) Engine Interface Base
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   227
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   228
 *  Base interfaces for the OCR engine, all engines derived from this class
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   229
 *  User can access base features from Base method
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   230
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   231
 *  @lib ocrsrv.lib
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   232
 *  @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   233
 */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   234
class MOCREngineInterface
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   235
    {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   236
    public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   237
    
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   238
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   239
         * This method gets the MOCREngineBase interface, user can access base features
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   240
         * from this method
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   241
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   242
         * @since S60 3.1 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   243
         * @return Pointer to the engine base @see MOCREngineBase
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   244
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   245
        virtual MOCREngineBase* Base() const = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   246
        
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   247
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   248
        * Virtual destructor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   249
        */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   250
        virtual ~MOCREngineInterface() { };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   251
    };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   252
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   253
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   254
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   255
 *  OCR (Optical Character Recognition) Engine Interfaces with Layout Analysis
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   256
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   257
 *  This set of interfaces offers the OCR engine which supports Layout Analysis
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   258
 *  on full images. User shall pass the handle of the image through LayoutAnalysisL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   259
 *  first, and then pass block ids to RecognizeL to complete the recognition.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   260
 *  
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   261
 *  For Example:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   262
 *  After passing the image handle to LayoutAnalysisL, the MOCREngineObserver::LayoutComplete
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   263
 *  will be called after the process. Then through the TOCRBlockInfo array (const TOCRBlockInfo* aBlock
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   264
 *  and const TInt aBlockCount), the user knows how many blocks have been identified 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   265
 *  together with their position information. Those blocks are marked with ids from Zero to 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   266
 *  aBlockCount - 1. 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   267
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   268
 *  Then the user must specify which blocks are going to be further processed (Note that layout analysis
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   269
 *  only gets you the position of those blocks, but does not recognize the characters inside each block).
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   270
 *  The const RArray<TInt>& aBlock in MOCREngineLayoutRecognize::RecognizeL saves all the ids that are
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   271
 *  selected to be further processed. e.g. if you have 10 blocks from LayoutComplete, you can append 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   272
 *  1, 3, 5, 7 to the TInt array and pass it to RecognizeL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   273
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   274
 *  Note that this class shall be used together with TEngineType set to EEngineLayoutRecognize
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   275
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   276
 *  @lib ocrsrv.lib
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   277
 *  @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   278
 */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   279
class MOCREngineLayoutRecognize : public MOCREngineInterface
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   280
    { 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   281
    public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   282
    
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   283
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   284
         * This method does the layout analysis for the full image
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   285
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   286
         * @since S60 3.1         
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   287
         * @param aBitmapHandle Handle of the image(get from CFbsBitmap::Handle())
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   288
         * @param aSettings Settings for layout analysis @see TOCRLayoutSetting
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   289
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   290
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   291
         * @leave KErrNotSupported Image shall be in BMP format (24bit colored or 8 bit grayscale) 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   292
         * and the size shall not exceed 1600x1200 in pixel 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   293
         * @leave KErrNotReady Internal object is not constructed
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   294
         * @leave KErrAbort Child thread does not exist or operation is aborted
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   295
         * @leave KErrServerBusy OCR service is busy
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   296
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   297
        virtual void LayoutAnalysisL(const TInt aBitmapHandle, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   298
                                     const TOCRLayoutSetting aSettings) = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   299
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   300
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   301
         * This method does the character recognition for the image on base of the result from 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   302
         * LayoutAnalysisL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   303
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   304
         * @since S60 3.1         
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   305
         * @param aSettings Settings for recognition
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   306
         * @param aBlockIdsToRecognize Block Ids to be recognized
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   307
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   308
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   309
         * @leave KErrNotReady Internal object is not constructed
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   310
         * @leave KErrAbort Child thread does not exist or operation is aborted
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   311
         * @leave KErrArgument Bolck information is available        
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   312
         * 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   313
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   314
        virtual void RecognizeL(const TOCRRecognizeSetting aSettings, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   315
                                const RArray<TInt>& aBlockIdsToRecognize) = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   316
    };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   317
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   318
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   319
 *  OCR (Optical Character Recognition) Engine Interfaces without Layout Analysis
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   320
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   321
 *  This set of interfaces offers the OCR engine which does not support Layout Analysis
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   322
 *  on full images. User shall implement their own layout solution
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   323
 *  
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   324
 *  RecognizeBlockL recognizes text information in a single block area regardless of content
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   325
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   326
 *  RecognizeSpecialRegionL recognizes text information in a single block area and its content
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   327
 *  sensitive. User can select three different types of contents: e-mail address, phone numbers
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   328
 *  or web addresses @see TRegionInfo
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   329
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   330
 *  Note that this class shall be used together with TEngineType set to EEngineRecognizeBlock
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   331
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   332
 *  @lib ocrsrv.lib
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   333
 *  @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   334
 */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   335
class MOCREngineRecognizeBlock : public MOCREngineInterface
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   336
    {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   337
    public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   338
    
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   339
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   340
         * This method recognizes text in a single block
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   341
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   342
         * @since S60 3.1         
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   343
         * @param aBitmapHandle Handle of the image(get from CFbsBitmap::Handle())
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   344
         * @param aLayoutInfo Block information
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   345
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   346
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   347
         * @leave KErrNotSupported Image shall be in BMP format (24bit colored or 8 bit grayscale) 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   348
         * and the size shall not exceed 1600x1200 in pixel 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   349
         * @leave KErrNotReady Internal object is not constructed
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   350
         * @leave KErrAbort Child thread does not exist or operation is aborted         
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   351
         * @leave KErrCouldNotConnect No connection to the font and bitmap server could be made 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   352
         * @leave KErrUnknown No bitmap could be found with the specified handle number
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   353
         * @leave KErrArgument aRegionInfo is available
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   354
         * @leave KErrServerBusy OCR service is busy 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   355
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   356
        virtual void RecognizeBlockL(const TInt aBitmapHandle, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   357
                                     const TOCRLayoutBlockInfo aLayoutInfo) = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   358
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   359
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   360
         * This method recognizes text with special content in a single block
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   361
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   362
         * Note that SetActiveLanguageL has to be called first and language must be set to TLanguage::ELangEnglish
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   363
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   364
         * @since S60 3.1         
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   365
         * @param aBitmapHandle Handle of the image(get from CFbsBitmap::Handle())
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   366
         * @param aRegionInfo Block information
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   367
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   368
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   369
         * @leave KErrNotSupported Image shall be in BMP format (24bit colored or 8 bit grayscale) 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   370
         * and the size shall not exceed 1600x1200 in pixel 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   371
         * @leave KErrNotReady Internal object is not constructed
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   372
         * @leave KErrAbort Child thread does not exist or operation is aborted         
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   373
         * @leave KErrCouldNotConnect No connection to the font and bitmap server could be made 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   374
         * @leave KErrUnknown No bitmap could be found with the specified handle number
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   375
         * @leave KErrArgument aRegionInfo is available
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   376
         * @leave KErrServerBusy OCR service is busy 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   377
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   378
        virtual void RecognizeSpecialRegionL(const TInt aBitmapHandle, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   379
                                             const TRegionInfo aRegionInfo) = 0;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   380
    };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   381
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   382
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   383
 *  OCR (Optical Character Recognition) API
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   384
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   385
 *  This static class offers the OCR APIs. The user shall call CreateOCREngineL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   386
 *  and get the instance of one type of the OCR engine and then convert the instance
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   387
 *  from MOCREngineInterface to MOCREngineLayoutRecognize or MOCREngineRecognizeBlock 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   388
 *  according to the type information. And use ReleaseOCREngine to destroy the engine.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   389
 *  @see OCREngineFactory::TEngineType
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   390
 * 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   391
 *  Note: This procedure will create a new thread in your current process in order to 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   392
 *        run the OCR APIs, so you don't need to create new threads for OCR by yourself
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   393
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   394
 *  For example:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   395
 *  A typical usage for the factory class would be like:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   396
 *  @code
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   397
 *  const TOcrEngineEnv env;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   398
 *  env.iPriority = EPriorityLess;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   399
 *  env.iMaxHeapSize = 1200*KMinHeapGrowBy;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   400
 *  MOCREngineInterface* myEngine = CreateOCREngineL( aObserver, env, EEngineLayoutRecognize);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   401
 *  MOCREngineLayoutRecognize* layoutEngine = STATIC_CAST( MOCREngineLayoutRecognize*, myEngine );
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   402
 *  // TODO: call coresponding methods in layoutEngine
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   403
 *  ReleaseOCREngine( layoutEngine );
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   404
 *  @endcode
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   405
 *  @lib ocrsrv.lib
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   406
 *  @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   407
 */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   408
class OCREngineFactory  
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   409
    {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   410
    public:   
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   411
        /**  
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   412
        * OCR Engine Types 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   413
        */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   414
        enum TEngineType 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   415
            {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   416
            /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   417
            * OCR Engine with layout analysis feature:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   418
            * by selecting this type of engine, LayoutAnalysisL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   419
            * shall be called first before RecognizeL. 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   420
            */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   421
            EEngineLayoutRecognize,      
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   422
                                     
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   423
            /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   424
            * Engine without layout analysis feature:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   425
            * Layout information shall be passed through TOCRLayoutBlockInfo
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   426
            * or TRegionInfo to the interfaces
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   427
            */                            
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   428
            EEngineRecognizeBlock        
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   429
                                         
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   430
            };  
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   431
              
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   432
    public: 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   433
    
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   434
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   435
         * Create the OCR engine instance 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   436
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   437
         * @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   438
         * @param aObserver Pointer to the call callback function 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   439
         * @param aEngineEnv Engine environment settings @see TOcrEngineEnv
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   440
         * @param aEngineType Select a type of engine to be created @see OCREngineFactory::TEngineType
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   441
         * @return Pointer to the engine created @see MOCREngineInterface
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   442
         * 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   443
         * @leave KErrArgument aEngineEnv.iMaxHeapSize is lower(equal) than KMinHeapGrowBy*1000 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   444
         * @leave KErrNotSupported aEngineType is not supported 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   445
         */    
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   446
        IMPORT_C static MOCREngineInterface* CreateOCREngineL(MOCREngineObserver& aObserver, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   447
                                                              const TOcrEngineEnv aEngineEnv, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   448
                                                              TEngineType aEngineType); 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   449
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   450
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   451
         * Release the OCR engine instance
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   452
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   453
         * @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   454
         * @param aEng Pointer to the instance of the Engine
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   455
         * @return None
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   456
         */ 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   457
        IMPORT_C static void ReleaseOCREngine(MOCREngineInterface* aEng);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   458
        
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   459
    private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   460
        
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   461
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   462
        * Constructor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   463
        */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   464
        OCREngineFactory();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   465
    };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   466
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   467
#endif  // OCRSRV_H
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   468
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   469
// End of file