Example #1
0
/******************************************************************************
	Determine whether the specified DB is a condensed directory design
	or not
******************************************************************************/
bool RecipientsHandler::IsCondensedDirectory(char* pszDirectoryPath) 
{
	#define	CONDENSED_DIR_DESIGN "Lightweight Directory"

	bool result = false;
	DBHANDLE	hDB = NULL;
	char		szInfoBuffer[NSF_INFO_SIZE];
	char		szTemplateName[NSF_INFO_SIZE];

	STATUS stat = NSFDbOpen(pszDirectoryPath, &hDB);
	if (NOERROR == stat)
	{
		stat = NSFDbInfoGet(hDB, szInfoBuffer);
		if (NOERROR == stat)
		{
			NSFDbInfoParse(szInfoBuffer, INFOPARSE_DESIGN_CLASS, szTemplateName, NSF_INFO_SIZE - 1);
			if (strlen(szTemplateName) > 0)
			{
				if (_stricmp(szTemplateName, CONDENSED_DIR_DESIGN) == 0)
				{
					result = true;
				}
			}
		}
		NSFDbClose(hDB);
	}
	return result;
}
/** eus_getTemplateClass( ***
Obtains a copy of the class name of the given, already opened Notes template 
database.

--- parameters & return ----
H: handle to the already opened Notes template database
pc_class: Output. Pointer to the buffer to fill with the class (template) 
	name of the specified database, should be of minimum size NSF_INFO_SIZE 
	to be completely safe.
RETURN:
	eus_SUCCESS if no error occured
	!eus_SUCCESS if invalid parameters were passed
	the Notes API error code otherwise

--- revision history -------
9/12/99 PR: created			*/
STATUS eus_getTemplateClass( DBHANDLE  H, 
								char *const  pc_class)	{
	char  pc_info[ NSF_INFO_SIZE];
	STATUS  us_err;

	if (!( H && pc_class))
		return !eus_SUCCESS;

	if (us_err = NSFDbInfoGet( H, pc_info))
		return us_err;
	NSFDbInfoParse( pc_info, INFOPARSE_CLASS, pc_class, NSF_INFO_SIZE - 1);

	return eus_SUCCESS;
} //eus_getTemplateClass(
Example #3
0
_declspec ( dllexport ) STATUS ATOM_NSFDbInfoGet(DBHANDLE hDb, char retBuffer[NSF_INFO_SIZE])
{
	return (NSFDbInfoGet(hDb, retBuffer));
}