sdkcreationmw/sdkexamples/cppexamples/S60Ex/helperfunctions/eikonenvironment.h
author Shabe Razvi <shaber@symbian.org>
Thu, 04 Nov 2010 17:22:05 +0000
changeset 4 b3b823debf08
parent 0 b26acd06ea60
permissions -rw-r--r--
Workaround for Bug 3917 - CWinsockInterface::DataSent calls NotifyDataSent which is not implemented.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     1
/*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     2
* Copyright (c) 2004, 2006 Nokia Corporation and/or its subsidiary(-ies).
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     3
* All rights reserved.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     4
* This component and the accompanying materials are made available
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     6
* which accompanies this distribution, and is available
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     8
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     9
* Initial Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    11
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    12
* Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    13
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    14
* Description: 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    15
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    16
*/
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    17
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    18
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    19
#ifndef __EIKONENVIRONMENT_H__
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    20
#define __EIKONENVIRONMENT_H__
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    21
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    22
// INCLUDES
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    23
#include <e32base.h>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    24
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    25
// FORWARD DECLARATIONS
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    26
class CEikAppUi;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    27
class CEikonEnv;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    28
class CEikDocument;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    29
class CCoeControl;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    30
class RFs;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    31
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    32
// CLASS DECLARATION
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    33
/**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    34
* NEikonEnvironment
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    35
* Useful functions based around the Eikon environment
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    36
*/
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    37
namespace NEikonEnvironment
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    38
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    39
        /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    40
        * EikAppUi()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    41
        * the appui
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    42
        * @return a reference to the CEikAppUi
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    43
        */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    44
        CEikAppUi& EikAppUi();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    45
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    46
        /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    47
        * EikEnv()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    48
        * the eikon environment
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    49
        * @return a reference to the CEikonEnv
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    50
        */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    51
        CEikonEnv& EikEnv();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    52
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    53
        /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    54
        * EikDocument()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    55
        * the document
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    56
        * @return a reference to CEikDocument
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    57
        */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    58
        CEikDocument& EikDocument();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    59
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    60
        /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    61
        * AddToStackL()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    62
        * add a control to the control stack
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    63
        * @param aControl the control to add
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    64
        */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    65
        void AddToStackL( CCoeControl& aControl );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    66
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    67
        /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    68
        * AddToStackL()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    69
        * add a control to the control stack given a priority and flags
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    70
        * @param aControl the control to add
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    71
        * @param aPriority the priority
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    72
        * @param aStackingFlags the flags
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    73
        */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    74
        void AddToStackL( CCoeControl& aControl,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    75
                          TInt aPriority,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    76
                          TInt aStackingFlags );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    77
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    78
        /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    79
        * RemoveFromStack()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    80
        * remove a control from the control stack
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    81
        * @param aControl the control to remove
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    82
        */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    83
        void RemoveFromStack( CCoeControl& aControl );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    84
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    85
        /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    86
        * AppFullName()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    87
        * the full name of the application
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    88
        * @return the name
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    89
        */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    90
        TFileName AppFullName();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    91
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    92
        /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    93
        * ApplicationDriveAndPath()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    94
        * the drive and path of the application
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    95
        * @return the drive and path
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    96
        */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    97
        TFileName ApplicationDriveAndPath();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    98
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    99
        /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   100
        * AddPath()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   101
        * convert a filename to a filename with the drive and
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   102
        * path of the application added
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   103
        * @return the drive, path and filename
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   104
        * @param aFileName the file name to convert
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   105
        */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   106
        TFileName AddPath( const TDesC& aFileName );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   107
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   108
        /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   109
        * MessageBox()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   110
        * Display a message box
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   111
        * @param the message to display
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   112
        */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   113
        void MessageBox( const TDesC&  aMessage );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   114
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   115
        /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   116
        * FlushWindowServer()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   117
        * flush the windows server to ensure all changes to the
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   118
        * display are reflected on the screen
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   119
        */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   120
        void FlushWindowServer();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   121
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   122
        /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   123
        * TheRFs()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   124
        * the eikon frameworks file server connection
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   125
        * @return a reference to the RFs
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   126
        */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   127
        RFs& TheRFs();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   128
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   129
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   130
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   131
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   132
#endif //__EIKONENVIRONMENT_H__
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   133
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   134
// End of File