omadrm/drmengine/agentv2/src/Oma2AgentContent.cpp
branchRCL_3
changeset 71 1221b68b8a5f
parent 18 8a03a285ab14
child 72 1481bf457703
equal deleted inserted replaced
67:50c53e893c3f 71:1221b68b8a5f
     1 /*
     1 /*
     2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    23 #include <caf/bitset.h>
    23 #include <caf/bitset.h>
    24 #include <caf/attribute.h>
    24 #include <caf/attribute.h>
    25 #include <e32test.h>
    25 #include <e32test.h>
    26 #include <utf.h>
    26 #include <utf.h>
    27 
    27 
    28 
    28 #include <drmbrowserlauncher.h>
    29 #include <schemehandler.h>
       
    30 
       
    31 
    29 
    32 #include "Oma2AgentContent.h"
    30 #include "Oma2AgentContent.h"
    33 #include "Oma2AgentAttributes.h"
    31 #include "Oma2AgentAttributes.h"
    34 #include "Oma1Dcf.h"
    32 #include "Oma1Dcf.h"
    35 #include "oma2dcf.h"
    33 #include "oma2dcf.h"
   543         }
   541         }
   544     }
   542     }
   545 
   543 
   546 // -----------------------------------------------------------------------------
   544 // -----------------------------------------------------------------------------
   547 // COma2AgentContent::NotifyStatusChange
   545 // COma2AgentContent::NotifyStatusChange
   548 //
       
   549 // -----------------------------------------------------------------------------
   546 // -----------------------------------------------------------------------------
   550 //
   547 //
   551 void COma2AgentContent::NotifyStatusChange(
   548 void COma2AgentContent::NotifyStatusChange(
   552     TEventMask aEventMask,
   549     TEventMask aEventMask,
   553     TRequestStatus& aStatus,
   550     TRequestStatus& aStatus,
   604     const TDesC& aUniqueId)
   601     const TDesC& aUniqueId)
   605     {
   602     {
   606     TRequestStatus *ptr = &aStatus;
   603     TRequestStatus *ptr = &aStatus;
   607     TInt r;
   604     TInt r;
   608     HBufC* b = NULL;
   605     HBufC* b = NULL;
   609     CSchemeHandler* handler = NULL;
   606 
       
   607     r = KErrNotSupported;
   610 
   608 
   611     r = iDcf->OpenPart(aUniqueId);
   609     r = iDcf->OpenPart(aUniqueId);
   612     if (r == KErrNone && iDcf->iRightsIssuerURL != NULL)
   610     if (r == KErrNone && iDcf->iRightsIssuerURL != NULL)
   613         {
   611         {
   614         TRAP(r, b = CnvUtfConverter::ConvertToUnicodeFromUtf8L(
   612         TRAP(r, b = CnvUtfConverter::ConvertToUnicodeFromUtf8L(
   615             *iDcf->iRightsIssuerURL));
   613             *iDcf->iRightsIssuerURL));
   616         if (b != NULL)
   614         if (b != NULL)
   617             {
   615             {
   618             TRAP(r, handler = CSchemeHandler::NewL(*b));
   616     				DRM::CDrmBrowserLauncher* browserLauncher = DRM::CDrmBrowserLauncher::NewLC();
   619             if (handler != NULL)
   617     	
   620                 {
   618 				    browserLauncher->LaunchUrlL(*b);
   621                 TRAP(r, handler->HandleUrlStandaloneL());
   619     
   622                 delete handler;
   620     				CleanupStack::PopAndDestroy(); // browserLauncher
   623                 }
   621    
   624             delete b;
   622             delete b;
   625             }
   623             }
   626         }
   624         }
   627     User::RequestComplete(ptr, r);
   625 
       
   626 		User::RequestComplete(ptr, r);
   628     }
   627     }
   629 
   628 
   630 // -----------------------------------------------------------------------------
   629 // -----------------------------------------------------------------------------
   631 // COma2AgentContent::CancelRequestRights
   630 // COma2AgentContent::CancelRequestRights
   632 // Not supported, getting rights is handled outside the scope of the agent and
   631 // Not supported, getting rights is handled outside the scope of the agent and