home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xwplascr.zip / XWPL0208.ZIP / idl / xtrashobj.idl < prev    next >
Text File  |  2002-07-15  |  5KB  |  197 lines

  1.  
  2. /*
  3.  * xtrashobj.idl:
  4.  *      SOM interface description file for the following
  5.  *      XWorkplace classes (in this order):
  6.  *
  7.  *      --  XWPTrashObject: a subclass of WPTransient. One instance
  8.  *                          of this class is created by XWPTrashCan
  9.  *                          for every object that was placed into
  10.  *                          the trash can.
  11.  *
  12.  *      See src\classes\xtrashobj.c for details.
  13.  *
  14.  *      Copyright (C) 1999-2002 Ulrich Möller.
  15.  *      This file is part of the XWorkplace source package.
  16.  *      XWorkplace is free software; you can redistribute it and/or modify
  17.  *      it under the terms of the GNU General Public License as published
  18.  *      by the Free Software Foundation, in version 2 as it comes in the
  19.  *      "COPYING" file of the XWorkplace main distribution.
  20.  *      This program is distributed in the hope that it will be useful,
  21.  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
  22.  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  23.  *      GNU General Public License for more details.
  24.  */
  25.  
  26. #include <xtrash.idl>           // XWPTrashCan
  27. #include <wptrans.idl>          // this is SOM for WPTransient
  28.  
  29. /*
  30.    CLASS: XWPTrashObject
  31.  
  32.    CLASS HIERARCHY:
  33.  
  34.        SOMObject
  35.          └── WPObject [ = XFldObject ]
  36.                └── WPTransient
  37.                      └── XWPTrashObject
  38. */
  39.  
  40. interface M_XWPTrashObject;            // forward reference to metaclass
  41.  
  42. interface XWPTrashObject : WPTransient
  43. {
  44.  
  45.     /*
  46.      * New instance methods for XWPTrashObject:
  47.      *
  48.      */
  49.  
  50.     BOOL xwpSetRelatedObject(in WPObject pObject);
  51.     WPObject xwpQueryRelatedObject();
  52.     PSZ xwpQueryRelatedPath();
  53.     VOID xwpSetExpandedObjectSize(in ULONG ulNewSize,
  54.                                   in XWPTrashCan pTrashCan);
  55.     ULONG xwpQueryRelatedSize();
  56.     ULONG xwpValidateTrashObject();
  57.     BOOL xwpRestoreFromTrashCan(in WPFolder pTargetFolder);
  58.  
  59. #ifdef __SOMIDL__
  60.   implementation {
  61.  
  62.     releaseorder:
  63.             xwpSetRelatedObject,
  64.             xwpQueryRelatedObject,
  65.             xwpQueryRelatedPath,
  66.             xwpSetExpandedObjectSize,
  67.             xwpQueryRelatedSize,
  68.             xwpValidateTrashObject,
  69.             xwpRestoreFromTrashCan;
  70.  
  71.     /*
  72.      * Class Modifiers:
  73.      *
  74.      */
  75.  
  76.     externalprefix = xtro_;
  77.     externalstem = xtro;
  78.     majorversion = 1;
  79.     minorversion = 1;
  80.     filestem = xtrashobj;           //# specifies the filestem for sc-generated files
  81.     metaclass = M_XWPTrashObject;
  82.     dllname = "xfldr.dll";
  83.     callstyle = oidl;           //# forget CORBA stuff (*ev and such)
  84.  
  85.     /*
  86.      * Internal instance variables for XWPTrashObject:
  87.      *
  88.      */
  89.  
  90.     WPObject pRelatedObject;    // related object in "\Trash" directories
  91.                                 // (xwpQueryRelatedObject)
  92.     PSZ      pszSourcePath;     // where the related object was deleted from
  93.                                 // (xwpQuerySourcePath)
  94.     ULONG    ulTotalSize;       // total size of object;
  95.                                 // this is 0 for non-file-system objects,
  96.                                 // but calculated on the File thread if we
  97.                                 // have a folder and will then include all
  98.                                 // subfolders;
  99.                                 // if it's a regular file, it's its size
  100.  
  101.     CHAR     szTotalSize[30];   // string with total size; initially, this
  102.                                 // is set to "calculating"
  103.  
  104.     /*
  105.      * WPTransient methods overridden by XWPTrashObject:
  106.      *
  107.      */
  108.  
  109.     wpInitData: override;
  110.     wpUnInitData: override;
  111.  
  112.     wpSetupOnce: override;
  113.  
  114.     wpQueryIcon: override;
  115.     wpQueryDetailsData: override;
  116.  
  117.     wpFilterPopupMenu: override;
  118.     wpModifyPopupMenu: override;
  119.     wpMenuItemSelected: override;
  120.     wpMenuItemHelpSelected: override;
  121.  
  122. //#    wpQueryDefaultHelp: override;    replaced with class method V0.9.20 (2002-07-12) [umoeller]
  123.  
  124.     wpMoveObject: override;
  125.  
  126.     wpOpen: override;
  127.  
  128.     wpDragOver: override;
  129.     wpDrop: override;
  130.  
  131. #ifdef __PRIVATE__
  132.  
  133. #endif
  134.  
  135.   }; // implementation
  136. #endif /* __SOMIDL__ */
  137. };
  138.  
  139. //#
  140. //#
  141. //# Now define Metaclass.
  142. //# ---------------------
  143. //#
  144.  
  145. interface M_XWPTrashObject : M_WPTransient
  146. {
  147.  
  148.     /*
  149.      * New class methods for M_XWPTrashObject:
  150.      *
  151.      */
  152.  
  153. #ifdef __SOMIDL__
  154.   implementation {
  155.  
  156.     /* releaseorder:
  157.             xwpclsCreateTrashObject; */
  158.  
  159.     /*
  160.      * Class Modifiers:
  161.      *
  162.      */
  163.  
  164.     externalprefix = xtroM_;
  165.     externalstem = xtroM;
  166.     functionprefix = xtroM_;
  167.     majorversion = 1;
  168.     minorversion = 1;
  169.     filestem = xtrashobj;           //# specifies the filestem for sc-generated files
  170.     dllname = "xfldr.dll";
  171.     callstyle = oidl;
  172.  
  173.     /*
  174.      * Internal instance variables for M_XWPTrashObject:
  175.      *
  176.      */
  177.  
  178.     /*
  179.      * M_WPTransient methods overridden by M_XWPTrashObject:
  180.      *
  181.      */
  182.  
  183.     wpclsInitData: override;
  184.  
  185.     wpclsCreateDefaultTemplates: override;
  186.  
  187.     wpclsQueryDetailsInfo: override;
  188.     wpclsQueryTitle: override;
  189.     wpclsQueryStyle: override;
  190.     wpclsQueryDefaultHelp: override;
  191.  
  192.   };
  193. #endif /* __SOMIDL__ */
  194. };
  195.  
  196.  
  197.