equal
deleted
inserted
replaced
17 |
17 |
18 |
18 |
19 // INCLUDE FILES |
19 // INCLUDE FILES |
20 #include "HtiPIMServicePlugin.h" |
20 #include "HtiPIMServicePlugin.h" |
21 #include "PIMHandler.h" |
21 #include "PIMHandler.h" |
|
22 |
|
23 #if ( SYMBIAN_VERSION_SUPPORT < SYMBIAN_4 ) |
22 #include "HtiBookmarkHandler.h" |
24 #include "HtiBookmarkHandler.h" |
|
25 #endif |
|
26 |
23 #include "HtiSimDirHandler.h" |
27 #include "HtiSimDirHandler.h" |
24 #include <HtiDispatcherInterface.h> |
28 #include <HtiDispatcherInterface.h> |
25 #include <HtiLogging.h> |
29 #include <HtiLogging.h> |
26 |
30 |
27 // CONSTANTS |
31 // CONSTANTS |
28 _LIT8( KErrorMissingCommand, "Missing command" ); |
32 _LIT8( KErrorMissingCommand, "Missing command" ); |
29 |
33 _LIT8( KErrorUnrecognizedCommand, "Unrecognized command" ); |
30 // ---------------------------------------------------------------------------- |
34 // ---------------------------------------------------------------------------- |
31 // Create instance of concrete ECOM interface implementation |
35 // Create instance of concrete ECOM interface implementation |
32 CHtiPIMServicePlugin* CHtiPIMServicePlugin::NewL() |
36 CHtiPIMServicePlugin* CHtiPIMServicePlugin::NewL() |
33 { |
37 { |
34 CHtiPIMServicePlugin* self = new (ELeave) CHtiPIMServicePlugin; |
38 CHtiPIMServicePlugin* self = new (ELeave) CHtiPIMServicePlugin; |
46 // ---------------------------------------------------------------------------- |
50 // ---------------------------------------------------------------------------- |
47 CHtiPIMServicePlugin::~CHtiPIMServicePlugin() |
51 CHtiPIMServicePlugin::~CHtiPIMServicePlugin() |
48 { |
52 { |
49 HTI_LOG_TEXT("CHtiPIMServicePlugin destroy"); |
53 HTI_LOG_TEXT("CHtiPIMServicePlugin destroy"); |
50 delete iPimHandler; |
54 delete iPimHandler; |
|
55 #if ( SYMBIAN_VERSION_SUPPORT < SYMBIAN_4 ) |
51 delete iBookmarkHandler; |
56 delete iBookmarkHandler; |
|
57 #endif |
52 delete iSimDirHandler; |
58 delete iSimDirHandler; |
53 } |
59 } |
54 |
60 |
55 // ---------------------------------------------------------------------------- |
61 // ---------------------------------------------------------------------------- |
56 void CHtiPIMServicePlugin::ConstructL() |
62 void CHtiPIMServicePlugin::ConstructL() |
89 iSimDirHandler = CHtiSimDirHandler::NewL(); |
95 iSimDirHandler = CHtiSimDirHandler::NewL(); |
90 iSimDirHandler->SetDispatcher( iDispatcher ); |
96 iSimDirHandler->SetDispatcher( iDispatcher ); |
91 } |
97 } |
92 iSimDirHandler->ProcessMessageL( aMessage, aPriority ); |
98 iSimDirHandler->ProcessMessageL( aMessage, aPriority ); |
93 } |
99 } |
94 else |
100 #if ( SYMBIAN_VERSION_SUPPORT < SYMBIAN_4 ) |
|
101 else if ( aCommand <= EDeleteBookmark) |
95 { |
102 { |
96 if ( iBookmarkHandler == NULL ) |
103 if ( iBookmarkHandler == NULL ) |
97 { |
104 { |
98 iBookmarkHandler = CHtiBookmarkHandler::NewL(); |
105 iBookmarkHandler = CHtiBookmarkHandler::NewL(); |
99 iBookmarkHandler->SetDispatcher( iDispatcher ); |
106 iBookmarkHandler->SetDispatcher( iDispatcher ); |
100 } |
107 } |
101 iBookmarkHandler->ProcessMessageL( aMessage, aPriority ); |
108 iBookmarkHandler->ProcessMessageL( aMessage, aPriority ); |
|
109 } |
|
110 #endif |
|
111 else |
|
112 { |
|
113 User::LeaveIfError( iDispatcher->DispatchOutgoingErrorMessage( |
|
114 KErrArgument, KErrorUnrecognizedCommand, KPIMServiceUid ) ); |
102 } |
115 } |
103 |
116 |
104 HTI_LOG_FUNC_OUT( "CHtiPIMServicePlugin::ProcessMessageL" ); |
117 HTI_LOG_FUNC_OUT( "CHtiPIMServicePlugin::ProcessMessageL" ); |
105 } |
118 } |
106 |
119 |
110 { |
123 { |
111 if ( iPimHandler ) |
124 if ( iPimHandler ) |
112 { |
125 { |
113 return iPimHandler->IsBusy(); |
126 return iPimHandler->IsBusy(); |
114 } |
127 } |
115 |
128 |
|
129 #if ( SYMBIAN_VERSION_SUPPORT < SYMBIAN_4 ) |
116 if ( iBookmarkHandler ) |
130 if ( iBookmarkHandler ) |
117 { |
131 { |
118 return iBookmarkHandler->IsBusy(); |
132 return iBookmarkHandler->IsBusy(); |
119 } |
133 } |
|
134 #endif |
120 |
135 |
121 if( iSimDirHandler) |
136 if( iSimDirHandler) |
122 { |
137 { |
123 return iSimDirHandler->IsBusy(); |
138 return iSimDirHandler->IsBusy(); |
124 } |
139 } |