Imports System.IO
Imports System.Runtime.Serialization
Imports System.ServiceModel
Imports DigitalData.Modules.EDMI.API.Rights

Namespace Messages

#Region "DocumentImport"
    <MessageContract>
    Public Class DocumentImportRequest
        <MessageBodyMember>
        Public Contents() As Byte
        <MessageBodyMember>
        Public ObjectStoreId As Long
        <MessageBodyMember>
        Public FileName As String
        <MessageBodyMember>
        Public DocumentType As String
        <MessageBodyMember>
        Public RetentionDays As Long = 0
    End Class

    <MessageContract>
    Public Class DocumentImportResponse
        <MessageBodyMember>
        Public ObjectId As Long
    End Class
#End Region
#Region "DocumentImportIDBFO"
    <MessageContract>
    Public Class DocumentImportIDBFORequest
        <MessageBodyMember>
        Public Contents() As Byte
        <MessageBodyMember>
        Public pWho As String
        <MessageBodyMember>
        Public pIDBFilePath As String
        <MessageBodyMember>
        Public pIDB_OBJ_ID As Long
        <MessageBodyMember>
        Public pObjectStoreID As Integer
    End Class

    <MessageContract>
    Public Class DocumentImportIDBFOResponse
        <MessageBodyMember>
        Public Result As Boolean
    End Class
#End Region

#Region "DocumentStream"
    <MessageContract>
    Public Class DocumentStreamRequest
        <MessageBodyMember>
        Public ObjectId As Long
    End Class

    <MessageContract>
    Public Class DocumentStreamResponse
        <MessageHeader(MustUnderstand:=True)>
        Public FileName As String

        <MessageBodyMember(Order:=1)>
        Public FileContents As Stream
    End Class
#End Region

#Region "DocumentInfo"
    <MessageContract>
    Public Class DocumentInfoRequest
        <MessageBodyMember>
        Public ObjectId As Long

        <MessageBodyMember>
        Public UserId As Long
    End Class

    <MessageContract>
    Public Class DocumentInfoResponse
        <MessageBodyMember>
        Public FullPath As String

        <MessageBodyMember>
        Public FileRight As AccessRight
    End Class
#End Region

#Region "DocumentList"
    <MessageContract>
    <KnownType(GetType(DBNull))>
    Public Class DocumentListResponse
        <MessageBodyMember>
        Public Datatable As DataTable
    End Class
#End Region

End Namespace



