home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / fmi.idl < prev    next >
Text File  |  1999-02-22  |  4KB  |  120 lines

  1. //
  2. //   COMPONENT_NAME: somp
  3. //
  4. //   ORIGINS: 27
  5. //
  6. //
  7. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996 
  8. //   All Rights Reserved
  9. //   Licensed Materials - Property of IBM
  10. //   US Government Users Restricted Rights - Use, duplication or
  11. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  12. //
  13. //#  @(#) 2.9 src/somp/fmi.idl, somp, som2.1 12/26/95 16:54:13 [7/30/96 14:46:49]
  14.  
  15.  
  16. #ifndef fmi_idl
  17. #define fmi_idl
  18.  
  19. #include <somp.idl>
  20. #include <fma.idl>
  21. #include <somperrd.idl>
  22. #include <sompstad.idl> /* stat */
  23.  
  24. interface SOMPAsciiMediaInterface : SOMPFileMediaAbstract
  25.  
  26. // The AsciiMediaInterface class is responsible for providing the
  27. // interface to the file system. The numeric data it writes is in
  28. // ASCII format.
  29.  
  30. {
  31. typedef struct mediaFlags_Type {
  32.   octet  open_for_read;                 /* 1=read only                       */
  33.   octet  open_for_readwrite;            /* 1=read/write                      */
  34.   octet  create_if_nonexistent;         /* 1=create if file nonexistent      */
  35.   octet  share;                         /* 1=allow multiple readers          */
  36. } mediaFlagsType;
  37.  
  38. typedef struct mediaInfo_Type {
  39.   string Name;                          /* file name                         */
  40.   mediaFlagsType Flags;                 /* flags, see mediaFlagsType         */
  41.   unsigned short unix_file_permissions; /* file permissions (unused on OS/2) */
  42. } mediaInfoType;
  43.  
  44.    void sompInitSpecific(inout mediaInfoType mediaInfo);
  45. // Initialize MediaInterface with specific permissions and/or flags.
  46.  
  47.    void sompStat(inout SOMPStatDef::sompstat fileStats) raises (SOMPError::sompException);
  48. // Fills the stat structure for the file associated with this object.
  49.  
  50.  
  51.    unsigned long sompQueryBlockSize();
  52. // This method returns an optimal block size for I/O operations. This
  53. // method would likely be called prior to allocating a buffer to be used
  54. // for reading/writing.
  55.  
  56.    string sompGetMediaName (in string toBuffer);
  57. // Puts the name of the file for the fmi object into toBuffer and returns
  58. // the address of the buffer.  The buffer must be allocated (and freed)
  59. // by the client.
  60.  
  61. #ifdef __SOMIDL__
  62.  
  63. implementation
  64. {
  65.    callstyle=idl;
  66.    dllname="somp.dll";
  67.  
  68.    releaseorder: sompStat, sompTruncate, sompQueryBlockSize, sompGetMediaName,
  69.          sompInitSpecific;
  70.  
  71. // Class Modifiers
  72.    majorversion = 2;
  73.    minorversion = 1;
  74.    filestem = fmi;
  75.  
  76.  
  77. // Method Modifiers
  78.    sompInitReadWrite: override;
  79.    sompInitReadOnly: override;
  80.    sompOpen: override;
  81.    sompClose: override;
  82.    sompSeekPosition: override;
  83.    sompSeekPositionRel: override;
  84.    sompGetOffset: override;
  85.    sompReadBytes: override;
  86.    sompWriteBytes: override;
  87.    somInit: override;
  88.    somUninit: override;
  89.    sompWriteOctet: override;
  90.    sompWriteShort: override;
  91.    sompWriteUnsignedShort: override;
  92.    sompWriteLong: override;
  93.    sompWriteUnsignedLong: override;
  94.    sompWriteDouble: override;
  95.    sompWriteFloat: override;
  96.    sompWriteCharacter: override;
  97.    sompWriteSomobject: override;
  98.    sompWriteString: override;
  99.    sompReadOctet: override;
  100.    sompReadShort: override;
  101.    sompReadUnsignedShort: override;
  102.    sompReadLong: override;
  103.    sompReadUnsignedLong: override;
  104.    sompReadDouble: override;
  105.    sompReadFloat: override;
  106.    sompReadCharacter: override;
  107.    sompReadSomobject: override;
  108.    sompReadString: override;
  109.    sompReadStringToBuffer: override;
  110.    sompWriteLine: override;
  111.    sompReadLine: override;
  112.    sompWriteTypeCode: override;
  113.    sompReadTypeCode: override;
  114.  
  115. };
  116. #endif /* __SOMIDL__ */
  117. };
  118.  
  119. #endif  /* fmi_idl */
  120.