dosservices/dosserver/inc/SaeThread.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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:  Thread creater for SAE
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CSaeThread_H
       
    20 #define CSaeThread_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include "sae.h"
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // Thread's name
       
    30 _LIT(KSAEThreadName, "SAEThread");
       
    31 
       
    32 // MACROS
       
    33 
       
    34 // DATA TYPES
       
    35 
       
    36 // FUNCTION PROTOTYPES
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 /**
       
    43 *  Creates SAE to it's own thread
       
    44 *
       
    45 *  @lib DosSrv.dll
       
    46 *  @since S60 3.1
       
    47 */
       
    48 NONSHARABLE_CLASS( CSaeThread ) : public CBase
       
    49     {
       
    50     public: // Constructors and destructor
       
    51 
       
    52         /**
       
    53         * Two-phased constructor.
       
    54         */
       
    55         static CSaeThread* NewL();
       
    56 
       
    57         /**
       
    58         * Destructor.
       
    59         */
       
    60         virtual ~CSaeThread();
       
    61 
       
    62     public: // New functions
       
    63 
       
    64         /**
       
    65         * Thread's entry point
       
    66         * @since S60 3.1
       
    67         * @param
       
    68         * @return Error code of thread creating
       
    69         *         KErrNone if succesfully
       
    70         */
       
    71         static TInt ThreadEntryPoint( TAny* aParameter );
       
    72 
       
    73         /**
       
    74         * Starts the thread creating
       
    75         * @since S60 3.1
       
    76         * @param
       
    77         * @return void
       
    78         */
       
    79         void StartThreadL();
       
    80 
       
    81     public: // Functions from base classes
       
    82 
       
    83     protected: // New functions
       
    84 
       
    85     protected: // Functions from base classes
       
    86 
       
    87     private:
       
    88 
       
    89         /**
       
    90         * C++ default constructor.
       
    91         */
       
    92         CSaeThread();
       
    93 
       
    94         /**
       
    95         * By default Symbian 2nd phase constructor is private.
       
    96         */
       
    97         void ConstructL();
       
    98 
       
    99         /**
       
   100         * Creates CActiveScheduler object and begins SAE creating
       
   101         */
       
   102         static TInt DoStartThreadL();
       
   103 
       
   104         /**
       
   105         * Create SAE
       
   106         */
       
   107         static TInt CreateSaeLC();
       
   108 
       
   109     public:     // Data
       
   110 
       
   111     protected:  // Data
       
   112 
       
   113     private:    // Data
       
   114 
       
   115         // Handle to created thread
       
   116         RThread iThread;
       
   117         
       
   118     public:     // Friend classes
       
   119 
       
   120     protected:  // Friend classes
       
   121 
       
   122     private:    // Friend classes
       
   123     };
       
   124 
       
   125 #endif // CSaeThread_H
       
   126 
       
   127 // End of File