home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / VISBUILD / RAPSHEET / CPPOV23 / IALSRMGR.HPP < prev    next >
Text File  |  1995-05-17  |  7KB  |  168 lines

  1. #ifndef _IALSRMGR_
  2. #define _IALSRMGR_
  3. //****************************************************************************
  4. // IAliasClientMgr Class - C++ Header File (ialsrmgr.hpp)                    *
  5. //                                                                           *
  6. // COPYRIGHT: Copyright (C) International Business Machines Corp., 1994,1995 *
  7. //                                                                           *
  8. // DISCLAIMER OF WARRANTIES:                                                 *
  9. //   The following [enclosed] code is sample code created by IBM             *
  10. //   Corporation.  This sample code is not part of any standard IBM product  *
  11. //   and is provided to you solely for the purpose of assisting you in the   *
  12. //   development of your applications.  The code is provided "AS IS",        *
  13. //   without warranty of any kind.  IBM shall not be liable for any damages  *
  14. //   arising out of your use of the sample code, even if they have been      *
  15. //   advised of the possibility of such damages.                             *
  16. //****************************************************************************
  17. //NOTE: WE RECOMMEND USING A FIXED-SPACE FONT TO LOOK AT THE SOURCE.
  18. //
  19.  
  20. #include <istdntfy.hpp>               //Parent of IAliasClientMgr
  21. #include <istring.hpp>                //IString header
  22. #include <ivseq.h>                    //IVSequence header
  23. #include "ialias.hpp"                 //IAlias header
  24.  
  25. //Forward declarations of other classes
  26.  
  27. //**************************************************************************
  28. // Class:   IAliasClientMgr
  29. //
  30. // Purpose: Describes IAliasClientMgr
  31. //
  32. //**************************************************************************
  33. class _Export IAliasClientMgr : public IStandardNotifier
  34. {
  35.  
  36. public:
  37. /*---------------------  CONSTRUCTORS/DESTRUCTORS  ----------------
  38.  *-----------------------------------------------------------------*/
  39. IAliasClientMgr ();
  40. virtual  ~IAliasClientMgr ();
  41.  
  42.  
  43. /*---------------------  NOTIFICATION EVENTS  ----------------------
  44.  | These INotificationId strings are used for all notifications that IWindow
  45.  | provides to its observers:
  46.  |     -parseResultId      Notification identifier provided to
  47.  |                         observers when the parsing of dResultBuffer
  48.  |                         has completed.
  49.  |     -resultBufferId     Notification identifier provided to
  50.  |                         observers when the resultBuffer attribute
  51.  |                         changes.
  52.  |     -resultListId       Notification identifier provided to
  53.  |                         observers when the resultList attribute
  54.  |                         changes.
  55.  |     -resultObjectId     Notification identifier provided to
  56.  |                         observers when the resultObject attribute
  57.  |                         changes.
  58.  |     -resultWrapperId    Notification identifier provided to
  59.  |                         observers when the resultWrapper attribute
  60.  |                         changes.
  61.  *-----------------------------------------------------------------*/
  62. static INotificationId parsedResultId;
  63. static INotificationId requestBufferId;
  64. static INotificationId resultBufferId;
  65. static INotificationId resultListId;
  66. //temporarily added resultListWrapperId
  67. static INotificationId resultListWrapperId;
  68. static INotificationId resultObjectId;
  69. static INotificationId resultWrapperId;
  70. static INotificationId sameRequestId;
  71. static INotificationId manyObjectsFoundId;
  72. static INotificationId noObjectsFoundId;
  73. static INotificationId oneObjectFoundId;
  74.  
  75.  
  76. /*---------------------  ATTRIBUTES  -------------------------------
  77.  | The following members are for accessing the attributes of this class:
  78.  |     -resultBuffer       Returns the resultBuffer attribute.
  79.  |     -resultList         Returns resultList attribute, which
  80.  |                         represents the list of alias objects
  81.  |                         that were created via parsing the
  82.  |                         resultBuffer attribute.
  83.  |     -resultObject       Returns the resultObject attribute, which
  84.  |                         represents the first alias object parsed
  85.  |                         from the resultBuffer attribute.
  86.  |     -resultWrapper      Returns a pointer to the resultObject
  87.  |                         attribute.
  88.  |     -setResultBuffer    Sets the resultBuffer attribute.
  89.  |                         NOTE: the IString passed in should map to
  90.  |                               an IResultRecord, where the resultData
  91.  |                               of the IResultRecord represents zero
  92.  |                               or more alias records (IAliasRecord).
  93.  |                               numResults of the IResultRecord must
  94.  |                               indicate how many alias records
  95.  |                               resultData contains.
  96.  *-----------------------------------------------------------------*/
  97. virtual IString
  98.   requestBuffer () const;
  99. virtual IString
  100.   resultBuffer () const;
  101. virtual IVSequence <IAlias *>
  102.   resultList () const;
  103. virtual IVSequence <IAlias *> * 
  104.   resultListWrapper () const;
  105. virtual IAlias
  106.   resultObject () const;
  107. virtual IAlias *
  108.   resultWrapper () const;
  109. virtual IAliasClientMgr&
  110.   setRequestBuffer (const IString & iRequestBuffer);
  111. virtual IAliasClientMgr&
  112.   setResultBuffer (const IString & iResultBuffer);
  113.  
  114.  
  115. /*---------------------  ACTIONS   --------------------------------- 
  116.  | allByBookNumber()  Retrieves from the database a list of aliases
  117.  |                    for a given suspect.
  118.  | processResult()    Creates a list of adddress objects by parsing
  119.  |                    information contained in the resultBuffer
  120.  |                    attribute.
  121.  *-----------------------------------------------------------------*/
  122. virtual IString 
  123.    allByBookNumber (unsigned long aBookNumber);
  124. virtual IAliasClientMgr &
  125.    processResult();
  126.  
  127.  
  128. /*---------------------  OPERATORS   -------------------------------
  129.  *-----------------------------------------------------------------*/
  130.  
  131.  
  132. protected:
  133. /*---------------------  ENUMERATED TYPES  ------------------------
  134.  *-----------------------------------------------------------------*/
  135.  
  136. /*---------------------  PROTECTED SERVICES  ----------------------
  137. | These operations or services provided by this class:
  138. -------------------------------------------------------------------*/
  139.  
  140.  
  141. private:
  142. /*---------------------  PRIVATE MEMBER DATA  ---------------------
  143.  *-----------------------------------------------------------------*/
  144.   IString dRequestBuffer;
  145.   IString dResultBuffer;
  146.   IAlias *dResultWrapper;
  147.   IVSequence <IAlias *> *dResultListWrapper;
  148.  
  149. /*---------------------  PRIVATE SERVICES  -------------------------
  150. | These operations or services provided by this class:
  151. |    addResult()              adds an Alias object's pointer to
  152. |                             the result list.
  153. |    setResultWrapper()       sets the dResultList member data.
  154. -------------------------------------------------------------------*/
  155. IAliasClientMgr & IAliasClientMgr ::
  156.   addResult(IAlias * iAlias);
  157. IAliasClientMgr & IAliasClientMgr ::
  158.   addResult(IAlias & iAlias);
  159.  
  160. IAliasClientMgr&
  161.   setResultWrapper (IAlias * iResultWrapper);
  162. IAliasClientMgr&
  163.   setResultWrapper (const IAlias & iResult);
  164.  
  165. };
  166.  
  167. #endif
  168.