equal
deleted
inserted
replaced
86 TMsvEntry tEntry; |
86 TMsvEntry tEntry; |
87 TMsvId service; |
87 TMsvId service; |
88 |
88 |
89 TInt err = iSession.GetEntry( aMailboxId.Id(), service, tEntry ); |
89 TInt err = iSession.GetEntry( aMailboxId.Id(), service, tEntry ); |
90 |
90 |
91 if ( err != KErrNone || iOperationsRef.Count() == 0 ) |
91 if ( err != KErrNone ) |
92 { |
92 { |
93 return Idle; |
93 return Idle; |
94 } |
94 } |
95 |
95 |
96 // If the mailbox is not online but it has some connection operation |
|
97 // already running, it means that it will be synchronized when the mailbox |
|
98 // goes online. So we need to check is there any connection operation |
|
99 // ongoing and return StartingSync in that case. |
|
100 if( !tEntry.Connected() ) |
|
101 { |
|
102 if( ConnOpRunning( aMailboxId ) ) |
|
103 { |
|
104 // Some connection operation already processing, so the sync |
|
105 // will start soon |
|
106 return StartingSync; |
|
107 } |
|
108 else |
|
109 { |
|
110 // no sync ongoing if not connected and no connection operations |
|
111 // started |
|
112 return Idle; |
|
113 } |
|
114 } |
|
115 |
|
116 #ifndef RD_101_EMAIL |
|
117 // <cmail> RD_IPS_AO_PLUGIN flaf removed |
|
118 RAlwaysOnlineClientSession aosession; |
96 RAlwaysOnlineClientSession aosession; |
119 |
97 |
120 err = aosession.Connect(); |
98 err = aosession.Connect(); |
121 if ( err == KErrNone ) |
99 if ( err == KErrNone ) |
122 { |
100 { |
128 EServerAPIEmailQueryState, idBuf, statusBuf ); |
106 EServerAPIEmailQueryState, idBuf, statusBuf ); |
129 status = statusBuf(); |
107 status = statusBuf(); |
130 if ( error == KErrNone && |
108 if ( error == KErrNone && |
131 status == EIpsAOPluginStatusSyncStarted ) |
109 status == EIpsAOPluginStatusSyncStarted ) |
132 { |
110 { |
|
111 aosession.Close(); |
133 return EmailSyncing; |
112 return EmailSyncing; |
134 } |
113 } |
135 } |
114 } |
136 aosession.Close(); |
115 aosession.Close(); |
137 #endif |
116 |
|
117 // If the mailbox is not online but it has some connection operation |
|
118 // already running, it means that it will be synchronized when the mailbox |
|
119 // goes online. So we need to check is there any connection operation |
|
120 // ongoing and return StartingSync in that case. |
|
121 if( !tEntry.Connected() ) |
|
122 { |
|
123 if( ConnOpRunning( aMailboxId ) ) |
|
124 { |
|
125 // Some connection operation already processing, so the sync |
|
126 // will start soon |
|
127 return StartingSync; |
|
128 } |
|
129 else |
|
130 { |
|
131 // no sync ongoing if not connected and no connection operations |
|
132 // started |
|
133 return Idle; |
|
134 } |
|
135 } |
|
136 |
|
137 //#ifndef RD_101_EMAIL |
|
138 // <cmail> RD_IPS_AO_PLUGIN flaf removed |
|
139 |
|
140 //#endif |
138 |
141 |
139 // </cmail> |
142 // </cmail> |
140 |
143 |
141 // found correct operation |
144 // found correct operation |
142 for ( TInt i = 0; i < iOperationsRef.Count(); i++ ) |
145 for ( TInt i = 0; i < iOperationsRef.Count(); i++ ) |