appinstaller/AppinstUi/swinstcli_stub/src/SWInstLauncher.cpp
changeset 80 9dcba1ee99f7
equal deleted inserted replaced
77:d1838696558c 80:9dcba1ee99f7
       
     1 /*
       
     2 * Copyright (c) 2002-2010 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:  Unsupported old RSWInstLauncher API
       
    15 *
       
    16 */
       
    17 
       
    18 #include "SWInstApi.h"
       
    19 #include "SWInstDefs.h"
       
    20 #include <e32debug.h>
       
    21 
       
    22 using namespace SwiUI;
       
    23 
       
    24 _LIT(KUnsupportedMsg, "RSWInstLauncher is obsolete. Use Usif::RSoftwareInstall instead.");
       
    25 
       
    26 #define KSWInstInstallServiceUid 0x102071C1
       
    27 
       
    28 
       
    29 // ================= MEMBER FUNCTIONS =======================
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // RSWInstLauncher::RSWInstLauncher
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 EXPORT_C RSWInstLauncher::RSWInstLauncher() : iConnected( EFalse )
       
    36     {
       
    37     RDebug::Print(KUnsupportedMsg);
       
    38     }
       
    39 
       
    40 // -----------------------------------------------------------------------------
       
    41 // RSWInstLauncher::Connect
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 EXPORT_C TInt RSWInstLauncher::Connect()
       
    45     {
       
    46     RDebug::Print(KUnsupportedMsg);
       
    47     return KErrNotSupported;
       
    48     }
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // RSWInstLauncher::Close
       
    52 // -----------------------------------------------------------------------------
       
    53 //
       
    54 EXPORT_C void RSWInstLauncher::Close()
       
    55     {
       
    56     RDebug::Print(KUnsupportedMsg);
       
    57     }
       
    58 
       
    59 // -----------------------------------------------------------------------------
       
    60 // RSWInstLauncher::Install
       
    61 // -----------------------------------------------------------------------------
       
    62 //
       
    63 EXPORT_C TInt RSWInstLauncher::Install( const TDesC& /*aFileName*/ )
       
    64     {
       
    65     RDebug::Print(KUnsupportedMsg);
       
    66     return KErrNotSupported;
       
    67     }
       
    68 
       
    69 // -----------------------------------------------------------------------------
       
    70 // RSWInstLauncher::Install
       
    71 // -----------------------------------------------------------------------------
       
    72 //
       
    73 EXPORT_C void RSWInstLauncher::Install( TRequestStatus& aReqStatus,
       
    74                                         const TDesC& /*aFileName*/ )
       
    75     {
       
    76     RDebug::Print(KUnsupportedMsg);
       
    77     TRequestStatus* status = &aReqStatus;
       
    78     aReqStatus = KRequestPending;
       
    79     User::RequestComplete(status, KErrNotSupported);
       
    80     }
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 // RSWInstLauncher::Install
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 EXPORT_C TInt RSWInstLauncher::Install( RFile& /*aFile*/ )
       
    87     {
       
    88     RDebug::Print(KUnsupportedMsg);
       
    89     return KErrNotSupported;
       
    90     }
       
    91 
       
    92 // -----------------------------------------------------------------------------
       
    93 // RSWInstLauncher::Install
       
    94 // -----------------------------------------------------------------------------
       
    95 //
       
    96 EXPORT_C void RSWInstLauncher::Install( TRequestStatus& aReqStatus,
       
    97                                         RFile& /*aFile*/ )
       
    98     {
       
    99     RDebug::Print(KUnsupportedMsg);
       
   100     TRequestStatus* status = &aReqStatus;
       
   101     aReqStatus = KRequestPending;
       
   102     User::RequestComplete(status, KErrNotSupported);
       
   103     }
       
   104 
       
   105 // -----------------------------------------------------------------------------
       
   106 // RSWInstLauncher::Install
       
   107 // -----------------------------------------------------------------------------
       
   108 //
       
   109 EXPORT_C TInt RSWInstLauncher::Install( const TDesC& /*aFileName*/,
       
   110                                         const TDesC8& /*aParams*/ )
       
   111     {
       
   112     RDebug::Print(KUnsupportedMsg);
       
   113     return KErrNotSupported;
       
   114     }
       
   115 
       
   116 // -----------------------------------------------------------------------------
       
   117 // RSWInstLauncher::Install
       
   118 // -----------------------------------------------------------------------------
       
   119 //
       
   120 EXPORT_C void RSWInstLauncher::Install( TRequestStatus& aReqStatus,
       
   121                                         const TDesC& /*aFileName*/,
       
   122                                         const TDesC8& /*aParams*/ )
       
   123     {
       
   124     RDebug::Print(KUnsupportedMsg);
       
   125     TRequestStatus* status = &aReqStatus;
       
   126     aReqStatus = KRequestPending;
       
   127     User::RequestComplete(status, KErrNotSupported);
       
   128     }
       
   129 
       
   130 // -----------------------------------------------------------------------------
       
   131 // RSWInstLauncher::Install
       
   132 // -----------------------------------------------------------------------------
       
   133 //
       
   134 EXPORT_C TInt RSWInstLauncher::Install( RFile& /*aFile*/,
       
   135                                         const TDesC8& /*aParams*/ )
       
   136     {
       
   137     RDebug::Print(KUnsupportedMsg);
       
   138     return KErrNotSupported;
       
   139     }
       
   140 
       
   141 // -----------------------------------------------------------------------------
       
   142 // RSWInstLauncher::Install
       
   143 // -----------------------------------------------------------------------------
       
   144 //
       
   145 EXPORT_C void RSWInstLauncher::Install( TRequestStatus& aReqStatus,
       
   146                                         RFile& /*aFile*/,
       
   147                                         const TDesC8& /*aParams*/ )
       
   148     {
       
   149     RDebug::Print(KUnsupportedMsg);
       
   150     TRequestStatus* status = &aReqStatus;
       
   151     aReqStatus = KRequestPending;
       
   152     User::RequestComplete(status, KErrNotSupported);
       
   153     }
       
   154 
       
   155 // -----------------------------------------------------------------------------
       
   156 // RSWInstLauncher::SilentInstall
       
   157 // -----------------------------------------------------------------------------
       
   158 //
       
   159 EXPORT_C TInt RSWInstLauncher::SilentInstall( const TDesC& /*aFileName*/,
       
   160                                               const TDesC8& /*aOptions*/ )
       
   161     {
       
   162     RDebug::Print(KUnsupportedMsg);
       
   163     return KErrNotSupported;
       
   164     }
       
   165 
       
   166 // -----------------------------------------------------------------------------
       
   167 // RSWInstLauncher::SilentInstall
       
   168 // -----------------------------------------------------------------------------
       
   169 //
       
   170 EXPORT_C void RSWInstLauncher::SilentInstall( TRequestStatus& aReqStatus,
       
   171                                               const TDesC& /*aFileName*/,
       
   172                                               const TDesC8& /*aOptions*/ )
       
   173     {
       
   174     RDebug::Print(KUnsupportedMsg);
       
   175     TRequestStatus* status = &aReqStatus;
       
   176     aReqStatus = KRequestPending;
       
   177     User::RequestComplete(status, KErrNotSupported);
       
   178     }
       
   179 
       
   180 // -----------------------------------------------------------------------------
       
   181 // RSWInstLauncher::SilentInstall
       
   182 // -----------------------------------------------------------------------------
       
   183 //
       
   184 EXPORT_C TInt RSWInstLauncher::SilentInstall( RFile& /*aFile*/,
       
   185                                               const TDesC8& /*aOptions*/ )
       
   186     {
       
   187     RDebug::Print(KUnsupportedMsg);
       
   188     return KErrNotSupported;
       
   189     }
       
   190 
       
   191 // -----------------------------------------------------------------------------
       
   192 // RSWInstLauncher::SilentInstall
       
   193 // -----------------------------------------------------------------------------
       
   194 //
       
   195 EXPORT_C void RSWInstLauncher::SilentInstall( TRequestStatus& aReqStatus,
       
   196                                               RFile& /*aFile*/,
       
   197                                               const TDesC8& /*aOptions*/ )
       
   198     {
       
   199     RDebug::Print(KUnsupportedMsg);
       
   200     TRequestStatus* status = &aReqStatus;
       
   201     aReqStatus = KRequestPending;
       
   202     User::RequestComplete(status, KErrNotSupported);
       
   203     }
       
   204 
       
   205 // -----------------------------------------------------------------------------
       
   206 // RSWInstLauncher::SilentInstall
       
   207 // -----------------------------------------------------------------------------
       
   208 //
       
   209 EXPORT_C TInt RSWInstLauncher::SilentInstall( const TDesC& /*aFileName*/,
       
   210                                               const TDesC8& /*aParams*/,
       
   211                                               const TDesC8& /*aOptions*/ )
       
   212     {
       
   213     RDebug::Print(KUnsupportedMsg);
       
   214     return KErrNotSupported;
       
   215     }
       
   216 
       
   217 // -----------------------------------------------------------------------------
       
   218 // RSWInstLauncher::SilentInstall
       
   219 // -----------------------------------------------------------------------------
       
   220 //
       
   221 EXPORT_C void RSWInstLauncher::SilentInstall( TRequestStatus& aReqStatus,
       
   222                                               const TDesC& /*aFileName*/,
       
   223                                               const TDesC8& /*aParams*/,
       
   224                                               const TDesC8& /*aOptions*/ )
       
   225     {
       
   226     RDebug::Print(KUnsupportedMsg);
       
   227     TRequestStatus* status = &aReqStatus;
       
   228     aReqStatus = KRequestPending;
       
   229     User::RequestComplete(status, KErrNotSupported);
       
   230     }
       
   231 
       
   232 // -----------------------------------------------------------------------------
       
   233 // RSWInstLauncher::SilentInstall
       
   234 // -----------------------------------------------------------------------------
       
   235 //
       
   236 EXPORT_C TInt RSWInstLauncher::SilentInstall( RFile& /*aFile*/,
       
   237                                               const TDesC8& /*aParams*/,
       
   238                                               const TDesC8& /*aOptions*/ )
       
   239     {
       
   240     RDebug::Print(KUnsupportedMsg);
       
   241     return KErrNotSupported;
       
   242     }
       
   243 
       
   244 // -----------------------------------------------------------------------------
       
   245 // RSWInstLauncher::SilentInstall
       
   246 // -----------------------------------------------------------------------------
       
   247 //
       
   248 EXPORT_C void RSWInstLauncher::SilentInstall( TRequestStatus& aReqStatus,
       
   249                                               RFile& /*aFile*/,
       
   250                                               const TDesC8& /*aParams*/,
       
   251                                               const TDesC8& /*aOptions*/ )
       
   252     {
       
   253     RDebug::Print(KUnsupportedMsg);
       
   254     TRequestStatus* status = &aReqStatus;
       
   255     aReqStatus = KRequestPending;
       
   256     User::RequestComplete(status, KErrNotSupported);
       
   257     }
       
   258 
       
   259 // -----------------------------------------------------------------------------
       
   260 // RSWInstLauncher::Uninstall
       
   261 // -----------------------------------------------------------------------------
       
   262 //
       
   263 EXPORT_C TInt RSWInstLauncher::Uninstall( const TUid& /*aUid*/,
       
   264                                           const TDesC8& /*aMIME*/ )
       
   265     {
       
   266     RDebug::Print(KUnsupportedMsg);
       
   267     return KErrNotSupported;
       
   268     }
       
   269 
       
   270 // -----------------------------------------------------------------------------
       
   271 // RSWInstLauncher::Uninstall
       
   272 // -----------------------------------------------------------------------------
       
   273 //
       
   274 EXPORT_C void RSWInstLauncher::Uninstall( TRequestStatus& aReqStatus,
       
   275                                           const TUid& /*aUid*/,
       
   276                                           const TDesC8& /*aMIME*/ )
       
   277     {
       
   278     RDebug::Print(KUnsupportedMsg);
       
   279     TRequestStatus* status = &aReqStatus;
       
   280     aReqStatus = KRequestPending;
       
   281     User::RequestComplete(status, KErrNotSupported);
       
   282     }
       
   283 
       
   284 // -----------------------------------------------------------------------------
       
   285 // RSWInstLauncher::SilentUninstall
       
   286 // -----------------------------------------------------------------------------
       
   287 //
       
   288 EXPORT_C TInt RSWInstLauncher::SilentUninstall( const TUid& /*aUid*/,
       
   289                                                 const TDesC8& /*aOptions*/,
       
   290                                                 const TDesC8& /*aMIME*/ )
       
   291     {
       
   292     RDebug::Print(KUnsupportedMsg);
       
   293     return KErrNotSupported;
       
   294     }
       
   295 
       
   296 // -----------------------------------------------------------------------------
       
   297 // RSWInstLauncher::SilentUninstall
       
   298 // -----------------------------------------------------------------------------
       
   299 //
       
   300 EXPORT_C void RSWInstLauncher::SilentUninstall( TRequestStatus& aReqStatus,
       
   301                                                 const TUid& /*aUid*/,
       
   302                                                 const TDesC8& /*aOptions*/,
       
   303                                                 const TDesC8& /*aMIME*/ )
       
   304     {
       
   305     RDebug::Print(KUnsupportedMsg);
       
   306     TRequestStatus* status = &aReqStatus;
       
   307     aReqStatus = KRequestPending;
       
   308     User::RequestComplete(status, KErrNotSupported);
       
   309     }
       
   310 
       
   311 // -----------------------------------------------------------------------------
       
   312 // RSWInstLauncher::CancelAsyncRequest
       
   313 // -----------------------------------------------------------------------------
       
   314 //
       
   315 EXPORT_C TInt RSWInstLauncher::CancelAsyncRequest( TInt /*aReqToCancel*/ )
       
   316     {
       
   317     RDebug::Print(KUnsupportedMsg);
       
   318     return KErrNotSupported;
       
   319     }
       
   320 
       
   321 // -----------------------------------------------------------------------------
       
   322 // RSWInstLauncher::CustomUninstall
       
   323 // -----------------------------------------------------------------------------
       
   324 //
       
   325 EXPORT_C TInt RSWInstLauncher::CustomUninstall( TOperation /*aOperation*/,
       
   326                                                 const TDesC8& /*aParams*/,
       
   327                                                 const TDesC8& /*aMIME*/ )
       
   328     {
       
   329     RDebug::Print(KUnsupportedMsg);
       
   330     return KErrNotSupported;
       
   331     }
       
   332 
       
   333 // -----------------------------------------------------------------------------
       
   334 // RSWInstLauncher::CustomUninstall
       
   335 // -----------------------------------------------------------------------------
       
   336 //
       
   337 EXPORT_C void RSWInstLauncher::CustomUninstall( TRequestStatus& aReqStatus,
       
   338                                                 TOperation /*aOperation*/,
       
   339                                                 const TDesC8& /*aParams*/,
       
   340                                                 const TDesC8& /*aMIME*/ )
       
   341     {
       
   342     RDebug::Print(KUnsupportedMsg);
       
   343     TRequestStatus* status = &aReqStatus;
       
   344     aReqStatus = KRequestPending;
       
   345     User::RequestComplete(status, KErrNotSupported);
       
   346     }
       
   347 
       
   348 // -----------------------------------------------------------------------------
       
   349 // RSWInstLauncher::GetLastErrorL
       
   350 // -----------------------------------------------------------------------------
       
   351 //
       
   352 EXPORT_C CErrDetails* RSWInstLauncher::GetLastErrorL()
       
   353     {
       
   354     RDebug::Print(KUnsupportedMsg);
       
   355     User::Leave( KErrNotSupported );
       
   356     // Keep the compiler happy
       
   357     return NULL;
       
   358     }
       
   359 
       
   360 // -----------------------------------------------------------------------------
       
   361 // RSWInstLauncher::SilentCustomUninstall
       
   362 // -----------------------------------------------------------------------------
       
   363 //
       
   364 EXPORT_C TInt RSWInstLauncher::SilentCustomUninstall( TOperation /*aOperation*/,
       
   365                                                       const TDesC8& /*aOptions*/,
       
   366                                                       const TDesC8& /*aParams*/,
       
   367                                                       const TDesC8& /*aMIME*/ )
       
   368     {
       
   369     RDebug::Print(KUnsupportedMsg);
       
   370     return KErrNotSupported;
       
   371     }
       
   372 
       
   373 // -----------------------------------------------------------------------------
       
   374 // RSWInstLauncher::SilentCustomUninstall
       
   375 // -----------------------------------------------------------------------------
       
   376 //
       
   377 EXPORT_C void RSWInstLauncher::SilentCustomUninstall( TRequestStatus& aReqStatus,
       
   378                                                       TOperation /*aOperation*/,
       
   379                                                       const TDesC8& /*aOptions*/,
       
   380                                                       const TDesC8& /*aParams*/,
       
   381                                                       const TDesC8& /*aMIME*/ )
       
   382     {
       
   383     RDebug::Print(KUnsupportedMsg);
       
   384     TRequestStatus* status = &aReqStatus;
       
   385     aReqStatus = KRequestPending;
       
   386     User::RequestComplete(status, KErrNotSupported);
       
   387     }
       
   388 
       
   389 // -----------------------------------------------------------------------------
       
   390 // RSWInstLauncher::PanicClient
       
   391 // -----------------------------------------------------------------------------
       
   392 //
       
   393 void RSWInstLauncher::PanicClient( TInt aPanic ) const
       
   394     {  
       
   395     _LIT( KSWInstClientFault, "SWInstCli" );
       
   396     User::Panic( KSWInstClientFault, aPanic );
       
   397     }
       
   398 
       
   399 // -----------------------------------------------------------------------------
       
   400 // RSWInstLauncher::ServiceUid
       
   401 // -----------------------------------------------------------------------------
       
   402 //
       
   403 TUid RSWInstLauncher::ServiceUid() const
       
   404     {
       
   405     return TUid::Uid( KSWInstInstallServiceUid );    
       
   406     }
       
   407