1 /****************************************************************************
3 * $Id: rmafiles.h 7 2003-05-30 02:18:02Z gabest $
5 * Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved..
7 * http://www.real.com/devzone
9 * This program contains proprietary
10 * information of Progressive Networks, Inc, and is licensed
11 * subject to restrictions on use and distribution.
14 * RealMedia Architecture File Format and File System Plug-in Interfaces.
22 * Forward declarations of some interfaces defined here-in.
24 typedef _INTERFACE IRMAFileObject IRMAFileObject
;
25 typedef _INTERFACE IRMAFileResponse IRMAFileResponse
;
26 typedef _INTERFACE IRMAFileSystemObject IRMAFileSystemObject
;
27 typedef _INTERFACE IRMAFileStat IRMAFileStat
;
28 typedef _INTERFACE IRMAFileStatResponse IRMAFileStatResponse
;
30 typedef _INTERFACE IRMAFileSystemManager IRMAFileSystemManager
;
31 typedef _INTERFACE IRMAFileSystemManagerResponse IRMAFileSystemManagerResponse
;
32 typedef _INTERFACE IRMAFileExists IRMAFileExists
;
33 typedef _INTERFACE IRMAFileExistsResponse IRMAFileExistsResponse
;
34 typedef _INTERFACE IRMAFileMimeMapper IRMAFileMimeMapper
;
35 typedef _INTERFACE IRMAFileMimeMapperResponse IRMAFileMimeMapperResponse
;
36 typedef _INTERFACE IRMABroadcastMapper IRMABroadcastMapper
;
37 typedef _INTERFACE IRMABroadcastMapperResponse IRMABroadcastMapperResponse
;
38 typedef _INTERFACE IRMAGetFileFromSamePoolResponse IRMAGetFileFromSamePoolResponse
;
39 typedef _INTERFACE IRMABuffer IRMABuffer
;
40 typedef _INTERFACE IRMAPacket IRMAPacket
;
41 typedef _INTERFACE IRMAValues IRMAValues
;
42 typedef _INTERFACE IRMAMetaCreation IRMAMetaCreation
;
44 typedef _INTERFACE IRMAAuthenticator IRMAAuthenticator
;
45 typedef _INTERFACE IRMARequest IRMARequest
;
46 typedef _INTERFACE IRMAFileRename IRMAFileRename
;
47 typedef _INTERFACE IRMADirHandler IRMADirHandler
;
48 typedef _INTERFACE IRMADirHandlerResponse IRMADirHandlerResponse
;
49 typedef _INTERFACE IRMAFileRemove IRMAFileRemove
;
53 /****************************************************************************
57 * Flags for opening file objects
59 #define PN_FILE_READ 1
60 #define PN_FILE_WRITE 2
61 #define PN_FILE_BINARY 4
62 #define PN_FILE_NOTRUNC 8
65 /****************************************************************************
69 * Flags for file object Advise method
71 #define RMA_FILEADVISE_RANDOMACCESS 1
74 #if defined(_UNIX) || defined(_WINDOWS)
77 * This is a subset of standard stat()/fstat() values that both Unix and
78 * Windows support (or at least define).
80 * These flags are returned from IRMAFileStatResponse::StatDone() in the
83 #define PN_S_IFMT S_IFMT
84 #define PN_S_IFDIR S_IFDIR
85 #define PN_S_IFCHR S_IFCHR
86 #define PN_S_IFIFO S_IFIFO
87 #define PN_S_IFREG S_IFREG
90 #define PN_S_IFMT 0170000
91 #define PN_S_IFDIR 0040000
92 #define PN_S_IFCHR 0020000
93 #define PN_S_IFIFO 0010000
94 #define PN_S_IFREG 0100000
98 /****************************************************************************
106 * Object that exports file control API
108 * IID_IRMAFileObject:
110 * {00000200-0901-11d1-8B06-00A024406D59}
113 DEFINE_GUID(IID_IRMAFileObject
, 0x00000200, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
114 0xa0, 0x24, 0x40, 0x6d, 0x59);
117 #define INTERFACE IRMAFileObject
119 DECLARE_INTERFACE_(IRMAFileObject
, IUnknown
)
124 STDMETHOD(QueryInterface
) (THIS_
128 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
130 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
133 * IRMAFileObject methods
136 /************************************************************************
138 * IRMAFileObject::Init
140 * Associates a file object with the file response object it should
141 * notify of operation completness. This method should also check
142 * for validity of the object (for example by opening it if it is
145 STDMETHOD(Init
) (THIS_
146 ULONG32
/*IN*/ ulFlags
,
147 IRMAFileResponse
* /*IN*/ pFileResponse
) PURE
;
149 /************************************************************************
151 * IRMAFileObject::GetFilename
153 * Returns the filename (without any path information) associated
154 * with a file object.
156 * Note: The returned pointer's lifetime expires as soon as the
157 * caller returns from a function which was called from the RMA
158 * core (i.e. when you return control to the RMA core)
161 STDMETHOD(GetFilename
) (THIS_
162 REF(const char*) /*OUT*/ pFilename
) PURE
;
164 /************************************************************************
166 * IRMAFileObject::Close
168 * Closes the file resource and releases all resources associated
171 STDMETHOD(Close
) (THIS
) PURE
;
173 /************************************************************************
175 * IRMAFileObject::Read
177 * Reads a buffer of data of the specified length from the file
178 * and asynchronously returns it to the caller via the
179 * IRMAFileResponse interface passed in to Init.
181 STDMETHOD(Read
) (THIS_
182 ULONG32 ulCount
) PURE
;
184 /************************************************************************
186 * IRMAFileObject::Write
188 * Writes a buffer of data to the file and asynchronously notifies
189 * the caller via the IRMAFileResponse interface passed in to Init,
190 * of the completeness of the operation.
192 STDMETHOD(Write
) (THIS_
193 IRMABuffer
* pBuffer
) PURE
;
195 /************************************************************************
197 * IRMAFileObject::Seek
199 * Seeks to an offset in the file and asynchronously notifies
200 * the caller via the IRMAFileResponse interface passed in to Init,
201 * of the completeness of the operation.
202 * If the bRelative flag is TRUE, it is a relative seek; else
205 STDMETHOD(Seek
) (THIS_
207 BOOL bRelative
) PURE
;
209 /************************************************************************
211 * IRMAFileObject::Advise
213 * To pass information to the File Object advising it about usage
216 STDMETHOD(Advise
) (THIS_
217 ULONG32 ulInfo
) PURE
;
221 /****************************************************************************
229 * Object that exports file response API
231 * IID_IRMAFileResponse:
233 * {00000201-0901-11d1-8B06-00A024406D59}
236 DEFINE_GUID(IID_IRMAFileResponse
, 0x00000201, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
237 0xa0, 0x24, 0x40, 0x6d, 0x59);
240 #define INTERFACE IRMAFileResponse
242 DECLARE_INTERFACE_(IRMAFileResponse
, IUnknown
)
247 STDMETHOD(QueryInterface
) (THIS_
251 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
253 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
256 * IRMAFileResponse methods
259 /************************************************************************
261 * IRMAFileResponse::InitDone
263 * Notification interface provided by users of the IRMAFileObject
264 * interface. This method is called by the IRMAFileObject when the
265 * initialization of the file is complete. If the file is not valid
266 * for the file system, the status PNR_FAILED should be
269 STDMETHOD(InitDone
) (THIS_
270 PN_RESULT status
) PURE
;
272 /************************************************************************
274 * IRMAFileResponse::CloseDone
276 * Notification interface provided by users of the IRMAFileObject
277 * interface. This method is called by the IRMAFileObject when the
278 * close of the file is complete.
280 STDMETHOD(CloseDone
) (THIS_
281 PN_RESULT status
) PURE
;
283 /************************************************************************
285 * IRMAFileResponse::ReadDone
287 * Notification interface provided by users of the IRMAFileObject
288 * interface. This method is called by the IRMAFileObject when the
289 * last read from the file is complete and a buffer is available.
291 STDMETHOD(ReadDone
) (THIS_
293 IRMABuffer
* pBuffer
) PURE
;
295 /************************************************************************
297 * IRMAFileResponse::WriteDone
299 * Notification interface provided by users of the IRMAFileObject
300 * interface. This method is called by the IRMAFileObject when the
301 * last write to the file is complete.
303 STDMETHOD(WriteDone
) (THIS_
304 PN_RESULT status
) PURE
;
306 /************************************************************************
308 * IRMAFileResponse::SeekDone
310 * Notification interface provided by users of the IRMAFileObject
311 * interface. This method is called by the IRMAFileObject when the
312 * last seek in the file is complete.
314 STDMETHOD(SeekDone
) (THIS_
315 PN_RESULT status
) PURE
;
319 /****************************************************************************
323 * IRMAFileSystemObject
327 * Object that allows a Controller to communicate with a specific
328 * File System plug-in session
330 * IID_IRMAFileSystemObject:
332 * {00000202-0901-11d1-8B06-00A024406D59}
335 DEFINE_GUID(IID_IRMAFileSystemObject
, 0x00000202, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
336 0xa0, 0x24, 0x40, 0x6d, 0x59);
339 #define INTERFACE IRMAFileSystemObject
341 DECLARE_INTERFACE_(IRMAFileSystemObject
, IUnknown
)
346 STDMETHOD(QueryInterface
) (THIS_
350 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
352 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
355 * IRMAFileSystemObject methods
358 /************************************************************************
360 * IRMAFileSystemObject::GetFileSystemInfo
362 * Returns information vital to the instantiation of file system
365 * pShortName should be a short, human readable name in the form
366 * of "company-fsname". For example: pShortName = "pn-local".
368 STDMETHOD(GetFileSystemInfo
) (THIS_
369 REF(const char*) /*OUT*/ pShortName
,
370 REF(const char*) /*OUT*/ pProtocol
) PURE
;
372 STDMETHOD(InitFileSystem
) (THIS_
373 IRMAValues
* pOptions
) PURE
;
375 STDMETHOD(CreateFile
) (THIS_
376 IUnknown
** /*OUT*/ ppFileObject
) PURE
;
379 * The following method is deprecated and should return PNR_NOTIMPL
382 STDMETHOD(CreateDir
) (THIS_
383 IUnknown
** /*OUT*/ ppDirObject
) PURE
;
388 /****************************************************************************
396 * Gets information about a specific File object
400 * {00000205-0901-11d1-8B06-00A024406D59}
403 DEFINE_GUID(IID_IRMAFileStat
, 0x00000205, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
404 0xa0, 0x24, 0x40, 0x6d, 0x59);
407 #define INTERFACE IRMAFileStat
409 DECLARE_INTERFACE_(IRMAFileStat
, IUnknown
)
414 STDMETHOD(QueryInterface
) (THIS_
418 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
420 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
423 * IRMAFileStat methods
426 STDMETHOD(Stat
) (THIS_
427 IRMAFileStatResponse
* pFileStatResponse
432 /****************************************************************************
436 * IRMAFileStatResponse
440 * Returns information about a specific File object
442 * IID_IRMAFileStatResponse:
444 * {00000206-0901-11d1-8B06-00A024406D59}
447 DEFINE_GUID(IID_IRMAFileStatResponse
, 0x00000206, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
448 0xa0, 0x24, 0x40, 0x6d, 0x59);
451 #define INTERFACE IRMAFileStatResponse
453 DECLARE_INTERFACE_(IRMAFileStatResponse
, IUnknown
)
458 STDMETHOD(QueryInterface
) (THIS_
462 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
464 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
467 * IRMAFileStat methods
470 STDMETHOD(StatDone
) (THIS_
473 UINT32 ulCreationTime
,
475 UINT32 ulModificationTime
,
480 /****************************************************************************
484 * IRMAFileSystemManager
488 * Gives out File Objects based on URLs
490 * IID_IRMAFileSystemManager:
492 * {00000207-0901-11d1-8B06-00A024406D59}
495 DEFINE_GUID(IID_IRMAFileSystemManager
, 0x00000207, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
496 0xa0, 0x24, 0x40, 0x6d, 0x59);
499 #define INTERFACE IRMAFileSystemManager
501 #define CLSID_IRMAFileSystemManager IID_IRMAFileSystemManager
503 DECLARE_INTERFACE_(IRMAFileSystemManager
, IUnknown
)
508 STDMETHOD(QueryInterface
) (THIS_
512 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
514 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
517 * IRMAFileSystemManager methods
520 STDMETHOD(Init
) (THIS_
521 IRMAFileSystemManagerResponse
* /*IN*/ pFileManagerResponse
524 /* GetFileObject attempts to locate an existing file via the DoesExist
525 * method in each file system's objects, and returns that object through
526 * FSManagerResponse->FileObjectReady
528 STDMETHOD(GetFileObject
) (THIS_
529 IRMARequest
* pRequest
,
530 IRMAAuthenticator
* pAuthenticator
) PURE
;
532 /* GetNewFileObject is similar to GetFileObject except that no DoesExist
533 * checks are done. The first file system that matches the mount point
534 * or protocol for the path in the request object creates the file
535 * which is then returned through FileObjectReady. This is especially
536 * useful for those who wish to open a brand new file for writing.
538 STDMETHOD(GetNewFileObject
) (THIS_
539 IRMARequest
* pRequest
,
540 IRMAAuthenticator
* pAuthenticator
) PURE
;
542 STDMETHOD(GetRelativeFileObject
) (THIS_
543 IUnknown
* pOriginalObject
,
544 const char* pPath
) PURE
;
547 * The following method is deprecated and should return PNR_NOTIMPL
550 STDMETHOD(GetDirObjectFromURL
) (THIS_
551 const char* pURL
) PURE
;
555 /****************************************************************************
559 * IRMAFileSystemManagerResponse
563 * Gives out File System objects based on URLs
565 * IID_IRMAFileSystemManagerResponse:
567 * {00000208-0901-11d1-8B06-00A024406D59}
570 DEFINE_GUID(IID_IRMAFileSystemManagerResponse
, 0x00000208, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
571 0xa0, 0x24, 0x40, 0x6d, 0x59);
574 #define INTERFACE IRMAFileSystemManagerResponse
576 DECLARE_INTERFACE_(IRMAFileSystemManagerResponse
, IUnknown
)
581 STDMETHOD(QueryInterface
) (THIS_
585 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
587 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
590 * IRMAFileSystemManagerResponse methods
593 /************************************************************************
595 * IRMAFileSystemManagerResponse::InitDone
598 STDMETHOD(InitDone
) (THIS_
599 PN_RESULT status
) PURE
;
601 STDMETHOD(FileObjectReady
) (THIS_
603 IUnknown
* pObject
) PURE
;
606 * The following method is deprecated and should return PNR_NOTIMPL
609 STDMETHOD(DirObjectReady
) (THIS_
611 IUnknown
* pDirObject
) PURE
;
615 /****************************************************************************
623 * Checks for the existense of a file. Must be implemented.
625 * IID_IRMAFileExists:
627 * {00000209-0901-11d1-8B06-00A024406D59}
630 DEFINE_GUID(IID_IRMAFileExists
, 0x00000209, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
631 0xa0, 0x24, 0x40, 0x6d, 0x59);
634 #define INTERFACE IRMAFileExists
636 DECLARE_INTERFACE_(IRMAFileExists
, IUnknown
)
641 STDMETHOD(QueryInterface
) (THIS_
645 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
647 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
650 * IRMAFileExists methods
653 /************************************************************************
655 * IRMAFileExists::DoesExist
658 STDMETHOD(DoesExist
) (THIS_
659 const char* /*IN*/ pPath
,
660 IRMAFileExistsResponse
* /*IN*/ pFileResponse
) PURE
;
664 /****************************************************************************
668 * IRMAFileExistsResponse
672 * Response interface for IRMAFileExists. Must be implemented.
674 * IID_IRMAFileExistsResponse:
676 * {0000020A-0901-11d1-8B06-00A024406D59}
679 DEFINE_GUID(IID_IRMAFileExistsResponse
, 0x0000020a, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
680 0xa0, 0x24, 0x40, 0x6d, 0x59);
683 #define INTERFACE IRMAFileExists
685 DECLARE_INTERFACE_(IRMAFileExistsResponse
, IUnknown
)
690 STDMETHOD(QueryInterface
) (THIS_
694 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
696 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
699 * IRMAFileExistsResponse methods
702 STDMETHOD(DoesExistDone
) (THIS_
707 /****************************************************************************
715 * Allows you to specify a mime type for a specific file.
716 * Optional interface.
718 * IID_IRMAFileMimeMapper:
720 * {0000020B-0901-11d1-8B06-00A024406D59}
723 DEFINE_GUID(IID_IRMAFileMimeMapper
, 0x0000020b, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
724 0xa0, 0x24, 0x40, 0x6d, 0x59);
727 #define INTERFACE IRMAFileMimeMapper
729 DECLARE_INTERFACE_(IRMAFileMimeMapper
, IUnknown
)
734 STDMETHOD(QueryInterface
) (THIS_
738 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
740 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
743 * IRMAFileMimeMapper methods
746 /************************************************************************
748 * IRMAFileMimeMapper::FindMimeType
751 STDMETHOD(FindMimeType
) (THIS_
752 const char* /*IN*/ pURL
,
753 IRMAFileMimeMapperResponse
* /*IN*/ pMimeMapperResponse
758 /****************************************************************************
762 * IRMAFileMimeMapperResponse
766 * Response interface for IRMAFileMimeMapper.
767 * Optional interface.
769 * IID_IRMAFileMimeMapperResponse:
771 * {0000020C-0901-11d1-8B06-00A024406D59}
774 DEFINE_GUID(IID_IRMAFileMimeMapperResponse
, 0x0000020c, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
775 0xa0, 0x24, 0x40, 0x6d, 0x59);
778 #define INTERFACE IRMAFileMimeMapperResponse
780 DECLARE_INTERFACE_(IRMAFileMimeMapperResponse
, IUnknown
)
785 STDMETHOD(QueryInterface
) (THIS_
789 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
791 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
794 * IRMAFileMimeMapperResponse methods
797 /************************************************************************
799 * IRMAFileMimeMapperResponse::MimeTypeFound
801 * Notification interface provided by users of the IRMAFileMimeMapper
802 * interface. This method is called by the IRMAFileObject when the
803 * initialization of the file is complete, and the Mime type is
804 * available for the request file. If the file is not valid for the
805 * file system, the status PNR_FAILED should be returned,
806 * with a mime type of NULL. If the file is valid but the mime type
807 * is unknown, then the status PNR_OK should be returned with
808 * a mime type of NULL.
811 STDMETHOD(MimeTypeFound
) (THIS_
813 const char* pMimeType
) PURE
;
817 /****************************************************************************
821 * IRMABroadcastMapper
825 * Associates a file with a broadcast format plugin.
826 * Implementation only required by broadcast plugin file systems.
828 * IID_IRMABroadcastMapper:
830 * {0000020D-0901-11d1-8B06-00A024406D59}
833 DEFINE_GUID(IID_IRMABroadcastMapper
, 0x0000020d, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
834 0xa0, 0x24, 0x40, 0x6d, 0x59);
837 #define INTERFACE IRMABroadcastMapper
839 DECLARE_INTERFACE_(IRMABroadcastMapper
, IUnknown
)
844 STDMETHOD(QueryInterface
) (THIS_
848 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
850 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
853 * IRMABroadcastMapper methods
856 /************************************************************************
858 * IRMABroadcastMapper::FindBroadcastType
861 STDMETHOD(FindBroadcastType
) (THIS_
862 const char* /*IN*/ pURL
,
863 IRMABroadcastMapperResponse
* /*IN*/ pBroadcastMapperResponse
) PURE
;
867 /****************************************************************************
871 * IRMABroadcastMapperResponse
875 * Response interface for IRMABroadcastMapper.
876 * Implementation only required by broadcast plugin file systems.
878 * IID_IRMABroadcastMapperResponse:
880 * {0000020E-0901-11d1-8B06-00A024406D59}
883 DEFINE_GUID(IID_IRMABroadcastMapperResponse
, 0x0000020e, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
884 0xa0, 0x24, 0x40, 0x6d, 0x59);
887 #define INTERFACE IRMABroadcastMapperResponse
889 DECLARE_INTERFACE_(IRMABroadcastMapperResponse
, IUnknown
)
894 STDMETHOD(QueryInterface
) (THIS_
898 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
900 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
903 * IRMABroadcastMapperResponse methods
906 /************************************************************************
908 * IRMABroadcastMapperResponse::BroadcastTypeFound
910 * Notification interface provided by users of the IRMABroadcastMapper
911 * interface. This method is called by the File Object when the
912 * initialization of the file is complete, and the broadcast type is
913 * available for the request file. If the file is not valid for the
914 * file system, the status PNR_FAILED should be returned,
915 * with the broadcast type set to NULL.
918 STDMETHOD(BroadcastTypeFound
) (THIS_
920 const char* pBroadcastType
) PURE
;
924 /****************************************************************************
928 * IRMAGetFileFromSamePool
932 * Gives out File Objects based on filenames and relative "paths"
934 * IID_IRMAGetFileFromSamePool:
936 * {0000020f-0901-11d1-8B06-00A024406D59}
939 DEFINE_GUID(IID_IRMAGetFileFromSamePool
, 0x0000020f, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
940 0xa0, 0x24, 0x40, 0x6d, 0x59);
942 #define INTERFACE IRMAGetFileFromSamePool
944 #define CLSID_IRMAGetFileFromSamePool IID_IRMAGetFileFromSamePool
946 DECLARE_INTERFACE_(IRMAGetFileFromSamePool
, IUnknown
)
951 STDMETHOD(QueryInterface
) (THIS_
955 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
957 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
961 * IRMAGetFileFromSamePool method
963 /************************************************************************
965 * IRMAGetFileFromSamePool::GetFileObjectFromPool
967 * To get another FileObject from the same pool.
969 STDMETHOD(GetFileObjectFromPool
) (THIS_
970 IRMAGetFileFromSamePoolResponse
*) PURE
;
974 /****************************************************************************
978 * IRMAGetFileFromSamePoolResponse
982 * Gives out File Objects based on filenames and relative "paths"
984 * IID_IRMAGetFileFromSamePoolResponse:
986 * {00000210-0901-11d1-8B06-00A024406D59}
989 DEFINE_GUID(IID_IRMAGetFileFromSamePoolResponse
, 0x00000210, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
990 0xa0, 0x24, 0x40, 0x6d, 0x59);
992 #define INTERFACE IRMAGetFileFromSamePoolResponse
994 #define CLSID_IRMAGetFileFromSamePoolResponse IID_IRMAGetFileFromSamePoolResponse
996 DECLARE_INTERFACE_(IRMAGetFileFromSamePoolResponse
, IUnknown
)
1001 STDMETHOD(QueryInterface
) (THIS_
1003 void** ppvObj
) PURE
;
1005 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
1007 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
1010 * IRMAGetFileFromSamePoolResponse method
1012 /************************************************************************
1014 * IRMAGetFileFromSamePoolResponse::FileObjectReady
1016 * To return another FileObject from the same pool.
1018 STDMETHOD(FileObjectReady
) (THIS_
1020 IUnknown
* ppUnknown
) PURE
;
1024 /****************************************************************************
1028 * IRMAFileAuthenticator
1032 * Set and Get a file object's authenticator object.
1034 * IID_IRMAFileAuthenticator:
1036 * {00000211-0901-11d1-8B06-00A024406D59}
1039 DEFINE_GUID(IID_IRMAFileAuthenticator
, 0x00000211, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
1040 0xa0, 0x24, 0x40, 0x6d, 0x59);
1042 #define INTERFACE IRMAFileAuthenticator
1044 #define CLSID_IRMAFileAuthenticator IID_IRMAFileAuthenticator
1046 DECLARE_INTERFACE_(IRMAFileAuthenticator
, IUnknown
)
1051 STDMETHOD(QueryInterface
) (THIS_
1053 void** ppvObj
) PURE
;
1055 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
1057 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
1060 * IRMAFileAuthenticator methods
1062 STDMETHOD(SetAuthenticator
) (THIS_
1063 IRMAAuthenticator
* pAuthenticator
) PURE
;
1065 STDMETHOD(GetAuthenticator
) (THIS_
1066 REF(IRMAAuthenticator
*) pAuthenticator
) PURE
;
1070 /****************************************************************************
1074 * IRMARequestHandler
1078 * Object to manage IRMARequest objects
1080 * IID_IRMARequestHandler:
1082 * {00000212-0901-11d1-8B06-00A024406D59}
1085 DEFINE_GUID(IID_IRMARequestHandler
, 0x00000212, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
1086 0xa0, 0x24, 0x40, 0x6d, 0x59);
1088 #define INTERFACE IRMARequestHandler
1090 #define CLSID_IRMARequestHandler IID_IRMARequestHandler
1092 DECLARE_INTERFACE_(IRMARequestHandler
, IUnknown
)
1098 STDMETHOD(QueryInterface
) (THIS_
1100 void** ppvObj
) PURE
;
1102 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
1104 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
1106 /************************************************************************
1108 * IRMARequestHandler::SetRequest
1110 * Associates an IRMARequest with an object
1112 STDMETHOD(SetRequest
) (THIS_
1113 IRMARequest
* /*IN*/ pRequest
) PURE
;
1115 /************************************************************************
1117 * IRMARequestHandler::GetRequest
1119 * Gets the IRMARequest object associated with an object
1121 STDMETHOD(GetRequest
) (THIS_
1122 REF(IRMARequest
*) /*OUT*/ pRequest
) PURE
;
1127 /****************************************************************************
1131 * IRMARequestContext
1135 * Object to manage the context of the Request
1137 * IID_IRMARequestContext:
1139 * {00000217-0901-11d1-8B06-00A024406D59}
1142 DEFINE_GUID(IID_IRMARequestContext
, 0x00000217, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
1143 0xa0, 0x24, 0x40, 0x6d, 0x59);
1145 #define INTERFACE IRMARequestContext
1147 #define CLSID_IRMARequestContext IID_IRMARequestContext
1149 DECLARE_INTERFACE_(IRMARequestContext
, IUnknown
)
1155 STDMETHOD(QueryInterface
) (THIS_
1157 void** ppvObj
) PURE
;
1159 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
1161 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
1164 * IRMARequestContext methods
1167 /************************************************************************
1169 * IRMARequestContext::SetUserContext
1171 * Sets the Authenticated users Context.
1173 STDMETHOD(SetUserContext
)
1176 IUnknown
* pIUnknownNewContext
1179 /************************************************************************
1181 * IRMARequestContext::GetUserContext
1183 * Gets the Authenticated users Context.
1185 STDMETHOD(GetUserContext
)
1188 REF(IUnknown
*) pIUnknownCurrentContext
1191 /************************************************************************
1193 * IRMARequestContext::SetRequester
1195 * Sets the Object that made the request.
1197 STDMETHOD(SetRequester
)
1200 IUnknown
* pIUnknownNewRequester
1203 /************************************************************************
1205 * IRMARequestContext::GetRequester
1207 * Gets the Object that made the request.
1209 STDMETHOD(GetRequester
)
1212 REF(IUnknown
*) pIUnknownCurrentRequester
1216 /****************************************************************************
1224 * Object to manage the RFC822 headers sent by the client
1228 * {00000213-0901-11d1-8B06-00A024406D59}
1231 DEFINE_GUID(IID_IRMARequest
, 0x00000213, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
1232 0xa0, 0x24, 0x40, 0x6d, 0x59);
1234 #define INTERFACE IRMARequest
1236 #define CLSID_IRMARequest IID_IRMARequest
1238 DECLARE_INTERFACE_(IRMARequest
, IUnknown
)
1244 STDMETHOD(QueryInterface
) (THIS_
1246 void** ppvObj
) PURE
;
1248 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
1250 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
1253 * IRMARequest methods
1256 /************************************************************************
1258 * IRMARequest::SetRequestHeaders
1260 * Sets the headers that will be sent in the RFC822 header section
1261 * of the request message
1263 STDMETHOD(SetRequestHeaders
) (THIS_
1264 IRMAValues
* pRequestHeaders
) PURE
;
1266 /************************************************************************
1268 * IRMARequest::GetRequestHeaders
1270 * Gets the headers that were sent in the RFC822 header section
1271 * of the request message
1273 STDMETHOD(GetRequestHeaders
) (THIS_
1274 REF(IRMAValues
*) pRequestHeaders
) PURE
;
1276 /************************************************************************
1278 * IRMARequest::SetResponseHeaders
1280 * Sets the headers that will be returned in the RFC822 header
1281 * section of the response message
1283 STDMETHOD(SetResponseHeaders
) (THIS_
1284 IRMAValues
* pResponseHeaders
) PURE
;
1286 /************************************************************************
1288 * IRMARequest::GetResponseHeaders
1290 * Gets the headers that were returned in the RFC822 header section
1291 * of the response message
1293 STDMETHOD(GetResponseHeaders
) (THIS_
1294 REF(IRMAValues
*) pResponseHeaders
) PURE
;
1296 /************************************************************************
1298 * IRMARequest::SetURL
1300 * Sets the fully qualified path associated with a file object.
1301 * Note: On the server, this path does not include the file system
1304 STDMETHOD(SetURL
) (THIS_
1305 const char* pURL
) PURE
;
1307 /************************************************************************
1309 * IRMARequest::GetURL
1311 * Returns the fully qualified path associated with a file object.
1312 * Note: On the server, this path does not include the file system
1315 * Note: The returned pointer's lifetime expires as soon as the
1316 * caller returns from a function which was called from the RMA
1317 * core (i.e. when you return control to the RMA core)
1319 STDMETHOD(GetURL
) (THIS_
1320 REF(const char*) pURL
) PURE
;
1323 /****************************************************************************
1331 * Interface to allow renaming of files. Query off of the File Object.
1332 * Not all filesystem plugins implement this feature.
1334 * IID_IRMAFileRename:
1336 * {00000214-0901-11d1-8B06-00A024406D59}
1339 DEFINE_GUID(IID_IRMAFileRename
, 0x00000214, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
1340 0xa0, 0x24, 0x40, 0x6d, 0x59);
1342 #define INTERFACE IRMAFileRename
1344 DECLARE_INTERFACE_(IRMAFileRename
, IUnknown
)
1350 STDMETHOD(QueryInterface
) (THIS_
1352 void** ppvObj
) PURE
;
1354 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
1356 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
1359 * IRMAFileRename methods
1362 /************************************************************************
1364 * IRMAFileRename::Rename
1366 * Renames a file to a new name.
1368 STDMETHOD(Rename
) (THIS_
1369 const char* pNewFileName
) PURE
;
1372 /****************************************************************************
1380 * Object that exports directory handler API
1382 * IID_IRMADirHandler:
1384 * {00000215-0901-11d1-8B06-00A024406D59}
1387 DEFINE_GUID(IID_IRMADirHandler
, 0x00000215, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
1390 #define INTERFACE IRMADirHandler
1392 DECLARE_INTERFACE_(IRMADirHandler
, IUnknown
)
1397 STDMETHOD(QueryInterface
) (THIS_
1399 void** ppvObj
) PURE
;
1401 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
1403 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
1406 * IRMADirHandler methods
1409 /************************************************************************
1411 * IRMADirHandler::InitDirHandler
1413 * Associates a directory handler with the directory handler
1414 * response, it should notify of operation completness.
1416 STDMETHOD(InitDirHandler
) (THIS_
1417 IRMADirHandlerResponse
* /*IN*/ pDirResponse
) PURE
;
1419 /************************************************************************
1421 * IRMADirHandler::CloseDirHandler
1423 * Closes the directory handler resource and releases all resources
1424 * associated with the object.
1426 STDMETHOD(CloseDirHandler
) (THIS
) PURE
;
1428 /************************************************************************
1430 * IRMADirHandler::MakeDir
1432 * Create the directory
1434 STDMETHOD(MakeDir
) (THIS
) PURE
;
1436 /************************************************************************
1438 * IRMADirHandler::ReadDir
1440 * Get a dump of the directory
1442 STDMETHOD(ReadDir
) (THIS
) PURE
;
1446 /****************************************************************************
1450 * IRMADirHandlerResponse
1454 * Object that exports the directory handler response API
1456 * IID_IRMADirHandlerResponse:
1458 * {00000216-0901-11d1-8B06-00A024406D59}
1461 DEFINE_GUID(IID_IRMADirHandlerResponse
, 0x00000216, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
1464 #define INTERFACE IRMADirHandlerResponse
1466 DECLARE_INTERFACE_(IRMADirHandlerResponse
, IUnknown
)
1471 STDMETHOD(QueryInterface
) (THIS_
1473 void** ppvObj
) PURE
;
1475 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
1477 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
1480 * IRMADirHandlerResponse methods
1483 /************************************************************************
1485 * IRMADirHandlerResponse::InitDirHandlerDone
1487 * Notification interface provided by users of the IRMADirHandler
1488 * interface. This method is called by the IRMADirHandler when the
1489 * initialization of the object is complete.
1491 STDMETHOD(InitDirHandlerDone
) (THIS_
1492 PN_RESULT status
) PURE
;
1494 /************************************************************************
1496 * IRMADirHandlerResponse::CloseDirHandlerDone
1498 * Notification interface provided by users of the IRMADirHandler
1499 * interface. This method is called by the IRMADirHandler when the
1500 * close of the directory is complete.
1502 STDMETHOD(CloseDirHandlerDone
) (THIS_
1503 PN_RESULT status
) PURE
;
1505 /************************************************************************
1507 * IRMADirHandler::MakeDirDone
1509 * Notification interface provided by users of the IRMADirHandler
1510 * interface. This method is called by the IRMADirHandler when the
1511 * attempt to create the directory is complete.
1513 STDMETHOD(MakeDirDone
) (THIS_
1514 PN_RESULT status
) PURE
;
1516 /************************************************************************
1518 * IRMADirHandler::ReadDirDone
1520 * Notification interface provided by users of the IRMADirHandler
1521 * interface. This method is called by the IRMADirHandler when the
1522 * read from the directory is complete and a buffer is available.
1524 STDMETHOD(ReadDirDone
) (THIS_
1526 IRMABuffer
* pBuffer
) PURE
;
1531 /****************************************************************************
1539 * Interface to allow removing of files. Query off of the File Object.
1540 * Not all filesystem plugins implement this feature.
1542 * IID_IRMAFileRemove:
1544 * {0000021A-0901-11d1-8B06-00A024406D59}
1547 DEFINE_GUID(IID_IRMAFileRemove
, 0x0000021A, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
1548 0xa0, 0x24, 0x40, 0x6d, 0x59);
1550 #define INTERFACE IRMAFileRemove
1552 DECLARE_INTERFACE_(IRMAFileRemove
, IUnknown
)
1558 STDMETHOD(QueryInterface
) (THIS_
1560 void** ppvObj
) PURE
;
1562 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
1564 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
1567 * IRMAFileRemove methods
1570 /************************************************************************
1572 * IRMAFileRemove::Remove
1574 * Removes a file from the file system.
1576 STDMETHOD(Remove
) (THIS
) PURE
;
1583 #endif /* _RMAFILES_H_ */