1 /* |
|
2 * Copyright (c) 2004-2005 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: Image storing and loading interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHCLTIMAGEHANDLER_H |
|
20 #define CPHCLTIMAGEHANDLER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "cphcltimageparams.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class RPhCltServer; |
|
27 class CPhCltImageParams; |
|
28 class RFile; |
|
29 |
|
30 /** |
|
31 * Interface for image saving callback. |
|
32 */ |
|
33 class MPhCltImageObserver |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Callback for image saving. |
|
38 * @param aResult KErrNone if image saving succeeded, or a Symbian OS |
|
39 * error code in failure. |
|
40 */ |
|
41 virtual void HandleImageSaveCompleteL( TInt aResult ) = 0; |
|
42 }; |
|
43 |
|
44 /** |
|
45 * Interface used in image storing to PhoneServer. |
|
46 * |
|
47 * @lib PhoneClient.lib |
|
48 * @since S60 v3.2 |
|
49 */ |
|
50 class CPhCltImageHandler : public CBase |
|
51 { |
|
52 |
|
53 public: // Constructors |
|
54 /** |
|
55 * Two-phased constructor. |
|
56 */ |
|
57 IMPORT_C static CPhCltImageHandler* NewL(); |
|
58 |
|
59 public: // New functions |
|
60 |
|
61 /** |
|
62 * Save image(s) |
|
63 * @param aParam parameters passed |
|
64 * @return KErrNone if successful, Symbian error code otherwise. |
|
65 * NOTE: can be used to delete operator logos, |
|
66 * @see CPhCltExtOperatorLogoParams::SetCodesL |
|
67 * @see CPhCltExtOperatorLogoParams::AddImageL |
|
68 */ |
|
69 virtual TInt SaveImages( CPhCltImageParams& aParams ) = 0; |
|
70 |
|
71 /** |
|
72 * Load image(s) |
|
73 * @param aParam parameters in return passed |
|
74 * @return KErrNone if successful, Symbian error code otherwise. |
|
75 */ |
|
76 virtual TInt LoadImages( CPhCltImageParams*& aParams ) = 0; |
|
77 |
|
78 /** |
|
79 * Creates image parameter class. |
|
80 * @param aType type of the implementation class. |
|
81 * @return CPhCltBaseImageParams implementation class. |
|
82 * NULL if not supported. |
|
83 * Ownership transferred. |
|
84 */ |
|
85 IMPORT_C virtual CPhCltImageParams* |
|
86 CPhCltBaseImageParamsL( const TPhCltImageType aType ) = 0; |
|
87 |
|
88 |
|
89 /** |
|
90 * Saves user defined video call still image file. This makes copy |
|
91 * of original file to secure place. |
|
92 * @param aObserver callback for notifying result of the operation |
|
93 * @param aImagePath full path to image to be saved |
|
94 * @since S60 v5.0 |
|
95 */ |
|
96 virtual void SaveVtImageL( MPhCltImageObserver& aObserver, |
|
97 const TDesC& aImagePath ) = 0; |
|
98 |
|
99 /** |
|
100 * Cancels pending image saving. This may be no-op from saving point |
|
101 * of view (image is actually saved) but resets internal state to such |
|
102 * that no operation is pending. |
|
103 * @since S60 v5.0 |
|
104 */ |
|
105 virtual void CancelSaveVtImage() = 0; |
|
106 |
|
107 /** |
|
108 * Opens user defined video call still image file. |
|
109 * @param aFile file handle that shall to point to image file |
|
110 * Client should close the file after use. |
|
111 * @return KErrNone if successful, Symbian error code otherwise. |
|
112 * @since S60 v5.0 |
|
113 */ |
|
114 virtual TInt OpenVtImage( RFile& aFile ) = 0; |
|
115 |
|
116 /** |
|
117 * Opens predefined (read-only) video call still image file. |
|
118 * @param aFile file handle that shall point to image file. |
|
119 * Client should close the file after use. |
|
120 * @return KErrNone if successful, Symbian error code otherwise. |
|
121 * @since S60 v5.0 |
|
122 */ |
|
123 virtual TInt OpenDefaultVtImage( RFile& aFile ) = 0; |
|
124 |
|
125 protected: |
|
126 |
|
127 /** |
|
128 * C++ constructor. |
|
129 */ |
|
130 CPhCltImageHandler(); |
|
131 }; |
|
132 |
|
133 |
|
134 #endif // CPHCLTIMAGEHANDLER_H |
|
135 |
|
136 // End of File |
|