-rw-r--r-- | core/obex/obexserver.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/core/obex/obexserver.h b/core/obex/obexserver.h new file mode 100644 index 0000000..8567105 --- a/dev/null +++ b/core/obex/obexserver.h | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002 Maximilian Reiss <max.reiss@gmx.de> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This library is free software; you can | ||
6 | .> <, > . <= redistribute it and/or modify it under | ||
7 | :=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; version 2 of the License. | ||
10 | ._= =} : | ||
11 | .%+i> _;_. | ||
12 | .i_,=:_. -<s. This library is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=| MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>: PARTICULAR PURPOSE. See the GNU | ||
17 | ..}^=.= = ; Library General Public License for more | ||
18 | ++= -. . .: details. | ||
19 | : = ...= . :.=- | ||
20 | -. .:....=;==+<; You should have received a copy of the GNU | ||
21 | -_. . . )=. = Library General Public License along with | ||
22 | -- :-= this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | ||
24 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
28 | /* | ||
29 | * The OBEX server class declaration | ||
30 | * Based on OBEX server from GPE (thanks, guys) | ||
31 | */ | ||
32 | #ifndef ObexServer_H | ||
33 | #define ObexServer_H | ||
34 | |||
35 | #include <qobject.h> | ||
36 | #include <opie2/oprocess.h> | ||
37 | |||
38 | #include <bluetooth/sdp.h> | ||
39 | #include <bluetooth/sdp_lib.h> | ||
40 | |||
41 | #include <openobex/obex.h> | ||
42 | |||
43 | namespace Opie { | ||
44 | namespace Core { | ||
45 | class OProcess; | ||
46 | namespace Internal { | ||
47 | class OProcessController; | ||
48 | } | ||
49 | } | ||
50 | }; | ||
51 | |||
52 | namespace Opie {namespace Core {class OProcess;}} | ||
53 | namespace OpieObex { | ||
54 | class ObexServer : public Opie::Core::OProcess { | ||
55 | Q_OBJECT | ||
56 | public: | ||
57 | /** | ||
58 | * ObexServer constructor | ||
59 | */ | ||
60 | ObexServer(); | ||
61 | /** | ||
62 | * | ||
63 | */ | ||
64 | ~ObexServer(); | ||
65 | //Function starts the server process | ||
66 | virtual bool start( RunMode runmode = NotifyOnExit, | ||
67 | Communication comm = NoCommunication ); | ||
68 | //Stop the server process | ||
69 | int stop(); | ||
70 | protected: //variables | ||
71 | obex_t* m_obex; //Obex server handler | ||
72 | sdp_session_t* m_session; //SDP session handler; | ||
73 | protected: //functions | ||
74 | //Funtion initializes obex server return 0 on success and -1 on error | ||
75 | int initObex(void); | ||
76 | //Function registers an OBEX push service | ||
77 | sdp_session_t* addOpushSvc(uint8_t chan, const char* name); | ||
78 | signals: | ||
79 | protected slots: | ||
80 | }; | ||
81 | }; | ||
82 | |||
83 | #endif | ||