call-session-params.h 2.51 KB
Newer Older
1
/*
Simon Morlat's avatar
Simon Morlat committed
2
 * Copyright (c) 2010-2019 Belledonne Communications SARL.
3
 *
Simon Morlat's avatar
Simon Morlat committed
4 5 6 7 8 9
 * This file is part of Liblinphone.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
10 11 12 13 14 15 16
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
Simon Morlat's avatar
Simon Morlat committed
17
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 19
 */

20 21
#ifndef _L_CALL_SESSION_PARAMS_H_
#define _L_CALL_SESSION_PARAMS_H_
22

23 24 25
#include "object/clonable-object.h"

#include "linphone/types.h"
26
#include "content/content.h"
27
#include "c-wrapper/internal/c-sal.h"
28 29
#include "sal/sal.h"

30 31
// =============================================================================

32
LINPHONE_BEGIN_NAMESPACE
33

34
class CallSessionParamsPrivate;
35
class Core;
36

37
class LINPHONE_PUBLIC CallSessionParams : public ClonableObject {
38 39
	friend class CallSession;
	friend class CallSessionPrivate;
40
	friend class ClientGroupChatRoom;
Simon Morlat's avatar
Simon Morlat committed
41
	friend class ToneManager;
42

43 44
public:
	CallSessionParams ();
45
	CallSessionParams (const CallSessionParams &other);
46
	virtual ~CallSessionParams ();
47

48 49 50 51
	CallSessionParams* clone () const override {
		return new CallSessionParams(*this);
	}

52
	CallSessionParams &operator= (const CallSessionParams &other);
53

Simon Morlat's avatar
Simon Morlat committed
54
	virtual void initDefault (const std::shared_ptr<Core> &core, LinphoneCallDir dir);
55

56 57 58 59 60 61 62 63 64 65
	const std::string& getSessionName () const;
	void setSessionName (const std::string &sessionName);

	LinphonePrivacyMask getPrivacy () const;
	void setPrivacy (LinphonePrivacyMask privacy);

	void addCustomHeader (const std::string &headerName, const std::string &headerValue);
	void clearCustomHeaders ();
	const char * getCustomHeader (const std::string &headerName) const;

66 67 68 69
	void addCustomContactParameter (const std::string &paramName, const std::string &paramValue = "");
	void clearCustomContactParameters ();
	std::string getCustomContactParameter (const std::string &paramName) const;

70 71 72
	void addCustomContent (const Content& content);
	const std::list<Content>& getCustomContents () const;

73 74 75 76 77 78 79 80
protected:
	explicit CallSessionParams (CallSessionParamsPrivate &p);

private:
	L_DECLARE_PRIVATE(CallSessionParams);
};

LINPHONE_END_NAMESPACE
81

82
#endif // ifndef _L_CALL_SESSION_PARAMS_H_