From 79ded032d213a19587f6e46b2f35d6090df227e1 Mon Sep 17 00:00:00 2001
From: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
Date: Wed, 2 Sep 2015 15:18:09 -0400
Subject: [PATCH] im: clean up header

- remove unused #defines
- forward declare pjsip_inv_session

Issue: #79618
Change-Id: I17c5c140919096511b481914eb5ae5146e4305c0
---
 src/im/instant_messaging.cpp |  5 +++--
 src/im/instant_messaging.h   | 16 +++-------------
 2 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/src/im/instant_messaging.cpp b/src/im/instant_messaging.cpp
index c99a335256..9656b91e87 100644
--- a/src/im/instant_messaging.cpp
+++ b/src/im/instant_messaging.cpp
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2004-2015 Savoir-Faire Linux Inc.
+ *  Copyright (C) 2004-2015 Savoir-faire Linux Inc.
  *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
  *  Author: Emmanuel Lepage <elv1313@gmail.com>
  *  Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
@@ -29,12 +29,13 @@
  *  shall include the source code for the parts of OpenSSL used as well
  *  as that of the covered work.
  */
-
 #include "instant_messaging.h"
+
 #include "logger.h"
 #include "sip/sip_utils.h"
 
 #include <expat.h>
+#include <pjsip_ua.h>
 
 namespace ring {
 
diff --git a/src/im/instant_messaging.h b/src/im/instant_messaging.h
index 151771058e..43b62d7598 100644
--- a/src/im/instant_messaging.h
+++ b/src/im/instant_messaging.h
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2004-2015 Savoir-Faire Linux Inc.
+ *  Copyright (C) 2004-2015 Savoir-faire Linux Inc.
  *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
  *  Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
  *
@@ -29,16 +29,10 @@
  *  as that of the covered work.
  */
 
-#ifndef __INSTANT_MESSAGING_H__
-#define __INSTANT_MESSAGING_H__
+#pragma once
 
 #include <string>
 #include <vector>
-#include <pjsip.h>
-#include <pjlib.h>
-#include <pjsip_ua.h>
-#include <pjlib-util.h>
-
 #include <map>
 #include <list>
 #include <stdexcept>
@@ -49,8 +43,7 @@
 #include <iax/iax-client.h>
 #endif
 
-#define MODE_APPEND std::ios::out || std::ios::app
-#define MODE_TEST std::ios::out
+struct pjsip_inv_session;
 
 namespace ring { namespace InstantMessaging {
 
@@ -66,7 +59,6 @@ namespace ring { namespace InstantMessaging {
 constexpr static unsigned MAXIMUM_MESSAGE_LENGTH = 1800;
 
 constexpr static const char* IM_XML_URI = "uri";
-constexpr static const char* BOUNDARY = "--boundary";
 
 struct InstantMessageException : std::runtime_error
 {
@@ -143,5 +135,3 @@ std::string findMimePayload(const std::string& encodedPayloads,
 std::map< std::string, std::string > parsePayloads(const std::string& encodedPayloads);
 
 }} // namespace ring::InstantMessaging
-
-#endif // __INSTANT_MESSAGING_H_
-- 
GitLab