本文整理汇总了C++中LPIDENT::fIsServer方法的典型用法代码示例。如果您正苦于以下问题:C++ LPIDENT::fIsServer方法的具体用法?C++ LPIDENT::fIsServer怎么用?C++ LPIDENT::fIsServer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPIDENT
的用法示例。
在下文中一共展示了LPIDENT::fIsServer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Alert_GetDescription
LPTSTR Alert_GetDescription (LPIDENT lpi, size_t iAlert, BOOL fFull)
{
LPOBJECTALERTS lpoa;
if ((lpoa = Alert_GetObjectAlerts (lpi)) == NULL)
return NULL;
if (!lpoa->nAlerts && lpi->fIsServer())
{
LPSERVER_PREF lpsp;
if ((lpsp = (LPSERVER_PREF)lpi->GetUserParam()) != NULL)
{
if (!lpsp->fIsMonitored)
{
TCHAR szName[ cchNAME ];
lpi->GetServerName (szName);
return FormatString (IDS_ALERT_DESCSHORT_UNMONITORED, TEXT("%s"), szName);
}
}
}
if (iAlert >= lpoa->nAlerts)
return NULL;
if (lpoa->aAlerts[ iAlert ].alert == alertSECONDARY)
{
return Alert_GetDescriptionFunc (lpoa->aAlerts[ iAlert ].aiSECONDARY.lpiSecondary,
lpoa->aAlerts[ iAlert ].aiSECONDARY.iSecondary,
lpi,
fFull);
}
return Alert_GetDescriptionFunc (lpi, iAlert, NULL, fFull);
}
示例2: Server_SyncVLDB_OnInitDialog
void Server_SyncVLDB_OnInitDialog (HWND hDlg, LPIDENT lpi)
{
if (lpi->fIsServer())
{
TCHAR szServer[ cchNAME ];
lpi->GetServerName (szServer);
LPTSTR pszText = FormatString (IDS_SYNCVLDB_SVR_DESC, TEXT("%s"), szServer);
SetDlgItemText (hDlg, IDC_SYNC_DESC, pszText);
FreeString (pszText);
pszText = FormatString (IDS_SYNCVLDB_SVR_DESC2, TEXT("%s"), szServer);
SetDlgItemText (hDlg, IDC_SYNC_DESC2, pszText);
FreeString (pszText);
ShowWindow (hDlg, SW_SHOW);
}
else // (lpi->fIsAggregate())
{
TCHAR szServer[ cchNAME ];
lpi->GetServerName (szServer);
TCHAR szAggregate[ cchNAME ];
lpi->GetAggregateName (szAggregate);
LPTSTR pszText = FormatString (IDS_SYNCVLDB_AGG_DESC, TEXT("%s%s"), szServer, szAggregate);
SetDlgItemText (hDlg, IDC_SYNC_DESC, pszText);
FreeString (pszText);
pszText = FormatString (IDS_SYNCVLDB_AGG_DESC2, TEXT("%s%s"), szServer, szAggregate);
SetDlgItemText (hDlg, IDC_SYNC_DESC2, pszText);
FreeString (pszText);
StartTask (taskAGG_FIND_GHOST, hDlg, lpi);
}
}
示例3: Aggregates_ShowPopupMenu
void Aggregates_ShowPopupMenu (HWND hList, POINT ptList, POINT ptScreen)
{
if (!ptScreen.x && !ptScreen.y)
{
RECT rWindow;
GetWindowRect (hList, &rWindow);
ptScreen.x = rWindow.left + (rWindow.right -rWindow.left)/2;
ptScreen.y = rWindow.top + (rWindow.bottom -rWindow.top)/2;
Aggregates_ShowParticularPopupMenu (hList, ptScreen, NULL);
}
else if (FL_HitTestForHeaderBar (hList, ptList))
{
HMENU hm = TaLocale_LoadMenu (MENU_COLUMNS);
DisplayContextMenu (hm, ptScreen, hList);
}
else
{
LPIDENT lpiSelected = NULL;
HLISTITEM hItem;
if ((hItem = FastList_ItemFromPoint (hList, &ptList, TRUE)) != NULL)
lpiSelected = (LPIDENT)FastList_GetItemParam (hList, hItem);
if (lpiSelected && (lpiSelected != (LPIDENT)FL_GetSelectedData (hList)))
lpiSelected = NULL;
if (lpiSelected && lpiSelected->fIsServer())
Server_ShowParticularPopupMenu (hList, ptScreen, lpiSelected);
else
Aggregates_ShowParticularPopupMenu (hList, ptScreen, lpiSelected);
}
}
示例4: Alert_BeginUpdate
void Alert_BeginUpdate (LPIDENT lpi, LPSERVER *ppServer)
{
if (lpi->fIsServer())
{
*ppServer = NULL;
}
else
{
*ppServer = lpi->OpenServer();
}
}
示例5: Server_Salvage_OnServer
void Server_Salvage_OnServer (HWND hDlg, LPIDENT lpi)
{
LPIDENT lpiServer;
if ((lpiServer = (LPIDENT)CB_GetSelectedData (GetDlgItem (hDlg, IDC_SERVER))) != NULL)
{
LPAGG_ENUM_TO_COMBOBOX_PACKET lpp = New (AGG_ENUM_TO_COMBOBOX_PACKET);
memset (lpp, 0x00, sizeof(AGG_ENUM_TO_COMBOBOX_PACKET));
lpp->hCombo = GetDlgItem (hDlg, IDC_AGGREGATE);
lpp->lpiServer = lpiServer;
lpp->lpiSelect = (lpi && (!lpi->fIsCell()) && (!lpi->fIsServer()) && (lpiServer == lpi->GetServer())) ? (lpi->GetAggregate()) : NULL;
StartTask (taskAGG_ENUM_TO_COMBOBOX, hDlg, lpp);
}
}
示例6: Filesets_ContinueDrag
void Filesets_ContinueDrag (HWND hDlg)
{
if (l.fDragging)
{
LPIDENT lpi = NULL;
HLISTITEM hItemTarget;
DWORD dw = GetMessagePos();
POINT pt = { LOWORD(dw), HIWORD(dw) };
HWND hTarget = WindowFromPoint (pt);
if (hTarget != NULL)
{
POINT ptClient = pt;
ScreenToClient (hTarget, &ptClient);
if ((lpi = IdentifyPoint (hTarget, ptClient, &hItemTarget)) != NULL)
{
if (!lpi->fIsServer() && !lpi->fIsAggregate())
lpi = NULL;
}
}
if (lpi != l.lpiTarget)
{
ImageList_DragLeave (NULL);
if (l.hItemTarget)
{
LPARAM dwFlags = FastList_GetItemFlags (l.hwndTarget, l.hItemTarget);
FastList_SetItemFlags (l.hwndTarget, l.hItemTarget, dwFlags & (~FLIF_DROPHIGHLIGHT));
l.hItemTarget = NULL;
l.lpiTarget = NULL;
}
if ((l.lpiTarget = lpi) != NULL)
{
l.hwndTarget = hTarget;
l.hItemTarget = hItemTarget;
LPARAM dwFlags = FastList_GetItemFlags (l.hwndTarget, l.hItemTarget);
FastList_SetItemFlags (l.hwndTarget, l.hItemTarget, dwFlags | FLIF_DROPHIGHLIGHT);
}
ScreenToClient (NULL, &pt);
ImageList_DragEnter (NULL, pt.x, pt.y);
}
ImageList_DragMove (LOWORD(dw), HIWORD(dw));
}
}
示例7: Server_Salvage_Results_OnInitDialog
void Server_Salvage_Results_OnInitDialog (HWND hDlg, LPIDENT lpiSalvage)
{
TCHAR szServer[ cchNAME ];
lpiSalvage->GetServerName (szServer);
TCHAR szAggregate[ cchNAME ];
if (!lpiSalvage->fIsServer())
lpiSalvage->GetAggregateName (szAggregate);
TCHAR szFileset[ cchNAME ];
if (lpiSalvage->fIsFileset())
lpiSalvage->GetFilesetName (szFileset);
LPTSTR pszTitle;
if (lpiSalvage->fIsServer())
pszTitle = FormatString (IDS_SALVAGE_SVR, TEXT("%s"), szServer);
else if (lpiSalvage->fIsAggregate())
pszTitle = FormatString (IDS_SALVAGE_AGG, TEXT("%s%s"), szServer, szAggregate);
else // (lpiSalvage->fIsFileset())
pszTitle = FormatString (IDS_SALVAGE_SET, TEXT("%s%s%s"), szServer, szAggregate, szFileset);
SetDlgItemText (hDlg, IDC_SALVAGE_TITLE, pszTitle);
FreeString (pszTitle);
}
示例8: Alert_GetQuickDescription
LPTSTR Alert_GetQuickDescription (LPIDENT lpi)
{
LPTSTR pszStatus = NULL;
size_t cAlerts;
if ((cAlerts = Alert_GetCount (lpi)) <= 1)
pszStatus = Alert_GetDescription (lpi, 0, FALSE);
else if (lpi->fIsServer())
pszStatus = FormatString (IDS_SERVER_MULTIPLE_PROBLEMS, TEXT("%lu"), cAlerts);
else if (lpi->fIsService())
pszStatus = FormatString (IDS_SERVICE_MULTIPLE_PROBLEMS, TEXT("%lu"), cAlerts);
else if (lpi->fIsAggregate())
pszStatus = FormatString (IDS_AGGREGATE_MULTIPLE_PROBLEMS, TEXT("%lu"), cAlerts);
else if (lpi->fIsFileset())
pszStatus = FormatString (IDS_FILESET_MULTIPLE_PROBLEMS, TEXT("%lu"), cAlerts);
return pszStatus;
}
示例9: Server_Salvage_OnEndTask_EnumServers
void Server_Salvage_OnEndTask_EnumServers (HWND hDlg, LPIDENT lpi, LPTASKPACKET ptp)
{
// We'll only fill the Servers list once, and that during initialization.
// When the filling completes, find out what server is currently selected
// (it should already be the one the user chose earlier), and fill the
// aggregates list for it. We won't enable anything yet.
//
LPIDENT lpiServer;
if ((lpiServer = (LPIDENT)CB_GetSelectedData (GetDlgItem (hDlg, IDC_SERVER))) != NULL)
{
LPAGG_ENUM_TO_COMBOBOX_PACKET lpp = New (AGG_ENUM_TO_COMBOBOX_PACKET);
memset (lpp, 0x00, sizeof(AGG_ENUM_TO_COMBOBOX_PACKET));
lpp->hCombo = GetDlgItem (hDlg, IDC_AGGREGATE);
lpp->lpiServer = lpiServer;
lpp->lpiSelect = (lpi && (!lpi->fIsCell()) && (!lpi->fIsServer()) && (lpiServer == lpi->GetServer())) ? (lpi->GetAggregate()) : NULL;
StartTask (taskAGG_ENUM_TO_COMBOBOX, hDlg, lpp);
}
}
示例10: Filesets_ShowPopupMenu
void Filesets_ShowPopupMenu (HWND hList, POINT ptList, POINT ptScreen)
{
if (!ptScreen.x && !ptScreen.y)
{
RECT rWindow;
GetWindowRect (hList, &rWindow);
ptScreen.x = rWindow.left + (rWindow.right -rWindow.left)/2;
ptScreen.y = rWindow.top + (rWindow.bottom -rWindow.top)/2;
Filesets_ShowParticularPopupMenu (hList, ptScreen, NULL);
}
else if (FL_HitTestForHeaderBar (hList, ptList))
{
HMENU hm = TaLocale_LoadMenu (MENU_COLUMNS);
DisplayContextMenu (hm, ptScreen, hList);
}
else
{
LPIDENT lpi = Filesets_GetFocused (GetParent (hList), &ptList);
if (lpi && (lpi != Filesets_GetSelected (GetParent (hList))))
{
lpi = NULL; // right-click on item other than highlighted one?
}
if (lpi && lpi->fIsFileset())
{
Filesets_ShowParticularPopupMenu (hList, ptScreen, lpi);
}
else if (lpi && lpi->fIsAggregate())
{
Aggregates_ShowParticularPopupMenu (hList, ptScreen, lpi);
}
else if (lpi && lpi->fIsServer())
{
Server_ShowParticularPopupMenu (hList, ptScreen, lpi);
}
else if (!lpi) // display the _NONE menu? (no menu if it's a cell ident)
{
Filesets_ShowParticularPopupMenu (hList, ptScreen, lpi);
}
}
}
示例11: Server_Salvage_OnInitDialog
void Server_Salvage_OnInitDialog (HWND hDlg, LPIDENT lpi)
{
CheckDlgButton (hDlg, IDC_AGGREGATE_ALL, (lpi->fIsServer()) ? TRUE : FALSE);
CheckDlgButton (hDlg, IDC_FILESET_ALL, (lpi->fIsFileset()) ? FALSE : TRUE);
EnableWindow (GetDlgItem (hDlg, IDC_SERVER), FALSE);
EnableWindow (GetDlgItem (hDlg, IDC_AGGREGATE), FALSE);
EnableWindow (GetDlgItem (hDlg, IDC_AGGREGATE_ALL), FALSE);
EnableWindow (GetDlgItem (hDlg, IDC_FILESET), FALSE);
EnableWindow (GetDlgItem (hDlg, IDC_FILESET_ALL), FALSE);
EnableWindow (GetDlgItem (hDlg, IDOK), FALSE);
LPSVR_ENUM_TO_COMBOBOX_PACKET lpp = New (SVR_ENUM_TO_COMBOBOX_PACKET);
memset (lpp, 0x00, sizeof(SVR_ENUM_TO_COMBOBOX_PACKET));
lpp->hCombo = GetDlgItem (hDlg, IDC_SERVER);
lpp->lpiSelect = lpi->GetServer();
StartTask (taskSVR_ENUM_TO_COMBOBOX, hDlg, lpp);
CheckDlgButton (hDlg, IDC_SALVAGE_SIMUL, TRUE);
CreateSpinner (GetDlgItem(hDlg,IDC_SALVAGE_NUM), 10, FALSE, 2, 4, 12);
}
示例12: Alert_GetObjectAlerts
LPOBJECTALERTS Alert_GetObjectAlerts (LPIDENT lpi, BOOL fAlwaysServer, ULONG *pStatus)
{
LPOBJECTALERTS lpoa = NULL;
if (fAlwaysServer || lpi->fIsServer())
{
LPSERVER_PREF lpsp;
if ((lpsp = (LPSERVER_PREF)lpi->GetServer()->GetUserParam()) != NULL)
{
lpoa = &lpsp->oa;
}
}
else if (lpi->fIsService())
{
LPSERVICE_PREF lpsp;
if ((lpsp = (LPSERVICE_PREF)lpi->GetUserParam()) != NULL)
{
lpoa = &lpsp->oa;
}
}
else if (lpi->fIsAggregate())
{
LPAGGREGATE_PREF lpap;
if ((lpap = (LPAGGREGATE_PREF)lpi->GetUserParam()) != NULL)
{
lpoa = &lpap->oa;
}
}
else if (lpi->fIsFileset())
{
LPFILESET_PREF lpfp;
if ((lpfp = (LPFILESET_PREF)lpi->GetUserParam()) != NULL)
{
lpoa = &lpfp->oa;
}
}
return lpoa;
}
示例13: Command_OnProperties
void Command_OnProperties (LPIDENT lpi)
{
if (lpi)
{
size_t nAlerts = Alert_GetCount (lpi);
if (lpi->fIsServer())
{
Server_ShowProperties (lpi, nAlerts);
}
else if (lpi->fIsService())
{
Services_ShowProperties (lpi, nAlerts);
}
else if (lpi->fIsAggregate())
{
Aggregates_ShowProperties (lpi, nAlerts);
}
else if (lpi->fIsFileset())
{
Filesets_ShowProperties (lpi, nAlerts);
}
}
}
示例14: DispatchNotification_MainThread
void DispatchNotification_MainThread (NOTIFYEVENT evt, PNOTIFYPARAMS pParams)
{
LPIDENT lpiEvt = pParams->lpi1;
// There are several notifications which are sent when beginning or ending
// lengthy operations. These "actions" each get a window indicating
// progress, and get added to our ongoing list of actions-in-progress.
//
ActionNotification_MainThread (evt, pParams);
// The real reason for this routine is as a dispatcher for the AFSClass's
// notifications: various windows throughout the app register themselves
// with this dispatcher, and thereby get a message whenever a particular
// event of interest to that window happens. Just what notifications
// are "of interest" is specified by the window when it registers with
// this dispatcher.
//
for (size_t iDispatch = 0; iDispatch < nDispatchList; ++iDispatch)
{
if (!aDispatchList[ iDispatch ].hWnd)
continue;
BOOL fDispatch = FALSE;
// WHEN_CELL_OPENED + NULL -> notify if any new cell is opened
// WHEN_OBJECT_CHANGES + NULL -> notify if anything at all changes
// WHEN_OBJECT_CHANGES + lpi -> notify if this object changes
// WHEN_SVCS(etc)_CHANGE + NULL -> notify if any service at all changes
// WHEN_SVCS(etc)_CHANGE + lpi -> notify if any svc on this svr changes
switch (aDispatchList[ iDispatch ].when)
{
case WHEN_CELL_OPENED:
if (evt == evtCreate && lpiEvt->fIsCell())
fDispatch = TRUE;
break;
case WHEN_OBJECT_CHANGES:
if ( (aDispatchList[ iDispatch ].lpiObject == lpiEvt) ||
(aDispatchList[ iDispatch ].lpiObject == NULL) )
{
if (evt != evtCreate)
fDispatch = TRUE;
}
break;
case WHEN_SVRS_CHANGE:
switch (evt)
{
case evtInvalidate:
case evtRefreshServersBegin:
case evtRefreshServersEnd:
if ( (lpiEvt && lpiEvt->fIsCell()) ||
(aDispatchList[ iDispatch ].lpiObject == lpiEvt) ||
(aDispatchList[ iDispatch ].lpiObject == NULL) )
{
if (lpiEvt && lpiEvt->fIsCell())
fDispatch = TRUE;
}
break;
case evtCreate:
case evtDestroy:
case evtRefreshStatusBegin:
case evtRefreshStatusEnd:
case evtAlertsChanged:
if (lpiEvt && lpiEvt->fIsServer())
{
if (aDispatchList[ iDispatch ].lpiObject == NULL)
fDispatch = TRUE;
else
{
LPIDENT lpiEvtCell = lpiEvt->GetCell();
if (aDispatchList[ iDispatch ].lpiObject == lpiEvtCell)
fDispatch = TRUE;
}
}
break;
}
break;
case WHEN_SETS_CHANGE:
switch (evt)
{
case evtInvalidate:
case evtRefreshFilesetsBegin:
case evtRefreshFilesetsEnd:
{
LPIDENT lpiEvtSvr = NULL;
if (lpiEvt && !lpiEvt->fIsCell())
lpiEvtSvr = lpiEvt->GetServer();
if ( (lpiEvt && lpiEvt->fIsCell()) ||
(aDispatchList[ iDispatch ].lpiObject == lpiEvt) ||
(aDispatchList[ iDispatch ].lpiObject == lpiEvtSvr) ||
(aDispatchList[ iDispatch ].lpiObject == NULL) )
{
if (lpiEvt && (lpiEvt->fIsCell() || lpiEvt->fIsServer() || lpiEvt->fIsAggregate()))
fDispatch = TRUE;
//.........这里部分代码省略.........
示例15: DispatchNotification_AltThread
void DispatchNotification_AltThread (NOTIFYEVENT evt, PNOTIFYPARAMS pParams)
{
LPIDENT lpiEvt = pParams->lpi1;
switch (evt)
{
case evtRefreshStatusEnd:
if (lpiEvt && (lpiEvt->fIsService() || lpiEvt->fIsAggregate() || lpiEvt->fIsFileset()))
{
Alert_RemoveSecondary (lpiEvt);
Alert_Scout_QueueCheckServer (lpiEvt);
}
if (lpiEvt && lpiEvt->fIsServer())
{
LPSERVER_PREF lpsp;
if ((lpsp = (LPSERVER_PREF)lpiEvt->GetUserParam()) != NULL)
{
LPSERVER lpServer;
if ((lpServer = lpiEvt->OpenServer()) != NULL)
{
if (lpsp->fIsMonitored != lpServer->fIsMonitored())
{
g.sub = Subsets_SetMonitor (g.sub, lpiEvt, lpServer->fIsMonitored());
UpdateDisplay_ServerWindow (FALSE, lpiEvt);
}
lpsp->fIsMonitored = lpServer->fIsMonitored();
lpServer->Close();
}
}
Alert_Scout_ServerStatus (lpiEvt, pParams->status);
}
break;
// When we get a create request, use the object's Get/SetUserParam()
// methods to attach an allocated structure to the thing--the structure
// contains the preferences for the server/fileset/etc (for instance,
// its warning threshholds, any current scout problems, etc).
// On delete requests, free that structure.
//
case evtCreate:
if (lpiEvt->fIsServer())
{
PVOID pPref = Server_LoadPreferences (lpiEvt);
lpiEvt->SetUserParam (pPref);
// Should this server be monitored?
//
if (!Subsets_fMonitorServer (g.sub, lpiEvt))
{
LPSERVER lpServer;
if ((lpServer = lpiEvt->OpenServer()) != NULL)
{
lpServer->SetMonitor (FALSE);
lpServer->Close();
}
}
Alert_Scout_SetOutOfDate (lpiEvt);
}
else if (lpiEvt->fIsService())
{
PVOID pPref = Services_LoadPreferences (lpiEvt);
lpiEvt->SetUserParam (pPref);
}
else if (lpiEvt->fIsAggregate())
{
PVOID pPref = Aggregates_LoadPreferences (lpiEvt);
lpiEvt->SetUserParam (pPref);
}
else if (lpiEvt->fIsFileset())
{
PVOID pPref = Filesets_LoadPreferences (lpiEvt);
lpiEvt->SetUserParam (pPref);
}
if (!lpiEvt->fIsCell())
{
Alert_Scout_QueueCheckServer (lpiEvt);
}
break;
// When we get a create request, use the object's Get/SetUserParam()
// methods to attach an allocated structure to the thing--the structure
// contains the preferences for the server/fileset/etc (for instance,
// its warning threshholds, any current scout problems, etc).
// On delete requests, free that structure.
//
case evtDestroy:
if (lpiEvt->fIsServer())
{
PVOID pPref = lpiEvt->GetUserParam();
lpiEvt->SetUserParam (0);
if (pPref) Delete (pPref);
}
else if (lpiEvt->fIsService() || lpiEvt->fIsAggregate() || lpiEvt->fIsFileset())
{
Alert_RemoveSecondary (lpiEvt);
PVOID pPref = lpiEvt->GetUserParam();
lpiEvt->SetUserParam (0);
if (pPref) Delete (pPref);
//.........这里部分代码省略.........