home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / dn511.exe / SEARCH.H < prev    next >
C/C++ Source or Header  |  1994-09-29  |  2KB  |  68 lines

  1. /*
  2. ** FILE: SEARCH.H
  3. ** PROG: UEXPORT.EXE
  4. ** DATE: September 1994
  5. ** NAME: John Buckle
  6. **
  7. **    Declaration of the SearchUserClass class.
  8. */
  9.  
  10. # ifndef  Search_H
  11. # define  Search_H
  12.  
  13. # include <nwnet.h>
  14.  
  15. class DSBuffer ;
  16. class DSValue ;
  17. class Control ;
  18. class ostream ;
  19.  
  20. /*
  21. ** Class DSSearch
  22. **
  23. **    Used to interface the function DSContext::searchObjects() with other classes.
  24. **    Class can be derived from DSSearch to overrided the virtual functions so
  25. **    that the results of DSContext::searchObjects() can be processed.
  26. */
  27.  
  28. class DSSearch
  29. {
  30. public:
  31.             DSSearch() { ; }
  32. virtual              ~    DSSearch() { ; }
  33. virtual    NWDSCCODE    readObjectName(char *, NWCOUNT, NWOBJECT_INFO *)    { return 0 ; }
  34. virtual    NWDSCCODE    readAttrValue (char *, NWCOUNT, DSValue * )        { return 0 ; }
  35. virtual    NWDSCCODE    saveObjectName(char *)                    { return 0 ; }
  36. virtual    NWDSCCODE    initSearch (DSBuffer *)                    { return 0 ; }
  37. virtual    NWDSCCODE    exitSearch ()                        { return 0 ; }
  38. } ;
  39.  
  40. /*
  41. ** Class SearchUserClass
  42. **
  43. **    Used to interface the function Context::searchObjects() with the class Control.
  44. **    The contructor for SearchUserClass takes a reference to a Control class and a
  45. **    ofstream to output the data returned from Context::searchObjects().
  46. */
  47.  
  48. class SearchUserClass : public DSSearch
  49. {
  50.     NWDSCCODE    Status ;
  51.     Control *    control ;
  52.     ostream *    stream ;
  53.     int        inUse ;
  54. public:
  55.             SearchUserClass(Control * c, ostream * s)
  56.             : DSSearch()            { control = c ; stream = s ; }
  57.               ~    SearchUserClass() { ; }
  58.  
  59.     NWDSCCODE    status()            { return Status  ; }
  60.     NWDSCCODE    reset ()            { return Status = 0 ; }
  61.  
  62.     NWDSCCODE    readAttrValue (char * name, NWCOUNT count, DSValue * data) ;
  63.     NWDSCCODE    saveObjectName(char * name) ;
  64.     NWDSCCODE    initSearch(DSBuffer * buffer) ;
  65.     NWDSCCODE    exitSearch() ;
  66. } ;
  67.  
  68. # endif Search_H