2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
11 #include <afs/param.h>
15 #include "TaAfsUsrMgr.h"
19 * ROUTINES ___________________________________________________________________
23 LPERRORDATA ED_Create (int idsSingle, int idsMultiple)
25 LPERRORDATA ped = New (ERRORDATA);
26 memset (ped, 0x00, sizeof(ERRORDATA));
27 ped->idsSingle = idsSingle;
28 ped->idsMultiple = idsMultiple;
33 void ED_Free (LPERRORDATA ped)
38 asc_AsidListFree (&ped->pAsidList);
44 void ED_RegisterStatus (LPERRORDATA ped, ASID idObject, BOOL fSuccess, ULONG status)
49 asc_AsidListCreate (&ped->pAsidList);
50 if (!asc_AsidListTest (&ped->pAsidList, idObject))
51 asc_AsidListAddEntry (&ped->pAsidList, idObject, status);
59 ULONG ED_GetFinalStatus (LPERRORDATA ped)
61 return (ped->cFailures) ? ped->status : 0;
65 void ED_ShowErrorDialog (LPERRORDATA ped)
69 LPTSTR pszNames = CreateNameList (ped->pAsidList);
71 if (ped->pAsidList->cEntries == 1)
74 ErrorDialog (ped->status, ped->idsSingle, TEXT("%m"), IDS_UNKNOWN_NAME);
76 ErrorDialog (ped->status, ped->idsSingle, TEXT("%s"), pszNames);
78 else if (ped->pAsidList->cEntries > 1)
81 ErrorDialog (ped->status, ped->idsMultiple, TEXT("%m"), IDS_UNKNOWN_NAME);
83 ErrorDialog (ped->status, ped->idsMultiple, TEXT("%s"), pszNames);
86 FreeString (pszNames);