sapi_sysinfo/sysinfoservice/src/deviceinfo.cpp
author BuildAdmin@LON-ENGBUILD89
Mon, 27 Apr 2009 19:11:09 +0100
changeset 6 5e56c399001b
parent 0 14df0fbfcc4e
permissions -rw-r--r--
[maven-scm] copy for tag serviceapi_FCL.005
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     1
/*
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     8
*
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    11
*
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    12
* Contributors:
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    13
*
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    14
* Description:  class implementation
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    15
*
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    16
*/
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    17
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    18
#include <hal.h>
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    19
#include <SysUtil.h>
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    20
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    21
#include "sysinfoservice.h"
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    22
#include "SysInfoUtils.h"
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    23
#include "entitykeys.h"
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    24
#include "deviceinfo.h"
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    25
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    26
_LIT(KROMInstallDir,"\\system\\install\\");
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    27
_LIT(KS60ProductIdFile,"Series60v*.sis");
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    28
_LIT(KProductIdentifier,"RM");
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    29
_LIT(KProductUnknown,"Unknown");
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    30
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    31
const TInt KPositionNine = 9;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    32
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    33
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    34
// CDeviceInfo::CDeviceInfo()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    35
// C++ default constructor.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    36
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    37
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    38
CDeviceInfo::CDeviceInfo():
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    39
            iPlatformMajorVersion(0),
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    40
            iPlatformMinorVersion(0),
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    41
            iOSMajorVersion(0),
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    42
            iOSMinorVersion(0)
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    43
    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    44
    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    45
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    46
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    47
// CDeviceInfo::~CDeviceInfo()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    48
// Destructor.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    49
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    50
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    51
CDeviceInfo::~CDeviceInfo()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    52
    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    53
    delete iProductType;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    54
    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    55
	
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    56
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    57
// CDeviceInfo::NewL()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    58
// Two-phased constructor, returns instance of this class.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    59
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    60
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    61
CDeviceInfo* CDeviceInfo::NewL()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    62
    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    63
    CDeviceInfo* self;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    64
    self = new (ELeave) CDeviceInfo();
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    65
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    66
    CleanupStack::PushL(self);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    67
    self->ConstructL ();
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    68
    CleanupStack::Pop(self);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    69
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    70
    return self;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    71
    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    72
	
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    73
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    74
// CDeviceInfo::NewL()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    75
// 2nd Phase constructor to allocate required resources for this obj.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    76
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    77
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    78
void CDeviceInfo::ConstructL ()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    79
    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    80
    GetDeviceInfoL();
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    81
    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    82
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    83
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    84
// CDeviceInfo::GetDeviceInfoL()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    85
// This function reads device information initializes member varialbes.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    86
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    87
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    88
void CDeviceInfo::GetDeviceInfoL()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    89
    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    90
    //get firmware version			
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    91
    User::LeaveIfError(SysUtil::GetSWVersion(iFirmwareVersion));
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    92
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    93
    //get platform version			
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    94
    RFs fs;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    95
    CDir* result;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    96
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    97
    CleanupClosePushL(fs);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    98
    User::LeaveIfError(fs.Connect());
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    99
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   100
    TFindFile ff(fs);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   101
    TInt err(KErrNone);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   102
    err = ff.FindWildByDir(KS60ProductIdFile,KROMInstallDir,result);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   103
    if(!err)
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   104
        {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   105
        CleanupStack::PushL(result);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   106
        User::LeaveIfError(result->Sort(ESortByName|EDescending));
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   107
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   108
        if(result->Count() >= 0)
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   109
            {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   110
            TPtrC filename = (*result)[0].iName;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   111
            TLex parser((filename));
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   112
            parser.Inc(KPositionNine);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   113
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   114
            // Get major version value
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   115
            err = parser.Val(iPlatformMajorVersion);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   116
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   117
            if( parser.Get() != '.' || err )
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   118
                {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   119
                iPlatformMajorVersion = 0;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   120
                }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   121
            else
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   122
                {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   123
                // Get minor version value
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   124
                err = parser.Val(iPlatformMinorVersion);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   125
                if( err )
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   126
                    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   127
                    iPlatformMajorVersion = 0;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   128
                    iPlatformMinorVersion = 0;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   129
                    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   130
                }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   131
            }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   132
        // clean up result
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   133
        CleanupStack::PopAndDestroy(result);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   134
        }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   135
    // clean up file session fs.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   136
    CleanupStack::PopAndDestroy(&fs);	
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   137
    	
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   138
    //get machine id and symbian OS version			
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   139
    HAL::Get(HALData::EMachineUid, iMachineId);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   140
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   141
    //get product type
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   142
    ProcessProductTypeL();
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   143
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   144
    // Session to the telephony server.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   145
    RTelServer telserver;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   146
    //RMobilePhone handle.	
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   147
    RMobilePhone 	mobilephone;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   148
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   149
    CleanupClosePushL(telserver);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   150
    CleanupClosePushL(mobilephone);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   151
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   152
    User::LeaveIfError(RPhoneInstance::Connect( telserver,mobilephone ));
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   153
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   154
    //get phone manufacturer,model,IMEI		
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   155
    TRequestStatus Status = KRequestPending;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   156
    mobilephone.GetPhoneId(Status,iPhoneIdentity);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   157
    User::WaitForRequest(Status);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   158
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   159
    //Close Phone handle.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   160
    CleanupStack::PopAndDestroy(2,&telserver);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   161
    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   162
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   163
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   164
// CDeviceInfo::ProcessProductType()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   165
// This function does lexical processing on Firmware version to read
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   166
// product type.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   167
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   168
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   169
void CDeviceInfo::ProcessProductTypeL()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   170
    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   171
    TBuf<KSysUtilVersionTextLength> versionString(KNullDesC);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   172
    TPtrC ProductType(KNullDesC);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   173
    const TChar KNewLine('\n');
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   174
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   175
    versionString.Copy(iFirmwareVersion);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   176
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   177
    TInt offset = versionString.FindF(KProductIdentifier);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   178
    if( KErrNotFound != offset)
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   179
        {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   180
        TPtr productinfo = versionString.MidTPtr(offset);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   181
        //search new line charecter.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   182
        offset = productinfo.LocateF(KNewLine);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   183
        if( KErrNotFound != offset )
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   184
            {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   185
            ProductType.Set(productinfo.Left(offset));
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   186
            }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   187
        }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   188
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   189
    iProductType = ProductType.AllocL();	
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   190
    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   191
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   192
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   193
// CDeviceInfo::ProductType()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   194
// returns product type.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   195
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   196
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   197
TPtrC CDeviceInfo::ProductType() const
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   198
    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   199
    if( iProductType->Des() == KNullDesC )
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   200
        return TPtrC(KProductUnknown);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   201
    else
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   202
        return TPtrC(*iProductType);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   203
    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   204
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   205
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   206
// CDeviceInfo::FirmwareVersion()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   207
// returns firmware version.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   208
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   209
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   210
TPtrC CDeviceInfo::FirmwareVersion() const
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   211
    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   212
    return TPtrC(iFirmwareVersion);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   213
    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   214
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   215
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   216
// CDeviceInfo::Manufaturer()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   217
// returns Manufacture name.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   218
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   219
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   220
TPtrC CDeviceInfo::Manufaturer() const
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   221
{
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   222
	return TPtrC(iPhoneIdentity.iManufacturer);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   223
}
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   224
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   225
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   226
// CDeviceInfo::Model()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   227
// returns Phone Model.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   228
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   229
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   230
TPtrC CDeviceInfo::Model() const
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   231
    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   232
    return TPtrC(iPhoneIdentity.iModel);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   233
    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   234
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   235
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   236
// CDeviceInfo::IMEI()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   237
// returns Serial number.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   238
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   239
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   240
TPtrC CDeviceInfo::IMEI() const
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   241
    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   242
    return TPtrC(iPhoneIdentity.iSerialNumber);
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   243
    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   244
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   245
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   246
// CDeviceInfo::MachineId()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   247
// returns Machine ID.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   248
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   249
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   250
TInt CDeviceInfo::MachineId() const
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   251
    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   252
    return iMachineId;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   253
    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   254
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   255
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   256
// CDeviceInfo::GetPlatformVersion()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   257
// returns PLATFORM VERSION NUMBER.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   258
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   259
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   260
void CDeviceInfo::GetPlatformVersion(TInt& aMajor,TInt& aMinor)
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   261
    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   262
    aMajor = iPlatformMajorVersion;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   263
    aMinor = iPlatformMinorVersion;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   264
    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   265
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   266
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   267
// CDeviceInfo::GetOSVersion()
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   268
// returns OS VERSION NUMBER.
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   269
// --------------------------------------------------------------------
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   270
//
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   271
void CDeviceInfo::GetOSVersion(TInt& aMajor,TInt& aMinor)
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   272
    {
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   273
    aMajor = iOSMajorVersion;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   274
    aMinor = iOSMinorVersion;
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   275
    }
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   276
14df0fbfcc4e Revision: 200912
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   277
//End of file.