Blob Blame History Raw
From: Rick Barenthin <rb@terralink.de>
Date: Wed, 17 May 2017 15:27:28 +0200
Subject: [PATCH] apps: fix auto_ptr to unique_ptr


diff --git a/apps/annrecorder/AnnRecorder.h b/apps/annrecorder/AnnRecorder.h
index 9cad5869..5c544ea9 100644
--- a/apps/annrecorder/AnnRecorder.h
+++ b/apps/annrecorder/AnnRecorder.h
@@ -18,8 +18,8 @@
  * 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, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
@@ -64,8 +64,8 @@ class AnnRecorderFactory: public AmSessionFactory
   void getAppParams(const AmSipRequest& req, std::map<string, string>& params);
   AmPromptCollection prompts;
 
-public:  
-  static AmDynInvokeFactory* message_storage_fact; 
+public:
+  static AmDynInvokeFactory* message_storage_fact;
 
   static string AnnouncePath;
   static string DefaultAnnounce;
@@ -88,7 +88,7 @@ class AnnRecorderDialog : public AmSession,
   AmPromptCollection& prompts;
   AmPlaylist playlist;
   // we need only one separator in queue
-  auto_ptr<AmPlaylistSeparator> playlist_separator;
+  unique_ptr<AmPlaylistSeparator> playlist_separator;
 
   AmAudioFile wav_file;
   std::map<string, string> params;
@@ -112,7 +112,7 @@ class AnnRecorderDialog : public AmSession,
   void replayRecording();
   void enqueueSeparator(int id);
 
-  FILE* getCurrentMessage(); 
+  FILE* getCurrentMessage();
   void saveMessage(FILE* fp);
 
 public:
@@ -134,4 +134,3 @@ public:
 // Local Variables:
 // mode:C++
 // End:
-
diff --git a/apps/conference/Conference.h b/apps/conference/Conference.h
index bed0da7d..1c5e40ee 100644
--- a/apps/conference/Conference.h
+++ b/apps/conference/Conference.h
@@ -18,8 +18,8 @@
  * 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, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
@@ -62,7 +62,7 @@ enum { DoConfConnect = 100,
 struct DialoutConfEvent : public AmEvent {
 
   string conf_id;
-    
+
   DialoutConfEvent(int event_id,
 		   const string& conf_id)
     : AmEvent(event_id),
@@ -105,22 +105,22 @@ class ConferenceDialog : public AmSession
 {
   AmPlaylist  play_list;
 
-  auto_ptr<AmAudioFile> LonelyUserFile;
-  auto_ptr<AmAudioFile> JoinSound;
-  auto_ptr<AmAudioFile> DropSound;
-  auto_ptr<AmRingTone>  RingTone;
-  auto_ptr<AmRingTone>  ErrorTone;
+  unique_ptr<AmAudioFile> LonelyUserFile;
+  unique_ptr<AmAudioFile> JoinSound;
+  unique_ptr<AmAudioFile> DropSound;
+  unique_ptr<AmRingTone>  RingTone;
+  unique_ptr<AmRingTone>  ErrorTone;
 
 
   string                        conf_id;
-  auto_ptr<AmConferenceChannel> channel;
+  unique_ptr<AmConferenceChannel> channel;
 
   int                           state;
   string                        dtmf_seq;
   bool                          dialedout;
   string                        dialout_suffix;
   string                        dialout_id;
-  auto_ptr<AmConferenceChannel> dialout_channel;
+  unique_ptr<AmConferenceChannel> dialout_channel;
 
   bool                          allow_dialout;
 
@@ -130,7 +130,7 @@ class ConferenceDialog : public AmSession
 
   bool                          listen_only;
 
-  auto_ptr<AmSipRequest>        transfer_req;
+  unique_ptr<AmSipRequest>        transfer_req;
 
 
   void createDialoutParticipant(const string& uri);
@@ -161,7 +161,7 @@ public:
 
   void onSipRequest(const AmSipRequest& req);
   void onSipReply(const AmSipRequest& req,
-		  const AmSipReply& reply, 
+		  const AmSipReply& reply,
 		  AmBasicSipDialog::Status old_dlg_status);
 
 #ifdef WITH_SAS_TTS
@@ -173,4 +173,3 @@ public:
 // Local Variables:
 // mode:C++
 // End:
-
diff --git a/apps/voicebox/VoiceboxDialog.h b/apps/voicebox/VoiceboxDialog.h
index 726e0319..77c4191d 100644
--- a/apps/voicebox/VoiceboxDialog.h
+++ b/apps/voicebox/VoiceboxDialog.h
@@ -19,7 +19,7 @@ struct Message {
   string name;
   int size;
 
-  int operator<(const Message& b) const 
+  int operator<(const Message& b) const
   { return name < b.name; }
 
   Message() { }
@@ -27,7 +27,7 @@ struct Message {
     : name(n), size(s) { }
 };
 
-class VoiceboxDialog 
+class VoiceboxDialog
   : public AmSession
 {
 public:
@@ -43,7 +43,7 @@ public:
 private:
   AmPlaylist  play_list;
   // we need only one separator in queue
-  auto_ptr<AmPlaylistSeparator> playlist_separator;
+  unique_ptr<AmPlaylistSeparator> playlist_separator;
   AmPromptCollection* prompts;
   PromptOptions prompt_options;
 
@@ -80,11 +80,11 @@ private:
   list<Message> new_msgs;
   list<Message> saved_msgs;
 
-  // list of the messages that come be in the msg list the next round 
-  list<Message> edited_msgs; 
+  // list of the messages that come be in the msg list the next round
+  list<Message> edited_msgs;
 
-  bool userdir_open;       // have we opened the user dir? 
-  bool do_save_cur_msg;    // saving of current message possible? 
+  bool userdir_open;       // have we opened the user dir?
+  bool do_save_cur_msg;    // saving of current message possible?
 
   list<Message>::iterator cur_msg;
   bool in_saved_msgs;
@@ -94,7 +94,7 @@ private:
 public:
   VoiceboxDialog(const string& user,
 		 const string& domain,
-		 const string& pin, 
+		 const string& pin,
 		 AmPromptCollection* prompts,
 		 PromptOptions prompt_options);
   ~VoiceboxDialog();
@@ -110,6 +110,5 @@ public:
 
 
 // Local Variables:
-// mode:C++ // Stroustrup? 
+// mode:C++ // Stroustrup?
 // End:
-
diff --git a/apps/webconference/WebConferenceDialog.h b/apps/webconference/WebConferenceDialog.h
index 69bbfd25..192ef120 100644
--- a/apps/webconference/WebConferenceDialog.h
+++ b/apps/webconference/WebConferenceDialog.h
@@ -21,8 +21,8 @@
  * 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, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
@@ -37,7 +37,7 @@
 
 class WebConferenceFactory;
 
-class WebConferenceDialog 
+class WebConferenceDialog
   : public AmSession,
     public CredentialHolder
 {
@@ -50,7 +50,7 @@ public:
     InConferenceRinging,
     InConferenceEarly,
     PlayErrorFinish
-  }; 
+  };
 
 private:
   AmPlaylist  play_list;
@@ -59,10 +59,10 @@ private:
   AmPromptCollection& prompts;
 
   // our ring tone
-  auto_ptr<AmRingTone> RingTone;
+  unique_ptr<AmRingTone> RingTone;
 
   // our connection to the conference
-  auto_ptr<AmConferenceChannel> channel;
+  unique_ptr<AmConferenceChannel> channel;
   string  conf_id;
   string pin_str;
 
@@ -75,7 +75,7 @@ private:
   WebConferenceState state;
 
   WebConferenceFactory* factory;
-  bool is_dialout; 
+  bool is_dialout;
   UACAuthCred* cred;
 
   bool muted;
@@ -94,16 +94,16 @@ private:
 
 public:
   WebConferenceDialog(AmPromptCollection& prompts,
-		      WebConferenceFactory* my_f, 
+		      WebConferenceFactory* my_f,
 		      UACAuthCred* cred);
   WebConferenceDialog(AmPromptCollection& prompts,
-		      WebConferenceFactory* my_f, 
+		      WebConferenceFactory* my_f,
 		      const string& room);
   ~WebConferenceDialog();
 
   void process(AmEvent* ev);
   void onSipReply(const AmSipRequest& req,
-		  const AmSipReply& reply, 
+		  const AmSipReply& reply,
 		  AmBasicSipDialog::Status old_dlg_status);
 
   void onInvite(const AmSipRequest& req);
@@ -130,4 +130,3 @@ public:
 // Local Variables:
 // mode:C++
 // End:
-