Bug 983347 - Need different paths for displaying to the screen and sending over the wire, purple part. Correct version. r=florian,clokep
authorArlo Breault <arlolra@gmail.com>
Thu, 11 Sep 2014 12:11:48 -0700
changeset 752 6550fcf407f0b1bd6b9574e93daf9130267f7839
parent 751 ecb887e33c3395414037709cf07c5231e4941808
child 753 adc935024611ea705613bf8bb66b20472515b8a4
push id31
push userclokep@gmail.com
push dateSun, 14 Sep 2014 22:10:44 +0000
reviewersflorian, clokep
bugs983347
Bug 983347 - Need different paths for displaying to the screen and sending over the wire, purple part. Correct version. r=florian,clokep
purplexpcom/src/purpleConvChat.h
purplexpcom/src/purpleConvIM.h
purplexpcom/src/purpleConversation.cpp
--- a/purplexpcom/src/purpleConvChat.h
+++ b/purplexpcom/src/purpleConvChat.h
@@ -55,16 +55,20 @@ public:
     return purpleConversation::Close();
   }
   NS_IMETHOD AddObserver(nsIObserver *aObserver) {
     return purpleConversation::AddObserver(aObserver);
   }
   NS_IMETHOD RemoveObserver(nsIObserver *aObserver) {
     return purpleConversation::RemoveObserver(aObserver);
   }
+  NS_IMETHOD PrepareForSending(imIOutgoingMessage *aMsg, uint32_t *aMsgCount,
+                               char16_t * **aMsgs) {
+    return purpleConversation::PrepareForSending(aMsg, aMsgCount, aMsgs);
+  }
 
   // Keep the SendMsg method here
   NS_IMETHOD SendMsg(const nsACString & aMsg);
 
   purpleConvChat();
 
 private:
   ~purpleConvChat();
--- a/purplexpcom/src/purpleConvIM.h
+++ b/purplexpcom/src/purpleConvIM.h
@@ -50,16 +50,20 @@ public:
     return purpleConversation::Close();
   }
   NS_IMETHOD AddObserver(nsIObserver *aObserver) {
     return purpleConversation::AddObserver(aObserver);
   }
   NS_IMETHOD RemoveObserver(nsIObserver *aObserver) {
     return purpleConversation::RemoveObserver(aObserver);
   }
+  NS_IMETHOD PrepareForSending(imIOutgoingMessage *aMsg, uint32_t *aMsgCount,
+                               char16_t * **aMsgs) {
+    return purpleConversation::PrepareForSending(aMsg, aMsgCount, aMsgs);
+  }
 
   // Keep the SendMsg and SendTyping methods here.
   NS_IMETHOD SendMsg(const nsACString & aMsg);
   NS_IMETHODIMP SendTyping(const nsACString & aString, int32_t *_retval);
 
   purpleConvIM();
 
 private:
--- a/purplexpcom/src/purpleConversation.cpp
+++ b/purplexpcom/src/purpleConversation.cpp
@@ -146,16 +146,28 @@ NS_IMETHODIMP purpleConversation::SetId(
 }
 
 /* void sendMsg (in AUTF8String aMsg); */
 NS_IMETHODIMP purpleConversation::SendMsg(const nsACString& aMsg)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
+/* void prepareForSending (in imIOutgoingMessage aMsg,
+                           [optional] out unsigned long aMsgCount,
+                           [array, size_is (aMsgCount), retval] out wstring aMsgs); */
+NS_IMETHODIMP purpleConversation::PrepareForSending(imIOutgoingMessage *aMsg,
+                                                    uint32_t *aMsgCount,
+                                                    char16_t * **aMsgs)
+{
+  *aMsgCount = 0;
+  *aMsgs = nullptr;
+  return NS_OK;
+}
+
 /* void sendTyping (in unsigned long aLength); */
 NS_IMETHODIMP purpleConversation::SendTyping(const nsACString & aString, int32_t *_retval)
 {
   *_retval = purpleConversation::NO_TYPING_LIMIT;
   return NS_OK;
 }
 
 /* void close (); */