PECengine/PresenceManager2/SrcNWSessionSlot/CPEngNWSessionSlotID2.cpp
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 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:  NWSessionSlotID.
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include <CPEngNWSessionSlotID2.h>
       
    20 #include "CPEngNWSessionSlotID2Imp.h"
       
    21 
       
    22 
       
    23 // ============================ MEMBER FUNCTIONS ===============================
       
    24 
       
    25 
       
    26 // -----------------------------------------------------------------------------
       
    27 // CPEngNWSessionSlotID2::NewL()
       
    28 // Two-phased constructor.
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 EXPORT_C CPEngNWSessionSlotID2* CPEngNWSessionSlotID2::NewL()
       
    32     {
       
    33     CPEngNWSessionSlotID2* self = CPEngNWSessionSlotID2::NewLC();
       
    34     CleanupStack::Pop( self );
       
    35     return self;
       
    36     }
       
    37 
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 // CPEngNWSessionSlotID2::NewLC()
       
    41 // Two-phased constructor.
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 EXPORT_C CPEngNWSessionSlotID2* CPEngNWSessionSlotID2::NewLC()
       
    45     {
       
    46     CPEngNWSessionSlotID2* self = new ( ELeave ) CPEngNWSessionSlotID2;
       
    47     CleanupStack::PushL( self );
       
    48     self->iImp = CPEngNWSessionSlotID2Imp::NewL();
       
    49     return self;
       
    50     }
       
    51 
       
    52 
       
    53 EXPORT_C CPEngNWSessionSlotID2* CPEngNWSessionSlotID2::CloneL() const
       
    54     {
       
    55     CPEngNWSessionSlotID2* self = new ( ELeave ) CPEngNWSessionSlotID2;
       
    56     CleanupStack::PushL( self );
       
    57     self->iImp = iImp->CloneL();
       
    58     CleanupStack::Pop( self );
       
    59     return self;
       
    60     }
       
    61 
       
    62 
       
    63 
       
    64 // Destructor
       
    65 CPEngNWSessionSlotID2::~CPEngNWSessionSlotID2()
       
    66     {
       
    67     delete iImp;
       
    68     }
       
    69 
       
    70 
       
    71 
       
    72 // -----------------------------------------------------------------------------
       
    73 // CPEngNWSessionSlotID2::CPEngNWSessionSlotID2
       
    74 // C++ default constructor can NOT contain any code, that
       
    75 // might leave.
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 CPEngNWSessionSlotID2::CPEngNWSessionSlotID2()
       
    79     {
       
    80     }
       
    81 
       
    82 
       
    83 
       
    84 // -----------------------------------------------------------------------------
       
    85 // CPEngNWSessionSlotID2::SetServiceAddressL()
       
    86 // -----------------------------------------------------------------------------
       
    87 //
       
    88 EXPORT_C void CPEngNWSessionSlotID2::SetServiceAddressL( const TDesC& aAddress )
       
    89     {
       
    90     iImp->SetServiceAddressL( aAddress, EPEngMMExact );
       
    91     }
       
    92 
       
    93 
       
    94 // -----------------------------------------------------------------------------
       
    95 // CPEngNWSessionSlotID2::SetUserIdL()
       
    96 // -----------------------------------------------------------------------------
       
    97 //
       
    98 EXPORT_C void CPEngNWSessionSlotID2::SetUserIdL( const TDesC& aUserId )
       
    99     {
       
   100     iImp->SetUserIdL( aUserId, EPEngMMExact );
       
   101     }
       
   102 
       
   103 
       
   104 // -----------------------------------------------------------------------------
       
   105 // CPEngNWSessionSlotID2::SetAppIdL()
       
   106 // -----------------------------------------------------------------------------
       
   107 //
       
   108 EXPORT_C void CPEngNWSessionSlotID2::SetAppIdL( const TDesC& aAppId )
       
   109     {
       
   110     iImp->SetAppIdL( aAppId, EPEngMMExact );
       
   111     }
       
   112 
       
   113 
       
   114 // -----------------------------------------------------------------------------
       
   115 // CPEngNWSessionSlotID2::SetAllL()
       
   116 // -----------------------------------------------------------------------------
       
   117 //
       
   118 EXPORT_C void CPEngNWSessionSlotID2::SetAllL( const TDesC& aAddress,
       
   119                                               const TDesC& aUserId,
       
   120                                               const TDesC& aAppId )
       
   121     {
       
   122     iImp->SetServiceAddressL( aAddress, EPEngMMExact );
       
   123     iImp->SetUserIdL( aUserId, EPEngMMExact );
       
   124     iImp->SetAppIdL( aAppId, EPEngMMExact );
       
   125     }
       
   126 
       
   127 
       
   128 // -----------------------------------------------------------------------------
       
   129 // CPEngNWSessionSlotID2::ServiceAddress()
       
   130 // -----------------------------------------------------------------------------
       
   131 //
       
   132 EXPORT_C TPtrC CPEngNWSessionSlotID2::ServiceAddress() const
       
   133     {
       
   134     return iImp->ServiceAddress();
       
   135     }
       
   136 
       
   137 
       
   138 // -----------------------------------------------------------------------------
       
   139 // CPEngNWSessionSlotID2::UserId()
       
   140 // -----------------------------------------------------------------------------
       
   141 //
       
   142 EXPORT_C TPtrC CPEngNWSessionSlotID2::UserId() const
       
   143     {
       
   144     return iImp->UserId();
       
   145     }
       
   146 
       
   147 
       
   148 // -----------------------------------------------------------------------------
       
   149 // CPEngNWSessionSlotID2::AppId()
       
   150 // -----------------------------------------------------------------------------
       
   151 //
       
   152 EXPORT_C TPtrC CPEngNWSessionSlotID2::AppId() const
       
   153     {
       
   154     return iImp->AppId();
       
   155     }
       
   156 
       
   157 
       
   158 
       
   159 // -----------------------------------------------------------------------------
       
   160 // CPEngNWSessionSlotID2::SetServiceAddressMatchAnyL()
       
   161 // -----------------------------------------------------------------------------
       
   162 //
       
   163 EXPORT_C void CPEngNWSessionSlotID2::SetServiceAddressMatchAnyL()
       
   164     {
       
   165     iImp->SetServiceAddressL( KPEngMatchSymbolWildAny, EPEngMMWildAny );
       
   166     }
       
   167 
       
   168 
       
   169 
       
   170 // -----------------------------------------------------------------------------
       
   171 // CPEngNWSessionSlotID2::SetUserIdMatchAnyL()
       
   172 // -----------------------------------------------------------------------------
       
   173 //
       
   174 EXPORT_C void CPEngNWSessionSlotID2::SetUserIdMatchAnyL()
       
   175     {
       
   176     iImp->SetUserIdL( KPEngMatchSymbolWildAny, EPEngMMWildAny );
       
   177     }
       
   178 
       
   179 
       
   180 
       
   181 // -----------------------------------------------------------------------------
       
   182 // CPEngNWSessionSlotID2::SetAppIdMatchAnyL()
       
   183 // -----------------------------------------------------------------------------
       
   184 //
       
   185 EXPORT_C void CPEngNWSessionSlotID2::SetAppIdMatchAnyL()
       
   186     {
       
   187     iImp->SetAppIdL( KPEngMatchSymbolWildAny, EPEngMMWildAny );
       
   188     }
       
   189 
       
   190 
       
   191 // -----------------------------------------------------------------------------
       
   192 // CPEngNWSessionSlotID2::IsServiceAddressWild()
       
   193 // -----------------------------------------------------------------------------
       
   194 //
       
   195 EXPORT_C TBool CPEngNWSessionSlotID2::IsServiceAddressWild() const
       
   196     {
       
   197     return iImp->IsServiceAddressWild();
       
   198     }
       
   199 
       
   200 
       
   201 
       
   202 // -----------------------------------------------------------------------------
       
   203 // CPEngNWSessionSlotID2::IsUserIdWild()
       
   204 // -----------------------------------------------------------------------------
       
   205 //
       
   206 EXPORT_C TBool CPEngNWSessionSlotID2::IsUserIdWild() const
       
   207     {
       
   208     return iImp->IsUserIdWild();
       
   209     }
       
   210 
       
   211 
       
   212 
       
   213 // -----------------------------------------------------------------------------
       
   214 // CPEngNWSessionSlotID2::IsAppIdWild()
       
   215 // -----------------------------------------------------------------------------
       
   216 //
       
   217 EXPORT_C TBool CPEngNWSessionSlotID2::IsAppIdWild() const
       
   218     {
       
   219     return iImp->IsAppIdWild();
       
   220     }
       
   221 
       
   222 
       
   223 // -----------------------------------------------------------------------------
       
   224 // CPEngNWSessionSlotID2::IsWild()
       
   225 // -----------------------------------------------------------------------------
       
   226 //
       
   227 EXPORT_C TBool CPEngNWSessionSlotID2::IsWild() const
       
   228     {
       
   229     return iImp->IsWild();
       
   230     }
       
   231 
       
   232 
       
   233 // -----------------------------------------------------------------------------
       
   234 // CPEngNWSessionSlotID2::MatchFullId()
       
   235 // -----------------------------------------------------------------------------
       
   236 //
       
   237 EXPORT_C TInt CPEngNWSessionSlotID2::MatchFullId(
       
   238     const CPEngNWSessionSlotID2& aIdToMatch ) const
       
   239     {
       
   240     return iImp->MatchFullId( *aIdToMatch.Implementation() );
       
   241     }
       
   242 
       
   243 
       
   244 // -----------------------------------------------------------------------------
       
   245 // CPEngNWSessionSlotID2::MatchBasePart()
       
   246 // -----------------------------------------------------------------------------
       
   247 //
       
   248 EXPORT_C TInt CPEngNWSessionSlotID2::MatchBasePart(
       
   249     const CPEngNWSessionSlotID2& aIdToMatch ) const
       
   250     {
       
   251     return iImp->MatchBasePart( *aIdToMatch.Implementation() );
       
   252     }
       
   253 
       
   254 
       
   255 // -----------------------------------------------------------------------------
       
   256 // CPEngNWSessionSlotID2::MatchAppIdPart()
       
   257 // -----------------------------------------------------------------------------
       
   258 //
       
   259 EXPORT_C TInt CPEngNWSessionSlotID2::MatchAppIdPart(
       
   260     const CPEngNWSessionSlotID2& aIdToMatch ) const
       
   261     {
       
   262     return iImp->MatchAppIdPart( *aIdToMatch.Implementation() );
       
   263     }
       
   264 
       
   265 
       
   266 // -----------------------------------------------------------------------------
       
   267 // CPEngNWSessionSlotID2::PackL()
       
   268 // -----------------------------------------------------------------------------
       
   269 //
       
   270 EXPORT_C HBufC8* CPEngNWSessionSlotID2::PackL() const
       
   271     {
       
   272     HBufC8* pack = iImp->PackFullLC();
       
   273     CleanupStack::Pop( pack );
       
   274     return pack;
       
   275     }
       
   276 
       
   277 
       
   278 // -----------------------------------------------------------------------------
       
   279 // CPEngNWSessionSlotID2::PackLC()
       
   280 // -----------------------------------------------------------------------------
       
   281 //
       
   282 EXPORT_C HBufC8* CPEngNWSessionSlotID2::PackLC() const
       
   283     {
       
   284     return iImp->PackFullLC();
       
   285     }
       
   286 
       
   287 
       
   288 // -----------------------------------------------------------------------------
       
   289 // CPEngNWSessionSlotID2::UnPackL()
       
   290 // -----------------------------------------------------------------------------
       
   291 //
       
   292 EXPORT_C void CPEngNWSessionSlotID2::UnPackL( const TDesC8& aPack )
       
   293     {
       
   294     iImp->UnPackFullL( aPack );
       
   295     }
       
   296 
       
   297 
       
   298 
       
   299 // -----------------------------------------------------------------------------
       
   300 // CPEngNWSessionSlotID2::Implementation()
       
   301 // -----------------------------------------------------------------------------
       
   302 //
       
   303 CPEngNWSessionSlotID2Imp* CPEngNWSessionSlotID2::Implementation()
       
   304     {
       
   305     return iImp;
       
   306     }
       
   307 
       
   308 const CPEngNWSessionSlotID2Imp* CPEngNWSessionSlotID2::Implementation() const
       
   309     {
       
   310     return iImp;
       
   311     }
       
   312 
       
   313 
       
   314 // End of File
       
   315 
       
   316