本文整理汇总了C++中LPIDENT::fIsService方法的典型用法代码示例。如果您正苦于以下问题:C++ LPIDENT::fIsService方法的具体用法?C++ LPIDENT::fIsService怎么用?C++ LPIDENT::fIsService使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPIDENT
的用法示例。
在下文中一共展示了LPIDENT::fIsService方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetPreferencesInfo
BOOL GetPreferencesInfo (LPIDENT lpi, LPTSTR pszPath, WORD *pwVer)
{
if (lpi == NULL)
return FALSE;
// HKCU\Software\...\SVRMgr + \CellName
//
lstrcpy (pszPath, REGSTR_SETTINGS_PREFS);
lstrcat (pszPath, TEXT("\\"));
lpi->GetCellName (&pszPath[ lstrlen(pszPath) ]);
// HKCU\Software\...\SVRMgr\CellName + \ServerName
//
lstrcat (pszPath, TEXT("\\"));
lpi->GetLongServerName (&pszPath[ lstrlen(pszPath) ]);
*pwVer = wVerSERVER_PREF;
if (lpi->fIsService())
{
// HKCU\Software\...\SVRMgr\CellName\ServerName + \Services\ServiceName
//
lstrcat (pszPath, TEXT("\\"));
lstrcat (pszPath, SERVICES_KW);
lstrcat (pszPath, TEXT("\\"));
lpi->GetServiceName (&pszPath[ lstrlen(pszPath) ]);
*pwVer = wVerSERVICE_PREF;
}
else if (lpi->fIsAggregate())
{
// HKCU\Software\...\SVRMgr\CellName\ServerName + \Aggs\AggregateName
//
lstrcat (pszPath, TEXT("\\"));
lstrcat (pszPath, AGGREGATES_KW);
lstrcat (pszPath, TEXT("\\"));
lpi->GetAggregateName (&pszPath[ lstrlen(pszPath) ]);
*pwVer = wVerAGGREGATE_PREF;
}
else if (lpi->fIsFileset())
{
// HKCU\Software\...\SVRMgr\CellName\ServerName + \Filesets\FilesetName
//
lstrcat (pszPath, TEXT("\\"));
lstrcat (pszPath, FILESETS_KW);
lstrcat (pszPath, TEXT("\\"));
lpi->GetFilesetName (&pszPath[ lstrlen(pszPath) ]);
*pwVer = wVerFILESET_PREF;
}
return TRUE;
}
示例2: 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;
}
示例3: Services_OnSelect
void Services_OnSelect (HWND hDlg)
{
LPIDENT lpi;
if ( ((lpi = (LPIDENT)FL_GetSelectedData (GetDlgItem (hDlg, IDC_SVC_LIST))) == NULL) ||
(!lpi->fIsService()) )
{
EnableWindow (GetDlgItem (hDlg, IDC_SVC_RESTART), FALSE);
EnableWindow (GetDlgItem (hDlg, IDC_SVC_DELETE), FALSE);
}
else
{
TCHAR szName[ cchRESOURCE ];
lpi->GetServiceName (szName);
if (!lstrcmpi (szName, TEXT("BOS")))
EnableWindow (GetDlgItem (hDlg, IDC_SVC_DELETE), FALSE);
else
EnableWindow (GetDlgItem (hDlg, IDC_SVC_DELETE), TRUE);
EnableWindow (GetDlgItem (hDlg, IDC_SVC_RESTART), TRUE);
}
}
示例4: 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;
}
示例5: 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);
}
}
}
示例6: DispatchNotification_MainThread
//.........这里部分代码省略.........
{
LPIDENT lpiEvtAgg = lpiEvt->GetAggregate();
LPIDENT lpiEvtSvr = lpiEvt->GetServer();
if (aDispatchList[ iDispatch ].lpiObject == lpiEvtAgg)
fDispatch = TRUE;
if (aDispatchList[ iDispatch ].lpiObject == lpiEvtSvr)
fDispatch = TRUE;
}
}
break;
}
break;
case WHEN_AGGS_CHANGE:
switch (evt)
{
case evtRefreshAggregatesBegin:
case evtRefreshAggregatesEnd:
if ( (lpiEvt && lpiEvt->fIsCell()) ||
(aDispatchList[ iDispatch ].lpiObject == lpiEvt) ||
(aDispatchList[ iDispatch ].lpiObject == NULL) )
{
if (lpiEvt && (lpiEvt->fIsCell() || lpiEvt->fIsServer()))
fDispatch = TRUE;
}
break;
case evtCreate:
case evtDestroy:
case evtRefreshStatusBegin:
case evtRefreshStatusEnd:
case evtAlertsChanged:
if (lpiEvt && lpiEvt->fIsAggregate())
{
if (aDispatchList[ iDispatch ].lpiObject == NULL)
fDispatch = TRUE;
else
{
LPIDENT lpiEvtSvr = lpiEvt->GetServer();
if (aDispatchList[ iDispatch ].lpiObject == lpiEvtSvr)
fDispatch = TRUE;
}
}
break;
}
break;
case WHEN_SVCS_CHANGE:
switch (evt)
{
case evtRefreshServicesBegin:
case evtRefreshServicesEnd:
if ( (lpiEvt && lpiEvt->fIsCell()) ||
(aDispatchList[ iDispatch ].lpiObject == lpiEvt) ||
(aDispatchList[ iDispatch ].lpiObject == NULL) )
{
if (lpiEvt && (lpiEvt->fIsCell() || lpiEvt->fIsServer()))
fDispatch = TRUE;
}
break;
case evtCreate:
case evtDestroy:
case evtRefreshStatusBegin:
case evtRefreshStatusEnd:
case evtAlertsChanged:
if (lpiEvt && lpiEvt->fIsService())
{
if (aDispatchList[ iDispatch ].lpiObject == NULL)
fDispatch = TRUE;
else
{
LPIDENT lpiEvtSvr = lpiEvt->GetServer();
if (aDispatchList[ iDispatch ].lpiObject == lpiEvtSvr)
fDispatch = TRUE;
}
}
break;
}
break;
}
if (fDispatch)
{
LPNOTIFYSTRUCT lpns = New (NOTIFYSTRUCT);
lpns->hwndTarget = aDispatchList[ iDispatch ].hWnd;
lpns->evt = evt;
memcpy (&lpns->Params, pParams, sizeof(NOTIFYPARAMS));
lpns->Params.lpUser = aDispatchList[ iDispatch ].lpUser;
PostMessage (aDispatchList[ iDispatch ].hWnd,
WM_NOTIFY_FROM_DISPATCH,
(WPARAM)0,
(LPARAM)lpns);
}
}
}
示例7: 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);
//.........这里部分代码省略.........
示例8: StartContextCommand
//.........这里部分代码省略.........
Filesets_Clone (lpi);
break;
case M_SET_DUMP:
if (lpi && lpi->fIsFileset())
Filesets_Dump (lpi);
break;
case M_SET_RESTORE:
Filesets_Restore (lpi);
break;
case M_SET_RELEASE:
if (lpi && lpi->fIsFileset())
Filesets_Release (lpi);
break;
case M_SET_MOVETO:
if (lpi && lpi->fIsFileset())
Filesets_ShowMoveTo (lpi, NULL);
break;
case M_SET_SETQUOTA:
if (lpi && lpi->fIsFileset())
Filesets_SetQuota (lpi);
break;
case M_SET_LOCK:
if (lpi && lpi->fIsFileset())
StartTask (taskSET_LOCK, NULL, lpi);
break;
case M_SET_UNLOCK:
if (lpi && !lpi->fIsService())
StartTask (taskSET_UNLOCK, NULL, lpi);
else if (!lpi && g.lpiCell)
StartTask (taskSET_UNLOCK, NULL, g.lpiCell);
break;
case M_SET_RENAME:
if (lpi && lpi->fIsFileset())
Filesets_ShowRename (lpi);
break;
case M_SVR_OPEN:
if (lpi && lpi->fIsServer())
StartTask (taskSVR_GETWINDOWPOS, g.hMain, lpi);
break;
case M_SVR_CLOSE:
if (lpi && lpi->fIsServer())
Server_Close (lpi);
break;
case M_SVR_CLOSEALL:
Server_CloseAll (TRUE);
break;
case M_SVR_SECURITY:
Server_Security (lpi);
break;
case M_SVR_HOSTS:
Server_Hosts (lpi);
break;