emailuis/nmailui/src/nmuriserviceinterface.cpp
author hgs
Mon, 23 Aug 2010 23:32:31 +0300
changeset 62 a8c646b56683
parent 47 f83bd4ae1fe3
child 68 83cc6bae1de8
permissions -rw-r--r--
201033
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description: NMail Application Launcher interface used for interfacing between
hgs
parents:
diff changeset
    15
*              QT highway and other applications
hgs
parents:
diff changeset
    16
*
hgs
parents:
diff changeset
    17
*/
hgs
parents:
diff changeset
    18
hgs
parents:
diff changeset
    19
//  INCLUDES
hgs
parents:
diff changeset
    20
#include "nmuiheaders.h"
hgs
parents:
diff changeset
    21
hgs
parents:
diff changeset
    22
/*!
hgs
parents:
diff changeset
    23
    \class NmStartParamDataHelper
hgs
parents:
diff changeset
    24
    \brief A helper class for processing the data given to the actual service.
hgs
parents:
diff changeset
    25
*/
hgs
parents:
diff changeset
    26
class NmStartParamDataHelper
hgs
parents:
diff changeset
    27
{
hgs
parents:
diff changeset
    28
public:
hgs
parents:
diff changeset
    29
hgs
parents:
diff changeset
    30
    /*!
hgs
parents:
diff changeset
    31
        Class constructor.
hgs
parents:
diff changeset
    32
    */
hgs
parents:
diff changeset
    33
    inline NmStartParamDataHelper()
47
hgs
parents: 43
diff changeset
    34
    : mSubject(NULL),
hgs
parents: 43
diff changeset
    35
      mToAddresses(NULL),
hgs
parents: 43
diff changeset
    36
      mCcAddresses(NULL),
hgs
parents: 43
diff changeset
    37
      mBccAddresses(NULL)
43
hgs
parents:
diff changeset
    38
    {
hgs
parents:
diff changeset
    39
        NM_FUNCTION;
hgs
parents:
diff changeset
    40
    }
hgs
parents:
diff changeset
    41
hgs
parents:
diff changeset
    42
    /*!
hgs
parents:
diff changeset
    43
        Class destructor.
hgs
parents:
diff changeset
    44
    */
hgs
parents:
diff changeset
    45
    inline ~NmStartParamDataHelper()
hgs
parents:
diff changeset
    46
    {
hgs
parents:
diff changeset
    47
        NM_FUNCTION;
hgs
parents:
diff changeset
    48
    }
hgs
parents:
diff changeset
    49
hgs
parents:
diff changeset
    50
    /*!
hgs
parents:
diff changeset
    51
        Extracts the data from the given QString into the class members.
hgs
parents:
diff changeset
    52
        \param data QString containing the data.
hgs
parents:
diff changeset
    53
        \return True if success, false otherwise.
hgs
parents:
diff changeset
    54
    */
hgs
parents:
diff changeset
    55
    inline bool extractData(const QString &data)
hgs
parents:
diff changeset
    56
    {
hgs
parents:
diff changeset
    57
        NM_FUNCTION;
hgs
parents:
diff changeset
    58
        
47
hgs
parents: 43
diff changeset
    59
        bool success(false);
43
hgs
parents:
diff changeset
    60
        
hgs
parents:
diff changeset
    61
        QUrl uri(data);
hgs
parents:
diff changeset
    62
        
hgs
parents:
diff changeset
    63
        if (uri.isValid()) {
hgs
parents:
diff changeset
    64
            
hgs
parents:
diff changeset
    65
            mSubject = new QString(uri.queryItemValue(emailSendSubjectKey));
hgs
parents:
diff changeset
    66
            QString to = uri.path();
hgs
parents:
diff changeset
    67
            QString cc = uri.queryItemValue(emailSendCcKey);
hgs
parents:
diff changeset
    68
            QString bcc = uri.queryItemValue(emailSendBccKey);
hgs
parents:
diff changeset
    69
            
hgs
parents:
diff changeset
    70
            addAddressesToList(to, &mToAddresses);
hgs
parents:
diff changeset
    71
            addAddressesToList(cc, &mCcAddresses);
hgs
parents:
diff changeset
    72
            addAddressesToList(bcc, &mBccAddresses);
hgs
parents:
diff changeset
    73
            
hgs
parents:
diff changeset
    74
            success = true;
hgs
parents:
diff changeset
    75
        }
hgs
parents:
diff changeset
    76
        
hgs
parents:
diff changeset
    77
        return success;
hgs
parents:
diff changeset
    78
    }
hgs
parents:
diff changeset
    79
hgs
parents:
diff changeset
    80
    /*!
hgs
parents:
diff changeset
    81
        Appends the given addresses into the given list.
hgs
parents:
diff changeset
    82
        \param address The addresses to append.
hgs
parents:
diff changeset
    83
        \param list The list where the addresses are appended to.
hgs
parents:
diff changeset
    84
    */
hgs
parents:
diff changeset
    85
    inline void addAddressesToList(QString &addresses,
hgs
parents:
diff changeset
    86
                                   QList<NmAddress*> **list)
hgs
parents:
diff changeset
    87
    {
hgs
parents:
diff changeset
    88
        NM_FUNCTION;
hgs
parents:
diff changeset
    89
        
hgs
parents:
diff changeset
    90
        if (!addresses.isEmpty()) {
hgs
parents:
diff changeset
    91
hgs
parents:
diff changeset
    92
            QList<NmAddress*> foundAddresses;
hgs
parents:
diff changeset
    93
                    
hgs
parents:
diff changeset
    94
            // Process multiple addresses.
hgs
parents:
diff changeset
    95
            if (addresses.contains(",")) {
hgs
parents:
diff changeset
    96
                QString str;               
hgs
parents:
diff changeset
    97
                while (addresses.contains(",")) {
hgs
parents:
diff changeset
    98
                    str = addresses.section(",", 0, 0); // Get the occurance.
hgs
parents:
diff changeset
    99
                    addresses.remove(0, (addresses.indexOf(",")+1)); // Remove the occurance.
hgs
parents:
diff changeset
   100
                    if (!str.isEmpty()) { // In case str would be empty on some error data. 
hgs
parents:
diff changeset
   101
                        NmAddress *address = new NmAddress(str);
hgs
parents:
diff changeset
   102
                        foundAddresses.append(address);    
hgs
parents:
diff changeset
   103
                    }
hgs
parents:
diff changeset
   104
                }
hgs
parents:
diff changeset
   105
            }
hgs
parents:
diff changeset
   106
            if (!addresses.isEmpty()) { // In case addresses would be empty on some error data. 
hgs
parents:
diff changeset
   107
                // Last one or single address.
hgs
parents:
diff changeset
   108
                NmAddress *address = new NmAddress(addresses);
hgs
parents:
diff changeset
   109
                foundAddresses.append(address);
hgs
parents:
diff changeset
   110
            }
hgs
parents:
diff changeset
   111
            // Append the found addresses into the given list.
hgs
parents:
diff changeset
   112
            *list = new QList<NmAddress*>();
hgs
parents:
diff changeset
   113
            (*list)->append(foundAddresses);
hgs
parents:
diff changeset
   114
        }
hgs
parents:
diff changeset
   115
    }
hgs
parents:
diff changeset
   116
        
hgs
parents:
diff changeset
   117
    /*!
hgs
parents:
diff changeset
   118
        Deletes the class members. Must be used if NmUiStartParam does not
hgs
parents:
diff changeset
   119
        take ownership of the members.
hgs
parents:
diff changeset
   120
    */
hgs
parents:
diff changeset
   121
    inline void deleteData()
hgs
parents:
diff changeset
   122
    {
hgs
parents:
diff changeset
   123
        NM_FUNCTION;
hgs
parents:
diff changeset
   124
        
hgs
parents:
diff changeset
   125
        delete mSubject;
hgs
parents:
diff changeset
   126
        mSubject = 0;
hgs
parents:
diff changeset
   127
hgs
parents:
diff changeset
   128
        if (mToAddresses) {
hgs
parents:
diff changeset
   129
            qDeleteAll(*mToAddresses);
hgs
parents:
diff changeset
   130
            delete mToAddresses;
hgs
parents:
diff changeset
   131
            mToAddresses = 0;
hgs
parents:
diff changeset
   132
        }
hgs
parents:
diff changeset
   133
hgs
parents:
diff changeset
   134
        if (mCcAddresses) {
hgs
parents:
diff changeset
   135
            qDeleteAll(*mCcAddresses);
hgs
parents:
diff changeset
   136
            delete mCcAddresses;
hgs
parents:
diff changeset
   137
            mCcAddresses = 0;
hgs
parents:
diff changeset
   138
        }
hgs
parents:
diff changeset
   139
hgs
parents:
diff changeset
   140
        if (mBccAddresses) {
hgs
parents:
diff changeset
   141
            qDeleteAll(*mBccAddresses);
hgs
parents:
diff changeset
   142
            delete mBccAddresses;
hgs
parents:
diff changeset
   143
            mBccAddresses = 0;
hgs
parents:
diff changeset
   144
        }
hgs
parents:
diff changeset
   145
    }
hgs
parents:
diff changeset
   146
hgs
parents:
diff changeset
   147
public: // Data
hgs
parents:
diff changeset
   148
hgs
parents:
diff changeset
   149
    QString *mSubject; // Not owned.
hgs
parents:
diff changeset
   150
    QList<NmAddress*> *mToAddresses; // Not owned.
hgs
parents:
diff changeset
   151
    QList<NmAddress*> *mCcAddresses; // Not owned.
hgs
parents:
diff changeset
   152
    QList<NmAddress*> *mBccAddresses; // Not owned.
hgs
parents:
diff changeset
   153
};
hgs
parents:
diff changeset
   154
hgs
parents:
diff changeset
   155
/*!
hgs
parents:
diff changeset
   156
    \class NmUriServiceInterface
hgs
parents:
diff changeset
   157
    \brief NMail application service interface which provides an email sending
hgs
parents:
diff changeset
   158
           interface for other application using the Qt Highway.
hgs
parents:
diff changeset
   159
*/
hgs
parents:
diff changeset
   160
hgs
parents:
diff changeset
   161
/*!
hgs
parents:
diff changeset
   162
    Class constructor.
hgs
parents:
diff changeset
   163
*/
hgs
parents:
diff changeset
   164
NmUriServiceInterface::NmUriServiceInterface(QObject *parent,
hgs
parents:
diff changeset
   165
                                               NmUiEngine &uiEngine,
hgs
parents:
diff changeset
   166
                                               NmApplication *application)
hgs
parents:
diff changeset
   167
    : XQServiceProvider(emailServiceName+"."+XQI_URI_VIEW, parent),
hgs
parents:
diff changeset
   168
      mApplication(application),
hgs
parents:
diff changeset
   169
      mUiEngine(uiEngine),
hgs
parents:
diff changeset
   170
      mAsyncReqId(0),
hgs
parents:
diff changeset
   171
      mStartParam(NULL),
hgs
parents:
diff changeset
   172
      mSelectionDialog(NULL),
hgs
parents:
diff changeset
   173
      mCurrentView(NULL)
hgs
parents:
diff changeset
   174
{
hgs
parents:
diff changeset
   175
    publishAll();
hgs
parents:
diff changeset
   176
}
hgs
parents:
diff changeset
   177
hgs
parents:
diff changeset
   178
hgs
parents:
diff changeset
   179
/*!
hgs
parents:
diff changeset
   180
    Class desctructor.
hgs
parents:
diff changeset
   181
*/
hgs
parents:
diff changeset
   182
NmUriServiceInterface::~NmUriServiceInterface()
hgs
parents:
diff changeset
   183
{
hgs
parents:
diff changeset
   184
    NM_FUNCTION;
hgs
parents:
diff changeset
   185
    
hgs
parents:
diff changeset
   186
    delete mStartParam;
hgs
parents:
diff changeset
   187
    delete mSelectionDialog;
hgs
parents:
diff changeset
   188
}
hgs
parents:
diff changeset
   189
hgs
parents:
diff changeset
   190
hgs
parents:
diff changeset
   191
/*!
hgs
parents:
diff changeset
   192
    Queries the user for a mailbox to use.
hgs
parents:
diff changeset
   193
    \param mailboxId Where the ID of the selected mailbox is set.
hgs
parents:
diff changeset
   194
    \return True if a mailbox was selected, false otherwise.
hgs
parents:
diff changeset
   195
*/
hgs
parents:
diff changeset
   196
void NmUriServiceInterface::selectionDialogClosed(NmId &mailboxId)
hgs
parents:
diff changeset
   197
{
hgs
parents:
diff changeset
   198
    NM_FUNCTION;
hgs
parents:
diff changeset
   199
    
hgs
parents:
diff changeset
   200
    if (mailboxId.id()) { // mailbox selected
hgs
parents:
diff changeset
   201
        launchEditorView(mailboxId);
hgs
parents:
diff changeset
   202
    }
hgs
parents:
diff changeset
   203
    else {
hgs
parents:
diff changeset
   204
        cancelService();
hgs
parents:
diff changeset
   205
    }
hgs
parents:
diff changeset
   206
}
hgs
parents:
diff changeset
   207
hgs
parents:
diff changeset
   208
hgs
parents:
diff changeset
   209
/*!
hgs
parents:
diff changeset
   210
    Used from external applications to handle mailto: uri's.
hgs
parents:
diff changeset
   211
hgs
parents:
diff changeset
   212
    \param data <mailto:> uri
hgs
parents:
diff changeset
   213
*/
hgs
parents:
diff changeset
   214
bool NmUriServiceInterface::view(const QString& uri)
hgs
parents:
diff changeset
   215
{
hgs
parents:
diff changeset
   216
    NM_FUNCTION;
47
hgs
parents: 43
diff changeset
   217
      
hgs
parents: 43
diff changeset
   218
    HbMainWindow *mainWindow(NULL);
hgs
parents: 43
diff changeset
   219
    if (mApplication) {
hgs
parents: 43
diff changeset
   220
        // Make sure that nmail stays background if user presses back in editorview
hgs
parents: 43
diff changeset
   221
        mApplication->updateVisibilityState();
hgs
parents: 43
diff changeset
   222
        
hgs
parents: 43
diff changeset
   223
        mainWindow = mApplication->mainWindow();
hgs
parents: 43
diff changeset
   224
        if (mainWindow) {
hgs
parents: 43
diff changeset
   225
            mCurrentView = mainWindow->currentView();  
hgs
parents: 43
diff changeset
   226
        } 
hgs
parents: 43
diff changeset
   227
    }
43
hgs
parents:
diff changeset
   228
hgs
parents:
diff changeset
   229
    // Hide the current view.
hgs
parents:
diff changeset
   230
    if (mCurrentView) {
hgs
parents:
diff changeset
   231
        mCurrentView->hide();
hgs
parents:
diff changeset
   232
    }
hgs
parents:
diff changeset
   233
    
hgs
parents:
diff changeset
   234
    // Check the given data.
hgs
parents:
diff changeset
   235
    NmStartParamDataHelper dataHelper;
hgs
parents:
diff changeset
   236
    bool validData = dataHelper.extractData(uri);
hgs
parents:
diff changeset
   237
     
hgs
parents:
diff changeset
   238
    NmMailboxListModel &mailboxListModel = mUiEngine.mailboxListModel();
hgs
parents:
diff changeset
   239
    const int count = mailboxListModel.rowCount();
hgs
parents:
diff changeset
   240
    NmId mailboxId(0);
hgs
parents:
diff changeset
   241
hgs
parents:
diff changeset
   242
    mAsyncReqId = setCurrentRequestAsync();
hgs
parents:
diff changeset
   243
hgs
parents:
diff changeset
   244
    if (!validData) {
hgs
parents:
diff changeset
   245
        // Failed to extract the data!
hgs
parents:
diff changeset
   246
        NM_ERROR(1,"NmUriServiceInterface::view(): failed to process the given data");
hgs
parents:
diff changeset
   247
        cancelService();
hgs
parents:
diff changeset
   248
    }
hgs
parents:
diff changeset
   249
    else if (count == 0) {
hgs
parents:
diff changeset
   250
        HbDeviceMessageBox note(hbTrId("txt_mail_dialog_no_mailboxes_defined"),
hgs
parents:
diff changeset
   251
                          HbMessageBox::MessageTypeInformation);
hgs
parents:
diff changeset
   252
        note.setTimeout(HbMessageBox::NoTimeout);
hgs
parents:
diff changeset
   253
        note.show();
hgs
parents:
diff changeset
   254
        cancelService();
hgs
parents:
diff changeset
   255
    }
hgs
parents:
diff changeset
   256
    else { // count > 0
47
hgs
parents: 43
diff changeset
   257
        if (mainWindow) {
hgs
parents: 43
diff changeset
   258
            mainWindow->show();        
hgs
parents: 43
diff changeset
   259
        }
43
hgs
parents:
diff changeset
   260
hgs
parents:
diff changeset
   261
    	mStartParam = new NmUiStartParam(
hgs
parents:
diff changeset
   262
        	NmUiViewMessageEditor,
hgs
parents:
diff changeset
   263
	        0, // account id
hgs
parents:
diff changeset
   264
	        0, // folder id
hgs
parents:
diff changeset
   265
    	    0, // message id
hgs
parents:
diff changeset
   266
    	    NmUiEditorMailto, // editor start mode
hgs
parents:
diff changeset
   267
	        dataHelper.mToAddresses, // address list
hgs
parents:
diff changeset
   268
    	    0, // attachment list
hgs
parents:
diff changeset
   269
        	true, // start as service
hgs
parents:
diff changeset
   270
	        dataHelper.mSubject, // message subject
hgs
parents:
diff changeset
   271
	        dataHelper.mCcAddresses, // list containing cc recipient addresses
hgs
parents:
diff changeset
   272
    	    dataHelper.mBccAddresses // list containing bcc recipient addresses
hgs
parents:
diff changeset
   273
	    );
hgs
parents:
diff changeset
   274
hgs
parents:
diff changeset
   275
        if (count == 1) {
hgs
parents:
diff changeset
   276
            // A single mailbox exists.
hgs
parents:
diff changeset
   277
            QModelIndex modelIndex = mailboxListModel.index(0, 0);
hgs
parents:
diff changeset
   278
            QVariant mailbox(mailboxListModel.data(modelIndex));
hgs
parents:
diff changeset
   279
            NmMailboxMetaData *mailboxMetaData = mailbox.value<NmMailboxMetaData*>();
hgs
parents:
diff changeset
   280
            mailboxId = mailboxMetaData->id();
hgs
parents:
diff changeset
   281
        	launchEditorView(mailboxId);
hgs
parents:
diff changeset
   282
        }
hgs
parents:
diff changeset
   283
        else { // count > 1
hgs
parents:
diff changeset
   284
            if (!mSelectionDialog) {
hgs
parents:
diff changeset
   285
                mSelectionDialog =
hgs
parents:
diff changeset
   286
                    new NmMailboxSelectionDialog(mUiEngine.mailboxListModel());
hgs
parents:
diff changeset
   287
            }
62
hgs
parents: 47
diff changeset
   288
            
hgs
parents: 47
diff changeset
   289
            if (!XQServiceUtil::isEmbedded()) {
hgs
parents: 47
diff changeset
   290
                XQServiceUtil::toBackground(false);
hgs
parents: 47
diff changeset
   291
            }
hgs
parents: 47
diff changeset
   292
            
43
hgs
parents:
diff changeset
   293
            connect(mSelectionDialog,SIGNAL(selectionDialogClosed(NmId&)),
hgs
parents:
diff changeset
   294
                this,SLOT(selectionDialogClosed(NmId&)));
hgs
parents:
diff changeset
   295
            mSelectionDialog->open();
hgs
parents:
diff changeset
   296
hgs
parents:
diff changeset
   297
            // launch the editor when the dialog is closed
hgs
parents:
diff changeset
   298
        }
hgs
parents:
diff changeset
   299
    }
hgs
parents:
diff changeset
   300
    
hgs
parents:
diff changeset
   301
    return true;
hgs
parents:
diff changeset
   302
}
hgs
parents:
diff changeset
   303
hgs
parents:
diff changeset
   304
/*!
hgs
parents:
diff changeset
   305
    Called when mailbox id is known and editor can be opened
hgs
parents:
diff changeset
   306
    \param mailboxId mailbox using in editor
hgs
parents:
diff changeset
   307
 */
hgs
parents:
diff changeset
   308
void NmUriServiceInterface::launchEditorView(NmId mailboxId)
hgs
parents:
diff changeset
   309
{
hgs
parents:
diff changeset
   310
    NM_FUNCTION;
hgs
parents:
diff changeset
   311
    NM_COMMENT(QString("NmUriServiceInterface::launchEditorView(): mailboxId=%1").arg(mailboxId.id()));
hgs
parents:
diff changeset
   312
    
hgs
parents:
diff changeset
   313
    // Make the previous view visible again.
hgs
parents:
diff changeset
   314
    if (mCurrentView) {
hgs
parents:
diff changeset
   315
        mCurrentView->show();
hgs
parents:
diff changeset
   316
        mCurrentView = NULL;
hgs
parents:
diff changeset
   317
    }
hgs
parents:
diff changeset
   318
hgs
parents:
diff changeset
   319
    if (mStartParam) {
62
hgs
parents: 47
diff changeset
   320
        // Make sure the NMail application is in the foreground
hgs
parents: 47
diff changeset
   321
        if (!XQServiceUtil::isEmbedded()) {
hgs
parents: 47
diff changeset
   322
            XQServiceUtil::toBackground(false);    
hgs
parents: 47
diff changeset
   323
        }
hgs
parents: 47
diff changeset
   324
        
43
hgs
parents:
diff changeset
   325
        mStartParam->setMailboxId(mailboxId);
hgs
parents:
diff changeset
   326
        mApplication->enterNmUiView(mStartParam);
hgs
parents:
diff changeset
   327
        mStartParam = NULL; // ownership passed
hgs
parents:
diff changeset
   328
    }
hgs
parents:
diff changeset
   329
    completeRequest(mAsyncReqId, 1);
hgs
parents:
diff changeset
   330
    mAsyncReqId = 0;
hgs
parents:
diff changeset
   331
}
hgs
parents:
diff changeset
   332
hgs
parents:
diff changeset
   333
void NmUriServiceInterface::cancelService()
hgs
parents:
diff changeset
   334
{
hgs
parents:
diff changeset
   335
    NM_FUNCTION;
hgs
parents:
diff changeset
   336
    
hgs
parents:
diff changeset
   337
    delete mStartParam;
hgs
parents:
diff changeset
   338
    mStartParam = NULL;
hgs
parents:
diff changeset
   339
hgs
parents:
diff changeset
   340
    // If the service was started as embedded, do not hide the app.
hgs
parents:
diff changeset
   341
    if (!XQServiceUtil::isEmbedded()) {
hgs
parents:
diff changeset
   342
        XQServiceUtil::toBackground(true);
hgs
parents:
diff changeset
   343
    }
hgs
parents:
diff changeset
   344
hgs
parents:
diff changeset
   345
    completeRequest(mAsyncReqId, 0);
hgs
parents:
diff changeset
   346
    mAsyncReqId = 0;
hgs
parents:
diff changeset
   347
hgs
parents:
diff changeset
   348
    // If started as service, the application must be closed now.
hgs
parents:
diff changeset
   349
    if (XQServiceUtil::isService()) {
hgs
parents:
diff changeset
   350
        connect(this, SIGNAL(returnValueDelivered()),
hgs
parents:
diff changeset
   351
            mApplication, SLOT(delayedExitApplication()));
hgs
parents:
diff changeset
   352
    }
hgs
parents:
diff changeset
   353
    else {
hgs
parents:
diff changeset
   354
        // Make the previous view visible again
hgs
parents:
diff changeset
   355
        if (mCurrentView) {
hgs
parents:
diff changeset
   356
            mCurrentView->show();
hgs
parents:
diff changeset
   357
            mCurrentView = NULL;
hgs
parents:
diff changeset
   358
        }
hgs
parents:
diff changeset
   359
    }
hgs
parents:
diff changeset
   360
}
hgs
parents:
diff changeset
   361
hgs
parents:
diff changeset
   362
// End of file.