~vcs-imports/wengophone/trunk

« back to all changes in this revision

Viewing changes to libs/util/shlibloader/include/shlibloader/SharedLibLoader.h

  • Committer: tanguy_k
  • Date: 2006-11-15 14:12:35 UTC
  • Revision ID: vcs-imports@canonical.com-20061115141235-6efc6e38eaa40ca0
* (compilation fix) OWBuild: rename portaudio to PORTAUDIO
* Libutil has only one include path now -> faster compilation
* Remove old directories
* (compilation fix) phapi: ph_msession_stopped() was a macro inside phmedia.h, now it is a standard function. Don't know why but it was not compiling under Windows using CMake

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * WengoPhone, a voice over Internet phone
3
 
 * Copyright (C) 2004-2006  Wengo
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or modify
6
 
 * it under the terms of the GNU General Public License as published by
7
 
 * the Free Software Foundation; either version 2 of the License, or
8
 
 * (at your option) any later version.
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 * GNU General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public License
16
 
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 
 */
19
 
 
20
 
#ifndef OWSHAREDLIBLOADER_H
21
 
#define OWSHAREDLIBLOADER_H
22
 
 
23
 
#include <shlibloader/owshlibloaderdll.h>
24
 
 
25
 
#include <shlibloader/ISharedLibLoader.h>
26
 
 
27
 
/**
28
 
 * Loads shared libraries at runtime.
29
 
 *
30
 
 * The aim is to be multiplatform using different backends.
31
 
 *
32
 
 * @see QLibrary
33
 
 * @author Tanguy Krotoff
34
 
 */
35
 
class SharedLibLoader : public ISharedLibLoader {
36
 
public:
37
 
 
38
 
        OWSHLIBLOADER_API SharedLibLoader(const std::string & fileName);
39
 
 
40
 
        OWSHLIBLOADER_API ~SharedLibLoader();
41
 
 
42
 
        OWSHLIBLOADER_API bool load();
43
 
 
44
 
        OWSHLIBLOADER_API bool unload();
45
 
 
46
 
        OWSHLIBLOADER_API void * resolve(const std::string & symbol);
47
 
 
48
 
        /**
49
 
         * @see ISharedLibLoader::resolve()
50
 
         */
51
 
        OWSHLIBLOADER_API static void * resolve(const std::string & fileName, const std::string & symbol);
52
 
 
53
 
        /**
54
 
         * Gets the system shared library extension.
55
 
         *
56
 
         * Windows: .dll
57
 
         * MacOSX: .dylib
58
 
         * UNIX: .so
59
 
         */
60
 
        OWSHLIBLOADER_API static std::string getSharedLibExtension();
61
 
 
62
 
private:
63
 
 
64
 
        /** Private implementation. */
65
 
        ISharedLibLoader * _loaderPrivate;
66
 
};
67
 
 
68
 
#endif  //OWSHAREDLIBLOADER_H