~ubuntu-branches/ubuntu/wily/freerdp/wily-proposed

« back to all changes in this revision

Viewing changes to include/freerdp/dvc.h

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, Jeremy Bicha, Jean-Louis Dupond, Martin Pitt
  • Date: 2012-01-31 10:02:14 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120131100214-jaok3uwvni7sqxth
Tags: 1.0.0-0git1
Upload current Debian packaging git to get this rolling for precise.

[ Jeremy Bicha ]
* New upstream release. Closes: #647498.
* Updated symbols and bumped soname
* debian/control:
  - Added new build dependencies
  - Bump Standards-Version to 3.9.2
* debian/source/format: Set to 3.0 (quilt)
* debian/rules: Turn on strict symbols checking
* debian/watch: Watch github

[ Jean-Louis Dupond ]
* debian/control: Updated homepage
* debian/copyright: Reflect upstream switch to the Apache license

[ Martin Pitt ]
* debian/libfreerdp0.symbols: Fix version number, should
  be 1.0~beta5, not 1.0-beta5.
* debian/control: Add libavcodec-dev build dependency, upstream build system
  checks for that. Thanks Jean-Louis Dupond!

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
   Copyright (c) 2010 Vic Lee
3
 
 
4
 
   Permission is hereby granted, free of charge, to any person obtaining a
5
 
   copy of this software and associated documentation files (the "Software"),
6
 
   to deal in the Software without restriction, including without limitation
7
 
   the rights to use, copy, modify, merge, publish, distribute, sublicense,
8
 
   and/or sell copies of the Software, and to permit persons to whom the
9
 
   Software is furnished to do so, subject to the following conditions:
10
 
 
11
 
   The above copyright notice and this permission notice shall be included
12
 
   in all copies or substantial portions of the Software.
13
 
 
14
 
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
 
   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
 
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
 
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
 
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19
 
   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20
 
   DEALINGS IN THE SOFTWARE.
21
 
 
22
 
*/
23
 
 
24
 
/*
25
 
   DVC Plugin API: See the original MS DVC Client API:
26
 
   http://msdn.microsoft.com/en-us/library/bb540880%28v=VS.85%29.aspx
27
 
 
28
 
   The FreeRDP DVC Plugin API is a simulation of the MS DVC Client API in C.
29
 
   The main difference is that every interface method must take an instance
30
 
   pointer as the first parameter.
31
 
*/
32
 
 
33
 
/*
34
 
   Implemented by DRDYNVC:
35
 
   o IWTSVirtualChannelManager
36
 
   o IWTSListener
37
 
   o IWTSVirtualChannel
38
 
 
39
 
   Implemented by DVC plugin:
40
 
   o IWTSPlugin
41
 
   o IWTSListenerCallback
42
 
   o IWTSVirtualChannelCallback
43
 
  
44
 
   A basic DVC plugin implementation:
45
 
   1. DVCPluginEntry:
46
 
      The plugin entry point, which creates and initializes a new IWTSPlugin
47
 
      instance
48
 
   2. IWTSPlugin.Initialize:
49
 
      Call IWTSVirtualChannelManager.CreateListener with a newly created
50
 
      IWTSListenerCallback instance
51
 
   3. IWTSListenerCallback.OnNewChannelConnection:
52
 
      Create IWTSVirtualChannelCallback instance if the new channel is accepted
 
1
/**
 
2
 * FreeRDP: A Remote Desktop Protocol client.
 
3
 * Dynamic Virtual Channel Interface
 
4
 *
 
5
 * Copyright 2010-2011 Vic Lee
 
6
 *
 
7
 * Licensed under the Apache License, Version 2.0 (the "License");
 
8
 * you may not use this file except in compliance with the License.
 
9
 * You may obtain a copy of the License at
 
10
 *
 
11
 *     http://www.apache.org/licenses/LICENSE-2.0
 
12
 *
 
13
 * Unless required by applicable law or agreed to in writing, software
 
14
 * distributed under the License is distributed on an "AS IS" BASIS,
 
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
16
 * See the License for the specific language governing permissions and
 
17
 * limitations under the License.
 
18
 */
 
19
 
 
20
/**
 
21
 * DVC Plugin API: See the original MS DVC Client API:
 
22
 * http://msdn.microsoft.com/en-us/library/bb540880%28v=VS.85%29.aspx
 
23
 *
 
24
 * The FreeRDP DVC Plugin API is a simulation of the MS DVC Client API in C.
 
25
 * The main difference is that every interface method must take an instance
 
26
 * pointer as the first parameter.
 
27
 */
 
28
 
 
29
/**
 
30
 * Implemented by DRDYNVC:
 
31
 * o IWTSVirtualChannelManager
 
32
 * o IWTSListener
 
33
 * o IWTSVirtualChannel
 
34
 *
 
35
 * Implemented by DVC plugin:
 
36
 * o IWTSPlugin
 
37
 * o IWTSListenerCallback
 
38
 * o IWTSVirtualChannelCallback
 
39
 *
 
40
 * A basic DVC plugin implementation:
 
41
 * 1. DVCPluginEntry:
 
42
 *    The plugin entry point, which creates and initializes a new IWTSPlugin
 
43
 *    instance
 
44
 * 2. IWTSPlugin.Initialize:
 
45
 *    Call IWTSVirtualChannelManager.CreateListener with a newly created
 
46
 *    IWTSListenerCallback instance
 
47
 * 3. IWTSListenerCallback.OnNewChannelConnection:
 
48
 *    Create IWTSVirtualChannelCallback instance if the new channel is accepted
53
49
 */
54
50
 
55
51
#ifndef __FREERDP_DVC_H
56
52
#define __FREERDP_DVC_H
57
53
 
 
54
#include <freerdp/types.h>
 
55
 
58
56
typedef struct _IWTSVirtualChannelManager IWTSVirtualChannelManager;
59
57
typedef struct _IWTSListener IWTSListener;
60
58
typedef struct _IWTSVirtualChannel IWTSVirtualChannel;
66
64
struct _IWTSListener
67
65
{
68
66
        /* Retrieves the listener-specific configuration. */
69
 
        int (*GetConfiguration) (IWTSListener * pListener,
70
 
                void ** ppPropertyBag);
 
67
        int (*GetConfiguration) (IWTSListener* pListener,
 
68
                void** ppPropertyBag);
71
69
};
72
70
 
73
71
struct _IWTSVirtualChannel
74
72
{
75
73
        /* Starts a write request on the channel. */
76
 
        int (*Write) (IWTSVirtualChannel * pChannel,
 
74
        int (*Write) (IWTSVirtualChannel* pChannel,
77
75
                uint32 cbSize,
78
 
                char * pBuffer,
79
 
                void * pReserved);
 
76
                uint8* pBuffer,
 
77
                void* pReserved);
80
78
        /* Closes the channel. */
81
 
        int (*Close) (IWTSVirtualChannel * pChannel);
 
79
        int (*Close) (IWTSVirtualChannel* pChannel);
82
80
};
83
81
 
84
82
struct _IWTSVirtualChannelManager
85
83
{
86
84
        /* Returns an instance of a listener object that listens on a specific
87
85
           endpoint, or creates a static channel. */
88
 
        int (*CreateListener) (IWTSVirtualChannelManager * pChannelMgr,
89
 
                const char * pszChannelName,
 
86
        int (*CreateListener) (IWTSVirtualChannelManager* pChannelMgr,
 
87
                const char* pszChannelName,
90
88
                uint32 ulFlags,
91
 
                IWTSListenerCallback * pListenerCallback,
92
 
                IWTSListener ** ppListener);
 
89
                IWTSListenerCallback* pListenerCallback,
 
90
                IWTSListener** ppListener);
 
91
        /* Push a virtual channel event.
 
92
           This is a FreeRDP extension to standard MS API. */
 
93
        int (*PushEvent) (IWTSVirtualChannelManager* pChannelMgr,
 
94
                RDP_EVENT* pEvent);
93
95
};
94
96
 
95
97
struct _IWTSPlugin
96
98
{
97
 
        /* Used for the first call that is made from the client to the plug-in. */      
98
 
        int (*Initialize) (IWTSPlugin * pPlugin,
99
 
                IWTSVirtualChannelManager * pChannelMgr);
100
 
        /* Notifies the plug-in that the Remote Desktop Connection (RDC) client 
 
99
        /* Used for the first call that is made from the client to the plug-in. */
 
100
        int (*Initialize) (IWTSPlugin* pPlugin,
 
101
                IWTSVirtualChannelManager* pChannelMgr);
 
102
        /* Notifies the plug-in that the Remote Desktop Connection (RDC) client
101
103
           has successfully connected to the Remote Desktop Session Host (RD
102
104
           Session Host) server. */
103
 
        int (*Connected) (IWTSPlugin * pPlugin);
 
105
        int (*Connected) (IWTSPlugin* pPlugin);
104
106
        /* Notifies the plug-in that the Remote Desktop Connection (RDC) client
105
107
           has disconnected from the RD Session Host server. */
106
 
        int (*Disconnected) (IWTSPlugin * pPlugin,
 
108
        int (*Disconnected) (IWTSPlugin* pPlugin,
107
109
                uint32 dwDisconnectCode);
108
110
        /* Notifies the plug-in that the Remote Desktop Connection (RDC) client
109
111
           has terminated. */
110
 
        int (*Terminated) (IWTSPlugin * pPlugin);
 
112
        int (*Terminated) (IWTSPlugin* pPlugin);
111
113
};
112
114
 
113
115
struct _IWTSListenerCallback
114
116
{
115
117
        /* Accepts or denies a connection request for an incoming connection to
116
118
           the associated listener. */
117
 
        int (*OnNewChannelConnection) (IWTSListenerCallback * pListenerCallback,
118
 
                IWTSVirtualChannel * pChannel,
119
 
                char * Data,
120
 
                int * pbAccept,
121
 
                IWTSVirtualChannelCallback ** ppCallback);
 
119
        int (*OnNewChannelConnection) (IWTSListenerCallback* pListenerCallback,
 
120
                IWTSVirtualChannel* pChannel,
 
121
                uint8* Data,
 
122
                int* pbAccept,
 
123
                IWTSVirtualChannelCallback** ppCallback);
122
124
};
123
125
 
124
126
struct _IWTSVirtualChannelCallback
125
127
{
126
128
        /* Notifies the user about data that is being received. */
127
 
        int (*OnDataReceived) (IWTSVirtualChannelCallback * pChannelCallback,
 
129
        int (*OnDataReceived) (IWTSVirtualChannelCallback* pChannelCallback,
128
130
                uint32 cbSize,
129
 
                char * pBuffer);
 
131
                uint8* pBuffer);
130
132
        /* Notifies the user that the channel has been closed. */
131
 
        int (*OnClose) (IWTSVirtualChannelCallback * pChannelCallback);
 
133
        int (*OnClose) (IWTSVirtualChannelCallback* pChannelCallback);
132
134
};
133
135
 
134
136
/* The DVC Plugin entry points */
135
137
typedef struct _IDRDYNVC_ENTRY_POINTS IDRDYNVC_ENTRY_POINTS;
136
138
struct _IDRDYNVC_ENTRY_POINTS
137
139
{
138
 
        int (*RegisterPlugin) (IDRDYNVC_ENTRY_POINTS * pEntryPoints,
139
 
                IWTSPlugin * pPlugin);
 
140
        int (*RegisterPlugin) (IDRDYNVC_ENTRY_POINTS* pEntryPoints,
 
141
                const char* name, IWTSPlugin* pPlugin);
 
142
        IWTSPlugin* (*GetPlugin) (IDRDYNVC_ENTRY_POINTS* pEntryPoints,
 
143
                const char* name);
 
144
        RDP_PLUGIN_DATA* (*GetPluginData) (IDRDYNVC_ENTRY_POINTS* pEntryPoints);
140
145
};
141
146
 
142
 
typedef int (*PDVC_PLUGIN_ENTRY) (IDRDYNVC_ENTRY_POINTS *);
 
147
typedef int (*PDVC_PLUGIN_ENTRY) (IDRDYNVC_ENTRY_POINTS*);
143
148
 
144
149
#endif
145