From eb150c52e016088e99c9e684a1975384cb876c69 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Sun, 14 Mar 2010 22:20:39 +0100 Subject: [PATCH] Broadcast helper: Broadcast.createConversationIntent() --- src/org/yaaic/model/Broadcast.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/org/yaaic/model/Broadcast.java b/src/org/yaaic/model/Broadcast.java index e7a3790..6f14ab7 100644 --- a/src/org/yaaic/model/Broadcast.java +++ b/src/org/yaaic/model/Broadcast.java @@ -20,6 +20,8 @@ along with Yaaic. If not, see . */ package org.yaaic.model; +import android.content.Intent; + /** * Constants and helpers for Broadcasts * @@ -38,12 +40,19 @@ public abstract class Broadcast /** * Create an intent for conversation broadcasting - * @param serverId - * @param conversationName + * + * @param broadcastType The type of the broadcast, some constant of Broadcast.* + * @param serverId The id of the server + * @param conversationName The unique name of the conversation * @return */ - public static Intent createConversationIntent(int serverId, String conversationName) + public static Intent createConversationIntent(String broadcastType, int serverId, String conversationName) { + Intent intent = new Intent(broadcastType); + intent.putExtra(Broadcast.EXTRA_SERVER, serverId); + intent.putExtra(Broadcast.EXTRA_CONVERSATION, conversationName); + + return intent; } }