equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2005-2006 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: Inline function implementations for aicontentobserver.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 inline TInt MAiContentObserver::PublishPtr |
|
20 (MAiPropertyExtension& aPlugin, TInt aContent, TAny* aPtr, TInt aIndex) |
|
21 { |
|
22 // Package the pointer to a buffer and delegate to buffer publish method |
|
23 return this->Publish(aPlugin, aContent, TPckgC<TAny*>(aPtr), aIndex); |
|
24 } |
|
25 |
|
26 template<class PtrT> inline |
|
27 PtrT* MAiContentObserver::UnpackPtr(const TDesC8& aBuf) |
|
28 { |
|
29 TAny* result = NULL; |
|
30 if ( aBuf.Size() == sizeof( TAny* ) ) |
|
31 { |
|
32 TPckg<TAny*>(result).Copy(aBuf); // Effectively writes aBuf contents to result |
|
33 } |
|
34 return static_cast<PtrT*>(result); |
|
35 } |
|
36 |
|
37 // End of file |