home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
guit01.zip
/
DIRINT.CPP
next >
Wrap
C/C++ Source or Header
|
1993-11-30
|
3KB
|
129 lines
/*********************************************************** C++ SOURCE *****
*
* (C) Copyright JBA International Plc - 1993
* Licensed Material - Program Property of JBA.
* Not to be used for other than licensed and/or agreed purposes.
*-------------------------------------------------------------------------
*
* Project: GUIDELINES
*
* Component: Custom Controls
*
* Module: DirInt.C
*
* Original Author: Jon Wright
*
* Description: This file contains a C wrapper for the DirList object
* which is callable from JOT code.
*
* Environment: OS/2 V2.1 - IBM CSet++
*
* Modification history:
*
* 24nov93 : Initial release jw
*
* 28nov93 : Modified to show way of allowing multiple instances gj
*
* $Log$
*
***************************************************************************/
/**************************************************************************
* Include Local files
*************************************************************************/
#include "dirlist.hpp"
#include "dirint.hpp"
/**************************************************************************
* Static Variables
*************************************************************************/
/**************************************************************************
* Function: InitList
*
* Purpose: Create directory list object
*
* Parameters: Directory/Filespec to be logged
*
* Returns: none
*
*************************************************************************/
ULONG InitList (String DirName)
{
return ((ULONG) new DirList (DirName));
}
/**************************************************************************
* Function: DestroyList
*
* Purpose: Destructor: Delete object and any list entries.
*
* Parameters: none
*
* Returns: none
*
*************************************************************************/
void DestroyList(ULONG List)
{
delete (DirList *)List;
}
/**************************************************************************
* Function: UpdateList
*
* Purpose: Relogs files in file list
*
* Parameters: Filespec of files to be logged
*
* Returns: none
*
*************************************************************************/
short UpdateList (ULONG List, String DirName)
{
return (((DirList *)List)->RefreshList(DirName));
}
/**************************************************************************
* Function: ListLen
*
* Purpose: Get number of items in the list
*
* Parameters: none
*
* Returns: number of items in list
*
*************************************************************************/
short ListLen(ULONG List)
{
return(((DirList *)List)->GetCount());
}
/**************************************************************************
* Function: ReadList
*
* Purpose: Get specified list item
*
* Parameters: Index - index of item in list to be retrieved
*
* Returns: Filename as a String
*
*************************************************************************/
String ReadList (ULONG List, short Item)
{
return *((DirList *)List)->ReadItem(Item);
}