@@ -373,64 +373,66 @@ ec_error_t notify_response::cvt_from_dbnotify(BOOL b_cache, const DB_NOTIFY &dbn
373373 auto &n = *this ;
374374
375375 switch (dbn.type ) {
376- case db_notify_type::new_mail:
376+ using enum db_notify_type;
377+ case new_mail:
377378 return cvt_new_mail (n, *static_cast <const DB_NOTIFY_NEW_MAIL *>(dbn.pdata ), b_cache);
378- case db_notify_type:: folder_created:
379+ case folder_created:
379380 return cvt_fld_created (n, *static_cast <const DB_NOTIFY_FOLDER_CREATED *>(dbn.pdata ));
380- case db_notify_type:: message_created:
381+ case message_created:
381382 return cvt_msg_created (n, *static_cast <const DB_NOTIFY_MESSAGE_CREATED *>(dbn.pdata ));
382- case db_notify_type:: link_created:
383+ case link_created:
383384 return cvt_link_created (n, *static_cast <const DB_NOTIFY_LINK_CREATED *>(dbn.pdata ));
384- case db_notify_type:: folder_deleted:
385+ case folder_deleted:
385386 return cvt_fld_deleted (n, *static_cast <const DB_NOTIFY_FOLDER_DELETED *>(dbn.pdata ));
386- case db_notify_type:: message_deleted:
387+ case message_deleted:
387388 return cvt_msg_deleted (n, *static_cast <const DB_NOTIFY_MESSAGE_DELETED *>(dbn.pdata ));
388- case db_notify_type:: link_deleted:
389+ case link_deleted:
389390 return cvt_link_deleted (n, *static_cast <const DB_NOTIFY_LINK_DELETED *>(dbn.pdata ));
390- case db_notify_type:: folder_modified:
391+ case folder_modified:
391392 return cvt_fld_modified (n, *static_cast <const DB_NOTIFY_FOLDER_MODIFIED *>(dbn.pdata ));
392- case db_notify_type:: message_modified:
393+ case message_modified:
393394 return cvt_msg_modified (n, *static_cast <const DB_NOTIFY_MESSAGE_MODIFIED *>(dbn.pdata ));
394- case db_notify_type:: folder_moved:
395- case db_notify_type:: folder_copied: {
396- auto nf = dbn.type == db_notify_type:: folder_moved ?
395+ case folder_moved:
396+ case folder_copied: {
397+ auto nf = dbn.type == folder_moved ?
397398 NF_OBJECT_MOVED : NF_OBJECT_COPIED;
398399 return cvt_fld_mvcp (n, nf, *static_cast <const DB_NOTIFY_FOLDER_MVCP *>(dbn.pdata ));
399400 }
400- case db_notify_type:: message_moved:
401- case db_notify_type:: message_copied: {
402- auto nf = dbn.type == db_notify_type:: message_moved ?
401+ case message_moved:
402+ case message_copied: {
403+ auto nf = dbn.type == message_moved ?
403404 NF_OBJECT_MOVED : NF_OBJECT_COPIED;
404405 return cvt_msg_mvcp (n, nf, *static_cast <const DB_NOTIFY_MESSAGE_MVCP *>(dbn.pdata ));
405406 }
406- case db_notify_type:: search_completed:
407+ case search_completed:
407408 return cvt_fld_search_completed (n, *static_cast <const DB_NOTIFY_SEARCH_COMPLETED *>(dbn.pdata ));
408- case db_notify_type:: hiertbl_changed:
409+ case hiertbl_changed:
409410 return cvt_hiertbl_changed (n);
410- case db_notify_type:: cttbl_changed:
411+ case cttbl_changed:
411412 return cvt_cttbl_changed (n);
412- case db_notify_type:: srchtbl_changed:
413+ case srchtbl_changed:
413414 return cvt_srchtbl_changed (n);
414- case db_notify_type:: hiertbl_row_added:
415+ case hiertbl_row_added:
415416 return cvt_hierrow_added (n, *static_cast <const DB_NOTIFY_HIERARCHY_TABLE_ROW_ADDED *>(dbn.pdata ));
416- case db_notify_type:: cttbl_row_added:
417+ case cttbl_row_added:
417418 return cvt_ctrow_added (n, *static_cast <const DB_NOTIFY_CONTENT_TABLE_ROW_ADDED *>(dbn.pdata ));
418- case db_notify_type:: srchtbl_row_added:
419+ case srchtbl_row_added:
419420 return cvt_srchrow_added (n, *static_cast <const DB_NOTIFY_CONTENT_TABLE_ROW_ADDED *>(dbn.pdata ));
420- case db_notify_type:: hiertbl_row_deleted:
421+ case hiertbl_row_deleted:
421422 return cvt_hierrow_deleted (n, *static_cast <const DB_NOTIFY_HIERARCHY_TABLE_ROW_DELETED *>(dbn.pdata ));
422- case db_notify_type:: cttbl_row_deleted:
423+ case cttbl_row_deleted:
423424 return cvt_ctrow_deleted (n, *static_cast <const DB_NOTIFY_CONTENT_TABLE_ROW_DELETED *>(dbn.pdata ));
424- case db_notify_type:: srchtbl_row_deleted:
425+ case srchtbl_row_deleted:
425426 return cvt_srchrow_deleted (n, *static_cast <const DB_NOTIFY_CONTENT_TABLE_ROW_DELETED *>(dbn.pdata ));
426- case db_notify_type:: hiertbl_row_modified:
427+ case hiertbl_row_modified:
427428 return cvt_hierrow_modified (n, *static_cast <const DB_NOTIFY_HIERARCHY_TABLE_ROW_MODIFIED *>(dbn.pdata ));
428- case db_notify_type:: cttbl_row_modified:
429+ case cttbl_row_modified:
429430 return cvt_ctrow_modified (n, *static_cast <const DB_NOTIFY_CONTENT_TABLE_ROW_MODIFIED *>(dbn.pdata ));
430- case db_notify_type:: srchtbl_row_modified:
431+ case srchtbl_row_modified:
431432 return cvt_srchrow_modified (n, *static_cast <const DB_NOTIFY_CONTENT_TABLE_ROW_MODIFIED *>(dbn.pdata ));
433+ default :
434+ return ecInvalidParam;
432435 }
433- return ecInvalidParam;
434436}
435437
436438void notify_response::ctrow_event_to_change ()
0 commit comments