BOOL P2PManager::EndP2P() { DoEnd(); End(); Uninit(); return TRUE; }
BOOL P2PManager::Disconnect() { DoEnd(); End(); Uninit(); return TRUE; }
DAPI_(HRESULT) JsonWriteObjectEnd( __in JSON_WRITER* pWriter ) { HRESULT hr = S_OK; hr = DoEnd(pWriter, JSON_TOKEN_OBJECT_END, L"}"); ExitOnFailure(hr, "Failed to end JSON object."); LExit: return hr; }
DAPI_(HRESULT) JsonWriteArrayEnd( __in JSON_WRITER* pWriter ) { HRESULT hr = S_OK; hr = DoEnd(pWriter, JSON_TOKEN_ARRAY_END, L"]"); ExitOnFailure(hr, "Failed to end JSON array."); LExit: return hr; }
/** @param aFinished Completion status of the update. This may be signalled synchronously on this call path or asynchronously on a different active object or thread. @pre There are no pending updates, otherwise the client must not use signalling. */ void CFbRenderStage::End(TRequestStatus* aFinished) { STD_ASSERT_DEBUG(!iRequestPending || !aFinished, EPluginPanicMultipleUpdateRequests); iRequestPending=ETrue; iUpstreamRequestStatus = aFinished; // If the client is using signalling and an update is in progress then // mark the operation as pending and return immediatley, otherwise // perform the operation immediatley. if (iUpstreamRequestStatus) *iUpstreamRequestStatus = KRequestPending; if (!aFinished || !iController->IsActive()) DoEnd(); }
void TDumpJob::Do(TCmdTransceiver &Tr, TErrList *pErr) { Tick(); switch (MainState) { case msReading: DoNotSaved(Tr, pErr); break; case msSaving: DoSaving(Tr, pErr); break; case msEnd: DoEnd(Tr, pErr); break; } Tick(); }
void CreateNassiBlockEnd::operator()(const wxChar /*ch*/)const { DoEnd(); }
void CreateNassiBlockEnd::operator() ( wxChar const * /*first*/, wxChar const * /*last*/ ) const { DoEnd(); }
// process the key void ProcessKey(EditView *ev, int key) { uint flags = GetKeyAttr(key); char MergeToPrior; // free xseek mode if (ev->cursor.xseekmode != CM_FREE) { switch(key) { // these need to maintain the state of the CM_WANT_SCREEN_COORD coordinate case B_UP_ARROW: case B_DOWN_ARROW: case B_PAGE_UP: case B_PAGE_DOWN: break; default: ev->cursor.set_mode(CM_FREE); } } // commands which delete selection & contents if a selection is present if (flags & KF_SELDEL) { if (ev->selection.present) { ev->SelDel(); if (flags & KF_SELDEL_ONLY) return; } } // create new undo group before executing keys which modify the document if (flags & KF_UNDOABLE) { if (flags & KF_UNDO_MERGEABLE) { MergeToPrior = undo_can_merge(ev, ev->cursor.x, ev->cursor.y, key); if (!MergeToPrior) BeginUndoGroup(ev); } else { MergeToPrior = 0; BeginUndoGroup(ev); } } if (flags & KF_AFFECTS_SELECTION) // key can create/remove selection { if (IsShiftDown() && !ev->selection.present) selection_create(ev); } switch(key) { case B_ESCAPE: if (editor.settings.esc_quits_immediately) // a testmode { MainWindow->fDoingInstantQuit = true; be_app->PostMessage(B_QUIT_REQUESTED); } break; case B_LEFT_ARROW: ev->cursor.left(); break; case B_RIGHT_ARROW: ev->cursor.right(); break; case B_UP_ARROW: ev->cursor.up(); break; case B_DOWN_ARROW: ev->cursor.down(); break; case B_PAGE_DOWN: ev->cursor.pgdn(); break; case B_PAGE_UP: ev->cursor.pgup(); break; case B_HOME: DoHome(ev); break; case B_END: DoEnd(ev); break; case KEY_MOUSEWHEEL_DOWN: ev->scroll_down(3); break; case KEY_MOUSEWHEEL_UP: ev->scroll_up(3); break; case B_ENTER: DoEnter(ev); editor.stats.CRs_typed++; editor.stats.keystrokes_typed++; break; case B_TAB: { if (IsShiftDown()) { DoShiftTab(ev); break; } if (DoTabIndent(ev)) break; ev->SelDel(); ev->action_insert_char(ev->cursor.x, ev->cursor.y, TAB); ev->cursor.x++; editor.stats.keystrokes_typed++; } break; // BKSP is equivalent to left followed by del case B_BACKSPACE: if (!ev->cursor.y && !ev->cursor.x) break; ev->cursor.left(); undo_SetMergeMode(ev, MERGE_BKSP, MergeToPrior); ev->action_delete_right(ev->cursor.x, ev->cursor.y, 1); editor.stats.keystrokes_typed++; break; case B_DELETE: undo_SetMergeMode(ev, MERGE_DEL, MergeToPrior); ev->action_delete_right(ev->cursor.x, ev->cursor.y, 1); editor.stats.keystrokes_typed++; break; // typing default: { // ignore non-printable keystrokes if (key > 127 || key < 9) break; if (editor.InOverwriteMode && \ ev->cursor.x < ev->curline->GetLength()) { // less than ideal: i wasn't planning on Overwrite Mode when writing // the undo feature, so it can't merge undo records that contain both a // delete and a insertion. OVR mode isn't used much and undo still works, // just one char at a time, so I think it's ok for now but eventually should // be looked at. if (MergeToPrior) { MergeToPrior = false; BeginUndoGroup(ev); } ev->action_delete_right(ev->cursor.x, ev->cursor.y, 1); } else { undo_SetMergeMode(ev, MERGE_TYPING, MergeToPrior); } ev->action_insert_char(ev->cursor.x, ev->cursor.y, key); ev->cursor.x++; editor.stats.keystrokes_typed++; } break; } // smart indent (for close quotes) if (key == '}' && editor.settings.smart_indent_on_close) CloseSmartIndent(ev); if (flags & KF_AFFECTS_SELECTION) ev->ExtendOrDropSel(key); if (flags & KF_UNDOABLE) { if (MergeToPrior) UpdateMergedUndoGroup(ev); else EndUndoGroup(ev); } if (!(flags & KF_NO_VIEW_TO_CURSOR)) { ev->MakeCursorVisible(); } }