本文整理汇总了C++中LPIDENT::GetServer方法的典型用法代码示例。如果您正苦于以下问题:C++ LPIDENT::GetServer方法的具体用法?C++ LPIDENT::GetServer怎么用?C++ LPIDENT::GetServer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPIDENT
的用法示例。
在下文中一共展示了LPIDENT::GetServer方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Alert_RemoveSecondary
void Alert_RemoveSecondary (LPIDENT lpiChild)
{
BOOL fChangedAlerts = FALSE;
LPOBJECTALERTS lpoa;
if ((lpoa = Alert_GetObjectAlerts (lpiChild, TRUE)) != NULL)
{
size_t iAlert;
for (iAlert = 0; iAlert < lpoa->nAlerts; )
{
if ( (lpoa->aAlerts[ iAlert ].alert == alertSECONDARY) &&
(lpoa->aAlerts[ iAlert ].aiSECONDARY.lpiSecondary == lpiChild) )
{
Alert_RemoveFunc (lpoa, iAlert);
fChangedAlerts = TRUE;
}
else
{
++iAlert;
}
}
BOOL fNeedBadCredsWarning = FALSE;
for (iAlert = 0; iAlert < lpoa->nAlerts; ++iAlert)
{
if (lpoa->aAlerts[ iAlert ].alert == alertSECONDARY)
{
ALERT alert = Alert_GetAlert (lpoa->aAlerts[ iAlert ].aiSECONDARY.lpiSecondary,
lpoa->aAlerts[ iAlert ].aiSECONDARY.iSecondary);
if (alert == alertNO_SVRENT)
fNeedBadCredsWarning = TRUE;
}
}
if ( (!fNeedBadCredsWarning) &&
(lpoa->nAlerts && (lpoa->aAlerts[ 0 ].alert == alertBADCREDS)) )
{
Alert_RemoveFunc (lpoa, 0);
fChangedAlerts = TRUE;
}
}
if (fChangedAlerts)
{
PostNotification (evtAlertsChanged, lpiChild->GetServer());
PostNotification (evtAlertsChanged, lpiChild);
}
}
示例2: Server_Salvage_OnEndTask_EnumAggregates
void Server_Salvage_OnEndTask_EnumAggregates (HWND hDlg, LPIDENT lpi, LPTASKPACKET ptp)
{
// We'll refill the Aggregates list any time the user selected a new server;
// and whenever it gets filled, we must next fill the filesets list.
//
LPIDENT lpiServer;
if ((lpiServer = (LPIDENT)CB_GetSelectedData (GetDlgItem (hDlg, IDC_SERVER))) != NULL)
{
LPIDENT lpiAggregate;
if ((lpiAggregate = (LPIDENT)CB_GetSelectedData (GetDlgItem (hDlg, IDC_AGGREGATE))) != NULL)
{
LPSET_ENUM_TO_COMBOBOX_PACKET lpp = New (SET_ENUM_TO_COMBOBOX_PACKET);
memset (lpp, 0x00, sizeof(SET_ENUM_TO_COMBOBOX_PACKET));
lpp->hCombo = GetDlgItem (hDlg, IDC_FILESET);
lpp->lpiServer = lpiServer;
lpp->lpiAggregate = lpiAggregate;
lpp->lpiSelect = ((lpiServer == lpi->GetServer()) && (lpi->fIsFileset())) ? (lpi) : NULL;
StartTask (taskSET_ENUM_TO_COMBOBOX, hDlg, lpp);
}
}
}
示例3: 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);
}
示例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: 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;
//.........这里部分代码省略.........
示例6: StartContextCommand
//.........这里部分代码省略.........
case M_SVR_CLOSEALL:
Server_CloseAll (TRUE);
break;
case M_SVR_SECURITY:
Server_Security (lpi);
break;
case M_SVR_HOSTS:
Server_Hosts (lpi);
break;
case M_SVR_INSTALL:
Server_Install (lpi);
break;
case M_SVR_UNINSTALL:
Server_Uninstall (lpi);
break;
case M_SVR_PRUNE:
Server_Prune (lpi);
break;
case M_SVR_GETDATES:
Server_GetDates (lpi);
break;
case M_EXECUTE:
Server_Execute (lpi);
break;
case M_VIEWLOG:
if (lpi && lpi->fIsService())
Services_ShowServiceLog (lpi);
else
Services_ShowServerLog (lpi);
break;
case M_SVR_MONITOR:
if (lpi && lpi->fIsServer())
StartTask (taskSVR_MONITOR_ONOFF, NULL, lpi);
break;
case M_SVC_CREATE:
if (!lpi)
Services_Create (NULL);
else
Services_Create (lpi->GetServer());
break;
case M_SVC_DELETE:
if (lpi && lpi->fIsService())
Services_Delete (lpi);
break;
case M_SVC_START:
if (lpi && lpi->fIsService())
Services_Start (lpi);
break;
case M_SVC_STOP:
if (lpi && lpi->fIsService())
Services_Stop (lpi);
break;
case M_SVC_RESTART:
if (lpi && lpi->fIsService())
Services_Restart (lpi);
break;
case M_CELL_OPEN:
OpenCellDialog();
break;
case M_CREDENTIALS:
NewCredsDialog();
break;
case M_OPTIONS:
ShowOptionsDialog();
break;
case M_HELP:
WinHelp (g.hMain, cszHELPFILENAME, HELP_FINDER, 0);
break;
case M_HELP_FIND:
Help_FindCommand();
break;
case M_HELP_XLATE:
Help_FindError();
break;
case M_ABOUT:
Help_About();
break;
}
}
示例7: 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);
}
}
示例8: 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);
}
}
示例9: 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);
//.........这里部分代码省略.........