~ubuntu-branches/ubuntu/trusty/digikam/trusty

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/dlnaexport/extra/hupnp_av/src/connectionmanager/habstractconnectionmanager_service.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-11-26 18:24:20 UTC
  • mfrom: (1.9.1) (3.1.23 experimental)
  • Revision ID: package-import@ubuntu.com-20121126182420-qoy6z0nx4ai0wzcl
Tags: 4:3.0.0~beta3-0ubuntu1
* New upstream release
  - Add build-deps :  libhupnp-dev, libqtgstreamer-dev, libmagickcore-dev
* Merge from debian, remaining changes:
  - Make sure libqt4-opengl-dev, libgl1-mesa-dev and libglu1-mesa-dev only
    install on i386,amd64 and powerpc
  - Depend on libtiff-dev instead of libtiff4-dev
  - Drop digikam breaks/replaces kipi-plugins-common since we're past the
    LTS release now
  - digikam to recommend mplayerthumbs | ffmpegthumbs. We currently only
    have latter in the archives, even though former is also supposed to
    be part of kdemultimedia. (LP: #890059)
  - kipi-plugins to recommend www-browser rather than konqueror directly
    since 2.8 no direct usage of konqueror is present in the flickr
    plugin anymore (LP: #1011211)
  - Keep kubuntu_mysqld_executable_name.diff
  - Don't install libkipi translations
  - Keep deps on libcv-dev, libcvaux-dev
  - Keep split packaging of libraries
  - Replace icons from KDE 3 time in debian/xpm.d/*.xpm with the new
    versions (LP: #658047)
* Update debian/not-installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  Copyright (C) 2011 Tuomo Penttinen, all rights reserved.
 
3
 *
 
4
 *  Author: Tuomo Penttinen <tp@herqq.org>
 
5
 *
 
6
 *  This file is part of Herqq UPnP Av (HUPnPAv) library.
 
7
 *
 
8
 *  Herqq UPnP Av is free software: you can redistribute it and/or modify
 
9
 *  it under the terms of the GNU General Public License as published by
 
10
 *  the Free Software Foundation, either version 3 of the License, or
 
11
 *  (at your option) any later version.
 
12
 *
 
13
 *  Herqq UPnP Av is distributed in the hope that it will be useful,
 
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
16
 *  GNU General Public License for more details.
 
17
 *
 
18
 *  You should have received a copy of the GNU General Public License
 
19
 *  along with Herqq UPnP Av. If not, see <http://www.gnu.org/licenses/>.
 
20
 */
 
21
 
 
22
#ifndef HABSTRACTCONNECTIONMANAGER_SERVICE_H_
 
23
#define HABSTRACTCONNECTIONMANAGER_SERVICE_H_
 
24
 
 
25
#include <HUpnpAv/HConnectionManagerInfo>
 
26
#include <HUpnpCore/HServerService>
 
27
 
 
28
namespace Herqq
 
29
{
 
30
 
 
31
namespace Upnp
 
32
{
 
33
 
 
34
namespace Av
 
35
{
 
36
 
 
37
class HAbstractConnectionManagerServicePrivate;
 
38
 
 
39
/*!
 
40
 * \brief This is an abstract base class for implementing the standardized UPnP service type
 
41
 * ConnectionManager:2.
 
42
 *
 
43
 * The main purpose of this class is to marshal UPnP action invocations into
 
44
 * the virtual methods introduced in this class. It is an ideal choice for a
 
45
 * base class when you wish to implement the ConnectionManager service in full.
 
46
 *
 
47
 * For more information, see the
 
48
 * <a href=http://upnp.org/specs/av/UPnP-av-ConnectionManager-v2-Service.pdf>
 
49
 * UPnP ConnectionManager:2 specification</a>.
 
50
 *
 
51
 * \headerfile habstractconnectionmanager_service.h HAbstractConnectionManagerService
 
52
 *
 
53
 * \ingroup hupnp_av_cm
 
54
 *
 
55
 * \remarks This class is not thread-safe.
 
56
 */
 
57
class H_UPNP_AV_EXPORT HAbstractConnectionManagerService :
 
58
    public HServerService
 
59
{
 
60
Q_OBJECT
 
61
H_DECLARE_PRIVATE(HAbstractConnectionManagerService)
 
62
H_DISABLE_COPY(HAbstractConnectionManagerService)
 
63
 
 
64
protected:
 
65
 
 
66
    /*!
 
67
     * \brief Creates a new instance.
 
68
     */
 
69
    HAbstractConnectionManagerService();
 
70
 
 
71
    //
 
72
    // \internal
 
73
    //
 
74
    HAbstractConnectionManagerService(HAbstractConnectionManagerServicePrivate& dd);
 
75
 
 
76
    // Documented in HServerService
 
77
    virtual HActionInvokes createActionInvokes();
 
78
 
 
79
public:
 
80
 
 
81
    /*!
 
82
     * \brief Destroys the instance.
 
83
     */
 
84
    virtual ~HAbstractConnectionManagerService();
 
85
 
 
86
    /*!
 
87
     * \brief Returns the protocol related information this instance supports in its
 
88
     * current state.
 
89
     *
 
90
     * \param result contains the result of the operation.
 
91
     *
 
92
     * \retval Herqq::Upnp::UpnpErrorCode
 
93
     */
 
94
    virtual qint32 getProtocolInfo(HProtocolInfoResult* result) = 0;
 
95
 
 
96
    /*!
 
97
     * \brief Prepares the device for the purpose of sending or receiving data.
 
98
     *
 
99
     * \param remoteProtocolInfo specifies the protocol-related information
 
100
     * that \b must be used to transfer the content.
 
101
     *
 
102
     * \param peerConnectionManager identifies the ConnectionManager service on
 
103
     * the other side of the connection.
 
104
     *
 
105
     * \param peerConnectionId specifies the ID of the connection the peer
 
106
     * ConnectionManager has allocated for this connection. This can be set to
 
107
     * \c -1 if the ID is not known. This is the case if the peer does not
 
108
     * implement this action or prepareForConnection() has not been invoked on
 
109
     * that ConnectionManager yet.
 
110
     *
 
111
     * \param direction specifies the direction to which data will be sent
 
112
     * using the new connection.
 
113
     *
 
114
     * \param result specifies a pointer to HPrepareForConnectionResult that
 
115
     * will contain the result of the action.
 
116
     *
 
117
     * \retval Herqq::Upnp::UpnpErrorCode
 
118
     * \retval HConnectionManagerInfo::ErrorCode
 
119
     *
 
120
     * \remarks This is an optional action, but if it is implemented, you
 
121
     * \b have \b to implement connectionComplete() too. This is mandated by
 
122
     * the ConnectionManager:2 specification.
 
123
     */
 
124
    virtual qint32 prepareForConnection(
 
125
        const HProtocolInfo& remoteProtocolInfo,
 
126
        const HConnectionManagerId& peerConnectionManager,
 
127
        qint32 peerConnectionId,
 
128
        HConnectionManagerInfo::Direction direction,
 
129
        HPrepareForConnectionResult* result);
 
130
 
 
131
    /*!
 
132
     * \brief Informs the device that a previously \e prepared connection is no longer
 
133
     * needed.
 
134
     *
 
135
     * \param connectionId specifies the ID of the connection.
 
136
     *
 
137
     * \retval Herqq::Upnp::UpnpErrorCode
 
138
     * \retval HConnectionManagerInfo::ErrorCode
 
139
     *
 
140
     * \remarks This is an optional action, but if it is implemented, you
 
141
     * \b have \b to implement prepareForConnection() too. This is mandated by
 
142
     * the ConnectionManager:2 specification.
 
143
     */
 
144
    virtual qint32 connectionComplete(qint32 connectionId);
 
145
 
 
146
    /*!
 
147
     * \brief Returns the IDs of currently active connections.
 
148
     *
 
149
     * \param outArg specifies a pointer to a list of connection IDs that represent
 
150
     * the currently active connections.
 
151
     *
 
152
     * \retval Herqq::Upnp::UpnpErrorCode
 
153
     */
 
154
    virtual qint32 getCurrentConnectionIDs(QList<quint32>* outArg) = 0;
 
155
 
 
156
    /*!
 
157
     * \brief Returns information of the specified connection.
 
158
     *
 
159
     * \param connectionId specifies the connection.
 
160
     *
 
161
     * \param outArg specifies a pointer to HConnectionInfo that will contain
 
162
     * information about the specified connection.
 
163
     *
 
164
     * \retval Herqq::Upnp::UpnpErrorCode
 
165
     * \retval HConnectionManagerInfo::ErrorCode
 
166
     */
 
167
    virtual qint32 getCurrentConnectionInfo(
 
168
        qint32 connectionId, HConnectionInfo* outArg) = 0;
 
169
};
 
170
 
 
171
}
 
172
}
 
173
}
 
174
 
 
175
#endif /* HABSTRACTCONNECTIONMANAGER_SERVICE_H_ */