address-p.h 1.64 KB
Newer Older
1
/*
2
 * address-p.h
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
 * Copyright (C) 2017  Belledonne Communications SARL
 *
 * 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.
 *
 * 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
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

19 20
#ifndef _ADDRESS_P_H_
#define _ADDRESS_P_H_
21

22 23
#include "address.h"
#include "object/clonable-object-p.h"
24 25 26

// =============================================================================

27 28
struct SalAddress;

29 30
LINPHONE_BEGIN_NAMESPACE

31
class AddressPrivate : public ClonableObjectPrivate {
32
public:
33 34
	inline const SalAddress *getInternalAddress () const {
		return internalAddress;
35 36 37
	}

private:
38
	struct AddressCache {
39 40 41 42 43 44
		mutable std::string scheme;
		mutable std::string displayName;
		mutable std::string username;
		mutable std::string domain;
		mutable std::string methodParam;
		mutable std::string password;
45 46 47 48 49 50 51 52 53 54

		mutable std::unordered_map<std::string, std::string> headers;
		mutable std::unordered_map<std::string, std::string> params;
		mutable std::unordered_map<std::string, std::string> uriParams;
	};

	SalAddress *internalAddress = nullptr;
	AddressCache cache;

	L_DECLARE_PUBLIC(Address);
55 56 57 58
};

LINPHONE_END_NAMESPACE

59
#endif // ifndef _ADDRESS_P_H_