new NXSL error codes for use by StrongHold 4
[public/netxms.git] / src / server / core / mobile.cpp
CommitLineData
f22c4f7c
VK
1/*
2** NetXMS - Network Management System
3** Copyright (C) 2003-2012 Victor Kirhenshtein
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., 675 Mass Ave, Cambridge, MA 02139, USA.
18**
19** File: mobile.cpp
20**
21**/
22
23#include "nxcore.h"
24
25/**
26 * Default constructor
27 */
28MobileDevice::MobileDevice()
29{
30 m_lastReportTime = 0;
31 m_deviceId = NULL;
32 m_vendor = NULL;
33 m_model = NULL;
34 m_serialNumber = NULL;
35 m_osName = NULL;
36 m_osVersion = NULL;
37 m_userId = NULL;
38}
39
40/**
41 * Constructor for creating new mobile device object
42 */
43MobileDevice::MobileDevice(const TCHAR *deviceId)
44{
45 m_lastReportTime = 0;
46 m_deviceId = _tcsdup(deviceId);
47 m_vendor = NULL;
48 m_model = NULL;
49 m_serialNumber = NULL;
50 m_osName = NULL;
51 m_osVersion = NULL;
52 m_userId = NULL;
53}
54
55/**
56 * Destructor
57 */
58MobileDevice::~MobileDevice()
59{
60 safe_free(m_deviceId);
61 safe_free(m_vendor);
62 safe_free(m_model);
63 safe_free(m_serialNumber);
64 safe_free(m_osName);
65 safe_free(m_osVersion);
66 safe_free(m_userId);
67}