Vicar release 0.6-1 (a.k.a I'm still here release)
[vicar] / src / vicar-telepathy / src / connection.cpp
index c4dbfb4..c45810d 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
-@version: 0.5
+@version: 0.6
 @author: Sudheer K. <scifi1947 at gmail.com>
 @license: GNU General Public License
 
 @author: Sudheer K. <scifi1947 at gmail.com>
 @license: GNU General Public License
 
@@ -440,6 +440,14 @@ QDBusObjectPath Connection::processChannel(const QVariantMap &request){
                        "VICaR - Invalid request. Phone Number is empty.");
         return channel_path;
     }
                        "VICaR - Invalid request. Phone Number is empty.");
         return channel_path;
     }
+    else if (strNumber == "publish" || strNumber == "subscribe"){
+    //Deny the persistent Mission control requests to publish and subscribe
+        QString strError = "VICaR - Invalid request. " + strNumber + " is not supported.";
+        sendErrorReply("org.freedesktop.Telepathy.Error.InvalidArgument",
+                       strError);
+        return channel_path;
+
+    }
 
     //Only allow requests with handle type as contact
     QVariant vTargetHandleType = request.value("org.freedesktop.Telepathy.Channel.TargetHandleType");
 
     //Only allow requests with handle type as contact
     QVariant vTargetHandleType = request.value("org.freedesktop.Telepathy.Channel.TargetHandleType");
@@ -451,8 +459,10 @@ QDBusObjectPath Connection::processChannel(const QVariantMap &request){
 
         sendErrorReply("org.freedesktop.Telepathy.Error.InvalidArgument",
                        strMessage);
 
         sendErrorReply("org.freedesktop.Telepathy.Error.InvalidArgument",
                        strMessage);
+        return channel_path;
     }
 
     }
 
+
     /*
         Send an error reply to Tp Client (Mission Control) to force it to close the active channel.
         Once it recieves the reply, the client does not bother what we return.
     /*
         Send an error reply to Tp Client (Mission Control) to force it to close the active channel.
         Once it recieves the reply, the client does not bother what we return.