void TContact::TreeItemContact_UpdateIconComposingStarted(ITreeItemChatLogEvents * pContactOrGroup) { Assert(pContactOrGroup != NULL); m_pAccount->m_arraypContactsComposing.AddUniqueF(this); if (pContactOrGroup->EGetRuntimeClass() == RTI(TGroup)) { ((TGroup *)pContactOrGroup)->Member_PFindOrAddContact_NZ(this)->TreeItemGroupMember_SetIconComposingStarted(); /* pContactOrGroup->TreeItemW_SetIcon(eMenuIconPencil_16x16); // Find the member to set its icon TGroupMember * pMember = ((TGroup *)pContactOrGroup)->Member_PFindOrAddContact_NZ(this); pMember->TreeItemW_SetIcon(eMenuIconPencil_10x10); */ } else { Assert(pContactOrGroup->EGetRuntimeClass() == RTI(TContact)); Assert(pContactOrGroup == this); TreeItemW_SetIconComposingText(); //TreeItemW_SetIcon(eMenuIcon_Pencil_10x10); // Use a smaller icon for a contact } /* // Update the icon for every alias IContactAlias * pAlias = m_plistAliases; while (pAlias != NULL) { pAlias->TreeItem_SetIcon(eMenuIconPencil); // This line needs to be fixed to handle special cases pAlias = pAlias->m_pNextAlias; } */ }
// Append the 'chat state' to the cursor void WChatLog::ChatLog_ChatStateTextAppend(INOUT OCursor & oTextCursor) { TContact ** ppContactStop; TContact ** ppContact = m_arraypContactsComposing.PrgpGetContactsStop(OUT &ppContactStop); if (ppContact == ppContactStop) { oTextCursor.removeSelectedText(); } else { if (g_poImageComposing == NULL) g_poImageComposing = new QImage(":/ico/Pencil"); while (TRUE) { oTextCursor.insertImage(*g_poImageComposing); TContact * pContact = *ppContact++; Assert(pContact != NULL); Assert(pContact->EGetRuntimeClass() == RTI(TContact)); g_strScratchBufferStatusBar.Format(d_szu_nbsp " <b>^s</b> is typing...", pContact->ChatLog_PszGetNickname()); oTextCursor.insertHtml(g_strScratchBufferStatusBar); if (ppContact == ppContactStop) break; } // while } if (m_pContactOrGroup->EGetRuntimeClass() == RTI(TContact)) ((TContact *)m_pContactOrGroup)->ChatLogContact_AppendExtraTextToChatState(INOUT oTextCursor); Widget_ScrollToEnd(INOUT this); } // ChatLog_ChatStateTextAppend()
void component_ref___swap(component_ref a, component_ref b) { const component_idx a_idx = RTI(a); const component_idx b_idx = RTI(b); RTI(a) = b_idx; ITR(b_idx) = a; RTI(b) = a_idx; ITR(a_idx) = b; }
void component_ref__dealloc_v(component_ref *refs, size_t count) { size_t i; for(i=0 ; i<count ; ++i) { component_idx srcidx = component_idx___prev(ASA.last_idx, count-i); component_idx dstidx = RTI(refs[i]); component_idx___copy(dstidx, srcidx); component_ref srcref = ITR(srcidx); RTI(srcref) = dstidx; ITR(dstidx) = srcref; } sl_fsb_give_indices16(&ASA.ref_to_idx_fsb, refs, count); ASA.last_idx = component_idx___prev(ASA.last_idx, count); }
TAccountCore::TAccountCore(TProfile * pProfileParent) { Assert(pProfileParent->EGetRuntimeClass() == RTI(TProfile)); m_pProfileParent = pProfileParent; m_uServerPort = 0; m_uFlagsAccountStatus = 0; }
// WLayoutChatLog::WLayout::Layout_NoticeDisplay() void WLayoutChatLog::Layout_NoticeDisplay(IN INotice * piwNotice) { Assert(piwNotice != NULL); Assert(piwNotice->EGetRuntimeClass() != RTI(Null)); // Make sure the vtable is still valid insertWidget(1, PA_CHILD piwNotice); // Insert the notice between the Chat Log and the Text Input. }
void TAccountXmpp::PresenceUpdateFromContextMenu(EMenuAction eMenuAction_Presence) { Assert(eMenuAction_Presence <= eMenuAction_PresenceLast); const UINT uFlagsAccountStatus = (m_uFlagsAccountStatus & ~FAS_kmStatusPresenceMask) | eMenuAction_Presence; if (uFlagsAccountStatus == m_uFlagsAccountStatus) return; m_uFlagsAccountStatus = uFlagsAccountStatus; // Update the presence if (m_paSocket != NULL && m_paSocket->Socket_FuIsReadyToSendMessages()) { switch (eMenuAction_Presence) { case eMenuAction_PresenceAccountOnline: case eMenuAction_PresenceAway: case eMenuAction_PresenceAwayExtended: case eMenuAction_PresenceBusy: m_paSocket->Socket_WriteXmlPresence(); break; default: m_paSocket->Socket_Disconnect(); TContact ** ppContactStop; TContact ** ppContact = m_arraypaContacts.PrgpGetContactsStop(OUT &ppContactStop); while (ppContact != ppContactStop) { TContact * pContact = *ppContact++; Assert(pContact != NULL); Assert(pContact->EGetRuntimeClass() == RTI(TContact)); Assert(pContact->m_pAccount == this); pContact->TreeItemContact_UpdateIconOffline(); } } // switch } // if TreeItemAccount_UpdateIcon(); // Update the icon according to the new presence } // PresenceUpdateFromContextMenu()
void ITreeItemChatLogEvents::TreeItemChatLog_IconUpdateOnNewMessageArrivedFromContact(PSZUC pszMessage, TContact * pContact, TGroupMember * pMember) { Assert(pContact != NULL); Assert(pContact->EGetRuntimeClass() == RTI(TContact)); if (pszMessage == NULL) return; Assert(pszMessage[0] != '\0'); if (m_pawLayoutChatLog == NULL || !m_pawLayoutChatLog->FGotFocus()) { m_cMessagesUnread++; // The layout does not have the focus (or does not exist), so display a special icon to indicate a new message arrived from the contact if (pMember != NULL) { Assert(pMember->m_pGroup == this); Assert(pMember->m_pContact == pContact); pMember->TreeItemW_SetTextToDisplayMessagesUnread(++pMember->m_cMessagesUnread); // The group member has unread messages as well as its parent group } #ifdef COMPILE_WITH_TOOLBAR Toolbar_TabAddWithoutSelecting(this); // If a contact or group has an unread message, then display it to the tab to draw attention #endif } TreeItemChatLog_UpdateTextAndIcon(); // Always update the text and icon when a new message arrives. This is important because before a message arrive, there is usually the 'composing' icon, and after the message arrives, this icon must be changed by either the online presence, or an icon indicating there is a new unread message. if (!m_pAccount->TreeItemW_FIsExpanded()) { // The account node is collapsed, therefore the contact is not visible in the GUI. // To let know the user there is a new message, the GUI displays the 'chat icon' to Tree Item of the account. m_pAccount->IconUpdate_MessageArrivedFromContact(pContact); } MainWindow_SystemTrayNewMessageArrived(pContact, pszMessage); }
// TAccountXmpp::IRuntimeObject::PGetRuntimeInterface() // // Enable the TAccountXmpp object to respond to the interface of other objects it is related to, such as TCertificate and TCertificateServerName POBJECT TAccountXmpp::PGetRuntimeInterface(const RTI_ENUM rti, IRuntimeObject * piParent) const { Report(piParent == NULL); switch (rti) { case RTI(TCertificate): return Certificate_PGet_YZ(); case RTI(TCertificateServerName): return Certificate_PGetServerName(); case RTI(TContact): // TODO: Without this line, there is a stack overvlow return NULL; default: return TAccountCore::PGetRuntimeInterface(rti, m_pProfileParent); } }
void component_ref___alloc_v(component_ref *refs, size_t count) { size_t left_to_allocate = count, tmp_l0 = LAST_IDX_L0(), tmp_l1 = LAST_IDX_L1(); while(left_to_allocate > ASA.soas[tmp_l0].col_count - tmp_l1) { size_t new_chunk = component___chunkfunc(ASA.soa_count); assert(new_chunk && "The chunk function returned 0 !"); ASA.ref_to_idx_lut = REALLOC(ASA.ref_to_idx_lut, (ASA.elem_count+new_chunk)*sizeof(ASA.ref_to_idx_lut[0])); ASA.idx_to_ref_lut = REALLOC(ASA.idx_to_ref_lut, (ASA.soa_count+1)*sizeof(ASA.idx_to_ref_lut[0])); ASA.idx_to_ref_lut[ASA.soa_count] = MALLOC(new_chunk*sizeof(ASA.idx_to_ref_lut[0][0])); ASA.soas = REALLOC(ASA.soas, (ASA.soa_count+1)*sizeof(ASA.soas[0])); ASA.soas[ASA.soa_count].row0 = MALLOC(new_chunk*sizeof(ASA.soas[0].row0[0])); ASA.soas[ASA.soa_count].row1 = MALLOC(new_chunk*sizeof(ASA.soas[0].row1[0])); ASA.soas[ASA.soa_count].col_count = new_chunk; ++(ASA.soa_count); ASA.elem_count += new_chunk; ++tmp_l0; tmp_l1 = 0; left_to_allocate = new_chunk<left_to_allocate ? left_to_allocate-new_chunk : 0; } sl_fsb_take_indices16(&ASA.ref_to_idx_fsb, refs, count); size_t i; for(i=0 ; i<count ; ++i) { RTI(refs[i]) = ASA.last_idx; ITR(ASA.last_idx) = refs[i]; ASA.last_idx = component_idx___next(ASA.last_idx, 1); } }
TBrowserTabs::TBrowserTabs(TProfile * pProfile) { Assert(pProfile != NULL); Assert(pProfile->EGetRuntimeClass() == RTI(TProfile)); m_pProfile = pProfile; m_pawLayoutBrowser = NULL; }
IContactAlias::IContactAlias(TContact * pContact) { Assert(pContact->EGetRuntimeClass() == RTI(TContact)); m_pContact = pContact; m_pNextAlias = pContact->m_plistAliases; pContact->m_plistAliases = this; // Add the alias to its parent contact }
// ITreeItem::IRuntimeObject::PGetRuntimeInterface() POBJECT ITreeItem::PGetRuntimeInterface(const RTI_ENUM rti, IRuntimeObject * piParent) const { if (rti == RTI(ITreeItem)) return (ITreeItem *)this; return IXmlExchangeObjectID::PGetRuntimeInterface(rti, piParent); }
void TAccountXmpp::RemoveAllReferencesToObjectsAboutBeingDeleted() { TContact ** ppContactStop; TContact ** ppContact = m_arraypaContacts.PrgpGetContactsStop(OUT &ppContactStop); while (ppContact != ppContactStop) { TContact * pContact = *ppContact++; pContact->Vault_RemoveAllReferencesToObjectsAboutBeingDeleted(); } TGroup ** ppGroupStop; TGroup ** ppGroup = m_arraypaGroups.PrgpGetGroupsStop(OUT &ppGroupStop); while (ppGroup != ppGroupStop) { TGroup * pGroup = *ppGroup++; Assert(pGroup != NULL); Assert(pGroup->EGetRuntimeClass() == RTI(TGroup)); Assert(pGroup->m_pAccount == this); pGroup->Group_RemoveAllReferencesToContactsAboutBeingDeleted(); } // m_arraypaGroups.RemoveAllUnserializableTreeItems(); // m_arraypaContacts.RemoveAllUnserializableTreeItems(); m_arraypContactsComposing.RemoveAllUnserializableTreeItems(); m_arraypContactsMessagesUnread.RemoveAllUnserializableTreeItems(); }
// Core routine to add a new event to the vault and send it to the contact(s). // Optionally this method may also send an 'Updater' event void CVaultEvents::EventAddAndDispatchToContacts(PA_CHILD IEvent * paEvent, PA_CHILD CEventUpdaterSent * paEventUpdater) { Assert(paEvent != NULL); Assert(paEvent->m_tsOther == d_ts_zNA); Assert(paEvent->m_pVaultParent_NZ == NULL); Assert(paEvent->Event_FIsEventTypeSent()); //MessageLog_AppendTextFormatSev(eSeverityWarningToErrorLog, "EventAddAndDispatchToContacts() - tsEventID $t\n", paEvent->m_tsEventID); if (paEventUpdater != NULL) { // Always include the Updater before the updated event paEventUpdater->m_pVaultParent_NZ = this; m_arraypaEvents.Add(PA_CHILD paEventUpdater); } paEvent->m_pVaultParent_NZ = this; m_arraypaEvents.Add(PA_CHILD paEvent); SetModified(); // Make sure the events are saved to disk if (paEvent->EGetEventClass() & eEventClass_kfNeverSerializeToXCP) return; // The event is never serialized to XOSP, therefore there is nothing else to do CBinXcpStanza binXcpStanza; // All events are sent as XMPP 'messages' so they may be cached TGroup * pGroup = (TGroup *)m_pParent; TContact * pContact = (TContact *)m_pParent; if (pContact->EGetRuntimeClass() == RTI(TContact)) { // Send the message to a contact MessageLog_AppendTextFormatCo(d_coGrayDark, "\t Sending message to $S\n\t\t m_tsEventIdLastSentCached $t, m_tsOtherLastSynchronized $t\n", &pContact->m_strJidBare, pContact->m_tsEventIdLastSentCached, pContact->m_tsOtherLastSynchronized); binXcpStanza.BinXmlAppendXcpApiCall_SendEventToContact(pContact, paEvent, paEventUpdater); } else { // Broadcast the message to every [active] group member Assert(pGroup->EGetRuntimeClass() == RTI(TGroup)); TGroupMember ** ppMemberStop; TGroupMember ** ppMember = pGroup->m_arraypaMembers.PrgpGetMembersStop(OUT &ppMemberStop); while (ppMember != ppMemberStop) { TGroupMember * pMember = *ppMember++; Assert(pMember != NULL); Assert(pMember->EGetRuntimeClass() == RTI(TGroupMember)); binXcpStanza.BinXmlAppendXcpApiCall_SendEventToContact(pMember->m_pContact, paEvent, paEventUpdater); } // while } // if...else m_pParent->m_tsEventIdLastSentCached = paEvent->m_tsEventID; } // EventAddAndDispatchToContacts()
void IEvent::_XmlUnserializeAttributeOfContactIdentifier(CHS chAttributeName, OUT TContact ** ppContact, const CXmlNode * pXmlNodeElement) const { Assert(ppContact != NULL); Assert(pXmlNodeElement != NULL); Assert(m_pVaultParent_NZ != NULL); Assert(m_pVaultParent_NZ->m_pParent->m_pAccount->EGetRuntimeClass() == RTI(TAccountXmpp)); *ppContact = m_pVaultParent_NZ->m_pParent->m_pAccount->Contact_PFindByIdentifierOrCreate_YZ(pXmlNodeElement, chAttributeName, NULL); }
// Append to the blob an XML attribute representing the Contact Identifier. // This method is used to serialize a pointer to a contact when saving to vault of event. // // IMPLEMENTATION NOTES // At the moment the Contact Identifier is the JID, however in the future it may be a hash of the contact's public key. // // SEE ALSO: Contact_PFindByIdentifierOrCreate_YZ(), CBin ^i void CBin::BinAppendXmlAttributeOfContactIdentifier(CHS chAttributeName, const TContact * pContact) { if (pContact != NULL) { Assert(pContact->EGetRuntimeClass() == RTI(TContact)); BinAppendXmlAttributeCStr(chAttributeName, pContact->m_strJidBare); } }
WLayoutChatLog::WLayoutChatLog(ITreeItemChatLogEvents * pContactOrGroupParent) { Assert(pContactOrGroupParent != NULL); m_pContactOrGroup_NZ = pContactOrGroupParent; m_pContactParent_YZ = (pContactOrGroupParent->EGetRuntimeClass() == RTI(TContact)) ? (TContact *)pContactOrGroupParent : NULL; m_pwFindText = NULL; m_tidChatStateComposing = d_zNA; #ifdef COMPILE_WITH_CHATLOG_HTML m_pwChatLog_NZ = new WChatLogHtml(this, pContactOrGroupParent); #else m_pwChatLog_NZ = new WChatLog(this, pContactOrGroupParent); #endif setStretchFactor(0, 5); /* if (pContactParent_YZ != NULL) { if (pContactParent_YZ->m_uFlagsContact & TContact::FC_kfContactNeedsInvitation) WidgetContactInvitation_Show(); if (pContactParent_YZ->m_uFlagsContact & TContact::FC_kfContactUnsolicited) Layout_NoticeAuxiliaryAdd(PA_DELETING new WNoticeContactUnsolicited(pContactParent_YZ)); } */ m_pwChatInput = new WChatInput(this); QWidget * pWidget = new QWidget(this); // pWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); OLayoutHorizontal * pLayoutMessageInput = new OLayoutHorizontal(pWidget); pLayoutMessageInput->setContentsMargins(0, 0, 5, 0); pLayoutMessageInput->addWidget(m_pwChatInput); OLayoutVertical * pLayoutButtons = new OLayoutVerticalAlignTop(pLayoutMessageInput); pLayoutButtons->setSpacing(0); m_pwButtonSendBitcoin = new WButtonIconForToolbar(eMenuIcon_Bitcoin, "Send Bitcoins"); pLayoutButtons->addWidget(m_pwButtonSendBitcoin); connect(m_pwButtonSendBitcoin, SIGNAL(clicked()), this, SLOT(SL_ButtonSendBitcoin())); WButtonIconForToolbar * pwButton = new WButtonIconForToolbar(eMenuIcon_FileUpload, "Send File\n\nYou may drag and drop the file, or copy & paste the file from Windows Explorer"); pLayoutButtons->addWidget(pwButton); connect(pwButton, SIGNAL(clicked()), this, SLOT(SL_ButtonSendFile())); pwButton = new WButtonIconForToolbar(eMenuIcon_ContactAdd, "Add people to the converstation"); pLayoutButtons->addWidget(pwButton); connect(pwButton, SIGNAL(clicked()), this, SLOT(SL_ButtonAddContacts())); pwButton = new WButtonIconForToolbar(eMenuIcon_Vote, "Send a ballot to the group to vote"); pLayoutButtons->addWidget(pwButton); connect(pwButton, SIGNAL(clicked()), this, SLOT(SL_ButtonSendBallot())); setChildrenCollapsible(false); // Do not allow the widget WChatInput() to collapse; it would be very confusing to the user // addWidget(PA_CHILD m_pwChatLog); //addWidget(PA_CHILD new WFindText(m_pwChatLog->document())); // addWidget(PA_CHILD m_pwChatInput); setAcceptDrops(true); }
main() { reset(); enable_interrupt(); while() { elegir_luz(); encender_luz(); } /***** rutina de interrupcion *****/ if (scan_inter () != 1) { if (shift_reg == FLAG) { switch (p_buffer) { case (0) : comienzo = 1; break; case (1) : if (comienzo==1) { p_buffer = 0; device = gchar(); if ( device == IDENTIFICATIVO) { acknowledge(); p_out = 0; wserial( gout () ); more = 1; } } break; default : if ( device == IDENTIFICATIVO ) { if (verificar() == NAK) no_acknowledge (); else { ack_nak = interpretar (); if ( ack_nak == ACK ) acknowledge (); else no_acknowledge (); } p_out = 0; wserial( gout () ); more = 1; } break; } p_buffer = 0; } else pchar(shift_reg); } else { if (more == 0) goto RTI; wserial( gout () ); if (shift_reg == 'f') { p_out = 1; more = 0; } } RTI (); }
void CArrayPtrContacts::ForEach_ChatLogResetNickNameAndRepopulateAllEvents() { TContact ** ppContactStop; TContact ** ppContact = PrgpGetContactsStop(OUT &ppContactStop); while (ppContact != ppContactStop) { TContact * pContact = *ppContact++; Assert(pContact->EGetRuntimeClass() == RTI(TContact)); pContact->m_uFlagsTreeItem |= TContact::FTI_kfChatLogEvents_RepopulateAll; pContact->ChatLog_ResetNickname(); } }
void TAccountXmpp::TreeItemAccount_DisplayWithinNavigationTree() { Endorse(g_pTreeItemInbox == NULL); // Display the account at the root of the Navigation Tree TreeItemW_DisplayWithinNavigationTree(g_pTreeItemInbox); TContact ** ppContactStop; TContact ** ppContact = m_arraypaContacts.PrgpGetContactsStop(OUT &ppContactStop); while (ppContact != ppContactStop) { TContact * pContact = *ppContact++; Assert(pContact != NULL); Assert(pContact->EGetRuntimeClass() == RTI(TContact)); Assert(pContact->m_pAccount == this); pContact->TreeItemContact_DisplayWithinNavigationTree(); } // while #ifdef WANT_TREE_NODE_NEW_CONTACT m_pTreeItemContactNew = new TContactNew(this); #endif TGroup ** ppGroupStop; TGroup ** ppGroup = m_arraypaGroups.PrgpGetGroupsStop(OUT &ppGroupStop); while (ppGroup != ppGroupStop) { TGroup * pGroup = *ppGroup++; Assert(pGroup != NULL); Assert(pGroup->EGetRuntimeClass() == RTI(TGroup)); Assert(pGroup->m_pAccount == this); if (pGroup->TreeItemGroup_FCanDisplayWithinNavigationTree()) pGroup->TreeItemGroup_DisplayWithinNavigationTree(); } TreeItemW_ExpandAccordingToSavedState(); TreeItemAccount_UpdateIcon(); #if FIX_THIS // Display the alias as well m_paAlias->TreeItem_DisplayWithinNavigationTree(m_pProfileParent, m_strJID, eMenuIconXmpp); #endif } // TreeItemAccount_DisplayWithinNavigationTree()
TAccountXmpp::~TAccountXmpp() { Assert(!g_arraypAccounts.FindElementF(this) && "The account should have been removed from the array before its deletion!"); delete m_paAlias; if (m_pCertificateServerName != NULL) { Assert(m_pCertificateServerName->EGetRuntimeClass() == RTI(TCertificateServerName)); (void)m_pCertificateServerName->m_arraypAccounts.RemoveElementFastAssertF(this); } m_arraypaGroups.DeleteAllTreeItems(); // Delete the groups first, as they have pointers to the contacts m_arraypaContacts.DeleteAllTreeItems(); if (m_paSocket != NULL) m_paSocket->Socket_Destroy(PA_DELETING); }
void TAccountXmpp::TreeItemAccount_UpdateIconOfAllContacts() { TContact ** ppContactStop; TContact ** ppContact = m_arraypaContacts.PrgpGetContactsStop(OUT &ppContactStop); while (ppContact != ppContactStop) { TContact * pContact = *ppContact++; Assert(pContact != NULL); Assert(pContact->EGetRuntimeClass() == RTI(TContact)); Assert(pContact->m_pAccount == this); pContact->TreeItemContact_UpdateIcon(); } }
void TContact::TreeItemContact_UpdateNameDisplayOfAliases() { IContactAlias * pAlias = m_plistAliases; while (pAlias != NULL) { pAlias->TreeItemW_UpdateText(); if (pAlias->EGetRuntimeClass() == RTI(TGroupMember)) { TGroupMember * pMember = (TGroupMember *)pAlias; pMember->m_pGroup->m_uFlagsTreeItem |= TContact::FTI_kfChatLogEvents_RepopulateAll; // Refresh the Chat Log of each group where the contact participates, so the new name is updated there. } pAlias = pAlias->m_pNextAlias; } }
void TProfile::TreeItemProfile_DisplayApplicationsWithinNavigationTree() { if (!m_arraypaAccountsXmpp.FIsEmpty()) new TMyRecommendations(this); // Dislay the recommendations if there is at least one account // new TTreeItemDemo(this, "My Reputation", eMenuIconReputation, "Display my reputation according to other organizations", "Search Reputation Feedback Comments"); IApplication ** ppApplicationStop; IApplication ** ppApplication = m_arraypaApplications.PrgpGetApplicationsStop(OUT &ppApplicationStop); while (ppApplication != ppApplicationStop) { IApplication * pApplication = *ppApplication++; pApplication->TreeItemApplication_DisplayWithinNavigationTree(); } TBrowser ** ppBrowserStop; TBrowser ** ppBrowser = m_arraypaBrowsers.PrgpGetBrowsersStop(OUT &ppBrowserStop); while (ppBrowser != ppBrowserStop) { TBrowser * pBrowser = *ppBrowser++; Assert(pBrowser->EGetRuntimeClass() == RTI(TBrowser)); pBrowser->TreeItemBrowser_DisplayWithinNavigationTree(); } TBrowserTabs ** ppBrowserTabsStop; TBrowserTabs ** ppBrowserTabs = m_arraypaBrowsersTabbed.PrgpGetBrowsersStop(&ppBrowserTabsStop); while(ppBrowserTabs != ppBrowserTabsStop) { TBrowserTabs * pBrowserTabs = *ppBrowserTabs++; Assert(pBrowserTabs->EGetRuntimeClass() == RTI(TBrowserTabs)); pBrowserTabs->TreeItemBrowser_DisplayWithinNavigationTree(); } TreeItemW_ExpandAccordingToSavedState(); }
void TContact::TreeItemContact_UpdateIconComposingStopped(ITreeItemChatLogEvents * pContactOrGroup) { // Do not remove the contact from m_pAccount->m_arraypContactsComposing if (pContactOrGroup->EGetRuntimeClass() == RTI(TGroup)) { // Find the member TGroupMember * pMember = ((TGroup *)pContactOrGroup)->Member_PFindOrAddContact_NZ(this); //pMember->TreeItem_IconUpdate(); pMember->TreeItemGroupMember_SetIconComposingStopped(); } else pContactOrGroup->m_uFlagsTreeItem &= ~FTI_keIcon_mComposingText; pContactOrGroup->TreeItem_IconUpdate(); }
void CEventBallotSent::CalculateStatistics(OUT SEventPollStatistics * pStatistics) { Assert(pStatistics != NULL); InitToZeroes(OUT pStatistics, sizeof(*pStatistics)); pStatistics->cSent = 1; // The ballot was sent to an indivdiual // To determine how many recipients received the ballot, we need to look at the vault. TGroup * pGroup = (TGroup *)m_pVaultParent_NZ->m_pParent; if (pGroup->EGetRuntimeClass() == RTI(TGroup)) { pStatistics->cSent = pGroup->m_arraypaMembers.GetSize(); // TODO: If a new group member was added or removed, the code should look at the timestamps the poll started to include only those at the time of the poll } pStatistics->cResponded = m_arraypaVotes.GetSize(); pStatistics->cPending = pStatistics->cSent - pStatistics->cResponded; }
PSZUC CArrayPtrContacts::PszFormatDisplayNames(OUT CStr * pstrScratchBuffer) const { pstrScratchBuffer->Empty(); TContact ** ppContactStop; TContact ** ppContact = PrgpGetContactsStop(OUT &ppContactStop); while (ppContact != ppContactStop) { TContact * pContact = *ppContact++; Assert(pContact->EGetRuntimeClass() == RTI(TContact)); if (!pstrScratchBuffer->FIsEmptyBinary()) pstrScratchBuffer->BinAppendText(", "); pstrScratchBuffer->BinAppendText((PSZAC)pContact->TreeItem_PszGetNameDisplay()); } return pstrScratchBuffer->BinAppendNullTerminatorSz(); }
IService * IService::S_PaAllocateService_YZ(TProfile * pProfileParent, RTI_ENUM rtiService) { Assert(pProfileParent != NULL); Assert(pProfileParent->EGetRuntimeClass() == RTI(TProfile)); switch (rtiService) { case RTI_SZ(CServiceBallotmaster): return new CServiceBallotmaster(pProfileParent); #ifdef DEBUG default: MessageLog_AppendTextFormatSev(eSeverityErrorWarning, "Unknown service '$U'\n", rtiService); #endif } return NULL; }
void TContact::TreeItemContact_DisplayWithinNavigationTree() { Assert(m_pAccount->EGetRuntimeClass() == RTI(TAccountXmpp)); #if 0 if (m_uFlagsTreeItem != 0) MessageLog_AppendTextFormatSev(eSeverityWarningToErrorLog, "0x$p: TreeItemContact_DisplayWithinNavigationTree($S) - m_uFlagsTreeItem = 0x$x\n", this, &m_strNameDisplayTyped, m_uFlagsTreeItem); #endif if (m_uFlagsTreeItem & FTI_kfObjectInvisible) return; // Don't display hidden contacts TreeItemW_DisplayWithinNavigationTree(m_pAccount); TreeItemChatLog_UpdateTextAndIcon(); if (!m_binXmlRecommendations.FIsEmptyBinary()) Contact_RecommendationsDisplayWithinNavigationTree(); }