webservices/wsoviplugin/src/wsoviserviceupdatehandler.cpp
branchRCL_3
changeset 22 56092bff76ba
parent 7 7bc6ab9b5bcd
child 36 c5fabff9b552
equal deleted inserted replaced
20:32ab7ae9ec94 22:56092bff76ba
    30 #include "wsovicons.h"
    30 #include "wsovicons.h"
    31 #include "wsovierrorresponse.h"
    31 #include "wsovierrorresponse.h"
    32 #include <httpstd.h>
    32 #include <httpstd.h>
    33 #include <SenHttpTransportProperties.h>
    33 #include <SenHttpTransportProperties.h>
    34 #include "senlayeredhttptransportproperties.h"
    34 #include "senlayeredhttptransportproperties.h"
       
    35 #include <SenDateUtils.h>
       
    36 
    35 using namespace OAuth;
    37 using namespace OAuth;
    36 
    38 
    37 
    39 
    38 
    40 
    39 class CWSOviHandlerContext;
    41 class CWSOviHandlerContext;
   215                         {
   217                         {
   216                         pCtx.Remove(WSOviContextKeys::KTokenCreationTime);
   218                         pCtx.Remove(WSOviContextKeys::KTokenCreationTime);
   217                         }
   219                         }
   218                     else
   220                     else
   219                         {
   221                         {
       
   222 					    TPtrC8 validUntil = responseFragment->ValidUntil();
       
   223 					    if (validUntil.Length())
       
   224 					        {
       
   225 					        TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,validUntil);
       
   226 					        User::LeaveIfError(pCtx.Update(WSOviContextKeys::KTokenValidUntilTime,validUntil));
       
   227 					        }
       
   228 						else
       
   229 							{
       
   230 							TTime tmpValidUntil = Time::MaxTTime();
       
   231 							TBuf8<SenDateUtils::KXmlDateTimeMaxLength> pValidUntil;
       
   232 							SenDateUtils::ToXmlDateTimeUtf8L(pValidUntil, tmpValidUntil);
       
   233 					        User::LeaveIfError(pCtx.Update(WSOviContextKeys::KTokenValidUntilTime,pValidUntil));
       
   234 							}
       
   235                        
   220                         pCtx.SetTokenKeysL(token);
   236                         pCtx.SetTokenKeysL(token);
   221                         }
   237                         }
   222                     }
   238                     }
   223                 if (!ttlInfinitive)
   239                 if (!ttlInfinitive)
   224                     {
   240                     {