本文整理汇总了C++中LPIDENT::GetUserParam方法的典型用法代码示例。如果您正苦于以下问题:C++ LPIDENT::GetUserParam方法的具体用法?C++ LPIDENT::GetUserParam怎么用?C++ LPIDENT::GetUserParam使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPIDENT
的用法示例。
在下文中一共展示了LPIDENT::GetUserParam方法的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_CloseAll
void Server_CloseAll (BOOL fUserRequested)
{
HWND hWnd;
while ((hWnd = PropCache_Search (pcSERVER, ANYVALUE)) != NULL)
{
LPIDENT lpiServer = Server_GetServer (hWnd);
Server_SaveRect (hWnd, !fUserRequested);
DestroyWindow (hWnd);
if (lpiServer && fUserRequested)
{
// If there's a subset active, the user may want us to stop
// monitoring this server once its window is closed.
//
LPSERVER_PREF lpsp;
if ((lpsp = (LPSERVER_PREF)lpiServer->GetUserParam()) != NULL)
{
if (g.sub && gr.fCloseUnmonitors && lpsp->fIsMonitored)
{
StartTask (taskSVR_MONITOR_ONOFF, NULL, lpiServer);
}
}
}
}
}
示例3: Aggregates_SavePreferences
BOOL Aggregates_SavePreferences (LPIDENT lpiAggregate)
{
BOOL rc = FALSE;
PVOID pap = lpiAggregate->GetUserParam();
if (pap != NULL)
{
rc = StorePreferences (lpiAggregate, pap, sizeof(AGGREGATE_PREF));
}
return rc;
}
示例4: Services_SavePreferences
BOOL Services_SavePreferences (LPIDENT lpiService)
{
BOOL rc = FALSE;
PVOID psp = lpiService->GetUserParam();
if (psp != NULL)
{
rc = StorePreferences (lpiService, psp, sizeof(SERVICE_PREF));
}
return rc;
}
示例5: Filesets_SavePreferences
BOOL Filesets_SavePreferences (LPIDENT lpiFileset)
{
BOOL rc = FALSE;
PVOID pfp = lpiFileset->GetUserParam();
if (pfp != NULL)
{
rc = StorePreferences (lpiFileset, pfp, sizeof(FILESET_PREF));
}
return rc;
}
示例6: 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;
}
示例7: Server_GetColumnText
LPTSTR Server_GetColumnText (LPIDENT lpi, SERVERCOLUMN svrcol)
{
static TCHAR aszBuffer[ nSERVERCOLUMNS ][ cchRESOURCE ];
static size_t iBufferNext = 0;
LPTSTR pszBuffer = aszBuffer[ iBufferNext++ ];
if (iBufferNext == nSERVERCOLUMNS)
iBufferNext = 0;
*pszBuffer = TEXT('\0');
LPSERVERSTATUS lpss = NULL;
LPSERVER_PREF lpsp;
if ((lpsp = (LPSERVER_PREF)lpi->GetUserParam()) != NULL)
{
lpss = &lpsp->ssLast;
}
switch (svrcol)
{
case svrcolNAME:
lpi->GetServerName (pszBuffer);
break;
case svrcolADDRESS:
if (lpss)
FormatSockAddr (pszBuffer, TEXT("%a"), &lpss->aAddresses[0]);
break;
case svrcolSTATUS:
{
LPTSTR pszDesc;
if ((pszDesc = Alert_GetQuickDescription (lpi)) == NULL)
GetString (pszBuffer, IDS_STATUS_NOALERTS);
else
{
lstrcpy (pszBuffer, pszDesc);
FreeString (pszDesc);
}
}
break;
}
return pszBuffer;
}
示例8: Server_Open
void Server_Open (LPIDENT lpiServer, LPRECT prWindow)
{
HWND hServer;
if ((hServer = PropCache_Search (pcSERVER, lpiServer)) != NULL)
{
SetFocus (hServer);
}
else
{
// First off, if this server isn't being monitored, we have
// to start monitoring it or we can't open a window (nothing to
// show otherwise).
//
LPSERVER_PREF lpsp;
if ((lpsp = (LPSERVER_PREF)lpiServer->GetUserParam()) != NULL)
{
BOOL fCanShowWindow = (gr.fOpenMonitors || lpsp->fIsMonitored);
if (gr.fOpenMonitors && !lpsp->fIsMonitored)
{
StartTask (taskSVR_MONITOR_ONOFF, NULL, lpiServer);
}
if (fCanShowWindow)
{
hServer = ModelessDialogParam (IDD_SERVER, NULL, (DLGPROC)Server_DlgProc, (LPARAM)lpiServer);
Server_SelectServer (hServer, lpiServer);
if (prWindow->right != 0)
{
SetWindowPos (hServer, NULL, prWindow->left, prWindow->top,
cxRECT(*prWindow), cyRECT(*prWindow),
SWP_NOZORDER | SWP_NOACTIVATE);
}
ShowWindow (hServer, SW_NORMAL);
}
}
}
}
示例9: Server_Close
void Server_Close (LPIDENT lpiServer)
{
HWND hWnd;
if ((hWnd = PropCache_Search (pcSERVER, lpiServer)) != NULL)
{
Server_SaveRect (hWnd, FALSE);
DestroyWindow (hWnd);
// If there's a subset active, the user may want us to stop
// monitoring this server once its window is closed.
//
LPSERVER_PREF lpsp;
if ((lpsp = (LPSERVER_PREF)lpiServer->GetUserParam()) != NULL)
{
if (g.sub && gr.fCloseUnmonitors && lpsp->fIsMonitored && !gr.fPreview)
{
StartTask (taskSVR_MONITOR_ONOFF, NULL, lpiServer);
}
}
}
}
示例10: Replicas_GetColumnText
LPTSTR Replicas_GetColumnText (LPIDENT lpi, REPLICACOLUMN repcol)
{
static TCHAR aszBuffer[ nREPLICACOLUMNS ][ cchRESOURCE ];
static size_t iBufferNext = 0;
LPTSTR pszBuffer = aszBuffer[ iBufferNext++ ];
if (iBufferNext == nREPLICACOLUMNS)
iBufferNext = 0;
LPFILESETSTATUS lpfs = NULL;
LPFILESET_PREF lpfp;
if ((lpfp = (LPFILESET_PREF)lpi->GetUserParam()) != NULL)
{
lpfs = &lpfp->fsLast;
}
switch (repcol)
{
case repcolSERVER:
lpi->GetServerName (pszBuffer);
break;
case repcolAGGREGATE:
lpi->GetAggregateName (pszBuffer);
break;
case repcolDATE_UPDATE:
if (!lpfs)
*pszBuffer = TEXT('\0');
else if (!FormatTime (pszBuffer, TEXT("%s"), &lpfs->timeLastUpdate))
*pszBuffer = TEXT('\0');
break;
default:
pszBuffer = NULL;
break;
}
return pszBuffer;
}
示例11: Filesets_DlgProc
BOOL CALLBACK Filesets_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
{
if (HandleColumnNotify (hDlg, msg, wp, lp, &gr.viewSet))
return FALSE;
switch (msg)
{
case WM_INITDIALOG:
{
RECT rTab;
GetClientRect (GetParent(hDlg), &rTab);
TabCtrl_AdjustRect (GetParent (hDlg), FALSE, &rTab);
ResizeWindow (hDlg, awdFilesets, rwaMoveToHere, &rTab);
FL_RestoreView (GetDlgItem (hDlg, IDC_SET_LIST), &gr.viewSet);
FastList_SetTextCallback (GetDlgItem (hDlg, IDC_SET_LIST), GetItemText, &gr.viewSet);
Filesets_SubclassList (hDlg);
Filesets_OnView (hDlg);
Filesets_OnSelect (hDlg);
}
break;
case WM_HELP:
WinHelp (hDlg, cszHELPFILENAME, HELP_FINDER, 0);
break;
case WM_DESTROY:
FL_StoreView (GetDlgItem (hDlg, IDC_SET_LIST), &gr.viewSet);
DontNotifyMeEver (hDlg);
break;
case WM_SIZE:
// if (lp==0), we're minimizing--don't call ResizeWindow().
//
if (lp != 0)
ResizeWindow (hDlg, awdFilesets, rwaFixupGuts);
break;
case WM_CONTEXTMENU:
{
POINT ptScreen;
POINT ptClient;
ptScreen.x = LOWORD(lp);
ptScreen.y = HIWORD(lp);
ptClient = ptScreen;
ScreenToClient ((HWND)wp, &ptClient);
if ((HWND)wp == GetDlgItem (hDlg, IDC_SET_LIST))
Filesets_ShowPopupMenu ((HWND)wp, ptClient, ptScreen);
}
break;
case WM_SERVER_CHANGED:
{
LPIDENT lpiServer = Server_GetServerForChild (hDlg);
DontNotifyMeEver (hDlg);
NotifyMe (WHEN_OBJECT_CHANGES, NULL, hDlg, 0);
// Fix the text at the top of the Aggregates tab:
//
TCHAR szName[ cchRESOURCE ];
LPTSTR pszText;
if (lpiServer != NULL)
{
LPSERVER_PREF lpsp = (LPSERVER_PREF)lpiServer->GetUserParam();
lpiServer->GetServerName (szName);
if (lpsp && !lpsp->fIsMonitored)
pszText = FormatString (IDS_FILESET_UNMON, TEXT("%s"), szName);
else
pszText = FormatString (IDS_FILESETS_IN_SERVER, TEXT("%s"), szName);
}
else if (g.lpiCell != NULL)
{
g.lpiCell->GetCellName (szName);
if (g.sub)
pszText = FormatString (IDS_FILESET_SOME, TEXT("%s"), szName);
else
pszText = FormatString (IDS_FILESETS_IN_CELL, TEXT("%s"), szName);
}
else
{
pszText = FormatString (IDS_FILESETS_IN_NOTHING);
}
SetDlgItemText (hDlg, IDC_SET_DESC, pszText);
FreeString (pszText);
UpdateDisplay_Filesets (FALSE, GetDlgItem (hDlg, IDC_SET_LIST), NULL, 0, NULL, NULL, NULL);
}
break;
case WM_NOTIFY_FROM_DISPATCH:
Filesets_OnNotifyFromDispatch ((LPNOTIFYSTRUCT)lp);
Delete ((LPNOTIFYSTRUCT)lp);
break;
//.........这里部分代码省略.........
示例12: Services_GetColumnText
LPTSTR Services_GetColumnText (LPIDENT lpi, SERVICECOLUMN svccol, BOOL fShowServerName)
{
static TCHAR aszBuffer[ nSERVICECOLUMNS ][ cchRESOURCE ];
static size_t iBufferNext = 0;
LPTSTR pszBuffer = aszBuffer[ iBufferNext++ ];
if (iBufferNext == nSERVICECOLUMNS)
iBufferNext = 0;
*pszBuffer = TEXT('\0');
LPSERVICESTATUS lpss = NULL;
LPSERVICE_PREF lpsp;
if ((lpsp = (LPSERVICE_PREF)lpi->GetUserParam()) != NULL)
lpss = &lpsp->ssLast;
switch (svccol)
{
case svccolNAME:
if (!fShowServerName)
lpi->GetServiceName (pszBuffer);
else
{
TCHAR szNameSvr[ cchNAME ];
TCHAR szNameSvc[ cchNAME ];
lpi->GetServerName (szNameSvr);
lpi->GetServiceName (szNameSvc);
LPTSTR pszName = FormatString (IDS_SERVER_SERVICE, TEXT("%s%s"), szNameSvr, szNameSvc);
lstrcpy (pszBuffer, pszName);
FreeString (pszName);
}
break;
case svccolTYPE:
if (lpss)
{
if (lpss->type == SERVICETYPE_SIMPLE)
GetString (pszBuffer, IDS_SERVICETYPE_SIMPLE);
else if (lpss->type == SERVICETYPE_FS)
GetString (pszBuffer, IDS_SERVICETYPE_FS);
else
GetString (pszBuffer, IDS_SERVICETYPE_CRON);
}
break;
case svccolPARAMS:
if (lpss)
{
lstrncpy (pszBuffer, lpss->szParams, cchRESOURCE-1);
pszBuffer[ cchRESOURCE-1 ] = TEXT('\0');
for (LPTSTR pch = pszBuffer; *pch; ++pch)
{
if (*pch == TEXT('\r') || *pch == TEXT('\t') || *pch == TEXT('\n'))
*pch = TEXT(' ');
}
}
break;
case svccolNOTIFIER:
if (lpss)
{
lstrncpy (pszBuffer, lpss->szNotifier, cchRESOURCE-1);
pszBuffer[ cchRESOURCE-1 ] = TEXT('\0');
for (LPTSTR pch = pszBuffer; *pch; ++pch)
{
if (*pch == TEXT('\r') || *pch == TEXT('\t') || *pch == TEXT('\n'))
*pch = TEXT(' ');
}
}
break;
case svccolSTATUS:
if (lpss)
{
if (lpss->state == SERVICESTATE_RUNNING)
GetString (pszBuffer, IDS_SERVICESTATE_RUNNING);
else if (lpss->state == SERVICESTATE_STOPPING)
GetString (pszBuffer, IDS_SERVICESTATE_STOPPING);
else if (lpss->state == SERVICESTATE_STARTING)
GetString (pszBuffer, IDS_SERVICESTATE_STARTING);
else
GetString (pszBuffer, IDS_SERVICESTATE_STOPPED);
}
break;
case svccolDATE_START:
if (lpss)
{
if (!FormatTime (pszBuffer, TEXT("%s"), &lpss->timeLastStart))
pszBuffer[0] = TEXT('\0');
}
break;
case svccolDATE_STOP:
if (lpss)
{
if (!FormatTime (pszBuffer, TEXT("%s"), &lpss->timeLastStop))
pszBuffer[0] = TEXT('\0');
}
break;
//.........这里部分代码省略.........
示例13: Filesets_GetColumnText
LPTSTR Filesets_GetColumnText (LPIDENT lpi, FILESETCOLUMN setcol, BOOL fShowServerName)
{
static TCHAR aszBuffer[ nFILESETCOLUMNS ][ cchRESOURCE ];
static size_t iBufferNext = 0;
LPTSTR pszBuffer = aszBuffer[ iBufferNext++ ];
if (iBufferNext == nFILESETCOLUMNS)
iBufferNext = 0;
*pszBuffer = TEXT('\0');
LPFILESETSTATUS lpfs = NULL;
LPIDENT lpiRW = NULL;
LPFILESET_PREF lpfp;
if ((lpfp = (LPFILESET_PREF)lpi->GetUserParam()) != NULL)
{
lpfs = &lpfp->fsLast;
lpiRW = lpfp->lpiRW;
}
switch (setcol)
{
case setcolNAME:
lpi->GetFilesetName (pszBuffer);
break;
case setcolAGGREGATE:
if (!fShowServerName)
lpi->GetAggregateName (pszBuffer);
else
{
TCHAR szNameSvr[ cchNAME ];
TCHAR szNameAgg[ cchNAME ];
lpi->GetServerName (szNameSvr);
lpi->GetAggregateName (szNameAgg);
LPTSTR pszName = FormatString (IDS_SERVER_AGGREGATE, TEXT("%s%s"), szNameSvr, szNameAgg);
lstrcpy (pszBuffer, pszName);
FreeString (pszName);
}
break;
case setcolTYPE:
if (lpfs)
{
switch (lpfs->Type)
{
case ftREADWRITE:
GetString (pszBuffer, IDS_FILESETTYPE_RW);
break;
case ftCLONE:
GetString (pszBuffer, IDS_FILESETTYPE_CLONE);
break;
case ftREPLICA:
if (lpiRW == NULL)
GetString (pszBuffer, IDS_FILESETTYPE_RO);
else if (lpiRW->GetServer() != lpi->GetServer())
GetString (pszBuffer, IDS_FILESETTYPE_RO);
else
GetString (pszBuffer, IDS_FILESETTYPE_RO_STAGE);
break;
}
}
break;
case setcolDATE_CREATE:
if (lpfs)
{
if (!FormatTime (pszBuffer, TEXT("%s"), &lpfs->timeCreation))
pszBuffer[0] = TEXT('\0');
}
break;
case setcolDATE_UPDATE:
if (lpfs)
{
if (!FormatTime (pszBuffer, TEXT("%s"), &lpfs->timeLastUpdate))
pszBuffer[0] = TEXT('\0');
}
break;
case setcolDATE_ACCESS:
if (lpfs)
{
if (!FormatTime (pszBuffer, TEXT("%s"), &lpfs->timeLastAccess))
pszBuffer[0] = TEXT('\0');
}
break;
case setcolDATE_BACKUP:
if (lpfs)
{
if (!FormatTime (pszBuffer, TEXT("%s"), &lpfs->timeLastBackup))
pszBuffer[0] = TEXT('\0');
}
break;
case setcolQUOTA_USED:
if (lpfs)
{
LPTSTR psz = FormatString (TEXT("%1"), TEXT("%.1B"), 1024.0 * lpfs->ckUsed);
//.........这里部分代码省略.........
示例14: Server_ShowParticularPopupMenu
void Server_ShowParticularPopupMenu (HWND hParent, POINT ptScreen, LPIDENT lpiServer)
{
HMENU hm;
if (lpiServer == NULL)
hm = TaLocale_LoadMenu (MENU_SVR_NONE);
else
hm = TaLocale_LoadMenu (MENU_SVR);
if (hm != NULL)
{
if (lpiServer == NULL)
{
int lvs = (gr.fPreview && !gr.fVert) ? gr.diHorz.viewSvr.lvsView : gr.diVert.viewSvr.lvsView;
HMENU hmView = GetSubMenu (hm, 0);
CheckMenuRadioItem (hmView,
M_SVR_VIEW_LARGE, M_SVR_VIEW_REPORT,
( (lvs == FLS_VIEW_SMALL) ? M_SVR_VIEW_SMALL :
(lvs == FLS_VIEW_LIST) ? M_SVR_VIEW_REPORT :
M_SVR_VIEW_LARGE ),
MF_BYCOMMAND);
ICONVIEW ivSvr = Display_GetServerIconView();
CheckMenuRadioItem (hmView,
M_SVR_VIEW_ONEICON, M_SVR_VIEW_STATUS,
(ivSvr == ivTWOICONS) ? M_SVR_VIEW_TWOICONS :
(ivSvr == ivONEICON) ? M_SVR_VIEW_ONEICON : M_SVR_VIEW_STATUS,
MF_BYCOMMAND);
if (lvs != FLS_VIEW_LIST)
{
EnableMenu (hmView, M_SVR_VIEW_ONEICON, FALSE);
EnableMenu (hmView, M_SVR_VIEW_TWOICONS, FALSE);
EnableMenu (hmView, M_SVR_VIEW_STATUS, FALSE);
}
if (!PropCache_Search (pcSERVER, ANYVALUE))
EnableMenu (hmView, M_SVR_CLOSEALL, FALSE);
}
else
{
BOOL fOpenNow = (BOOL)!!(PropCache_Search (pcSERVER, lpiServer));
LPSERVER_PREF lpsp;
if ( ((lpsp = (LPSERVER_PREF)lpiServer->GetUserParam()) == NULL) ||
(lpsp->fIsMonitored) )
{
EnableMenu (hm, M_SVR_OPEN, !fOpenNow);
EnableMenu (hm, M_SVR_CLOSE, fOpenNow);
CheckMenu (hm, M_SVR_MONITOR, TRUE);
}
else
{
if (!fOpenNow)
EnableMenu (hm, M_SVR_CLOSE, FALSE);
if (fOpenNow || !gr.fOpenMonitors)
EnableMenu (hm, M_SVR_OPEN, FALSE);
CheckMenu (hm, M_SVR_MONITOR, FALSE);
EnableMenu (hm, M_SVR_SECURITY, FALSE);
EnableMenu (hm, M_SALVAGE, FALSE);
EnableMenu (hm, M_SET_CLONE, FALSE);
EnableMenu (hm, M_SET_UNLOCK, FALSE);
EnableMenu (hm, M_SYNCVLDB, FALSE);
}
}
DisplayContextMenu (hm, ptScreen, hParent);
}
}
示例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);
//.........这里部分代码省略.........