summaryrefslogtreecommitdiffstats
path: root/core/ephraim_conv.erl
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2010-06-17 02:23:53 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2010-06-17 02:23:53 +0200
commitca7a0bfa5dd63fc45df0a46800a76d7048e70f2b (patch)
tree9af785b9d1171999b5894251c88146faac1366fe /core/ephraim_conv.erl
parentc3354ad1fd4f843d80ebdd290c8dbaf81919ca38 (diff)
downloadephraim-ca7a0bfa5dd63fc45df0a46800a76d7048e70f2b.tar
ephraim-ca7a0bfa5dd63fc45df0a46800a76d7048e70f2b.zip
Started writing GUI
Diffstat (limited to 'core/ephraim_conv.erl')
-rw-r--r--core/ephraim_conv.erl23
1 files changed, 23 insertions, 0 deletions
diff --git a/core/ephraim_conv.erl b/core/ephraim_conv.erl
new file mode 100644
index 0000000..99c7668
--- /dev/null
+++ b/core/ephraim_conv.erl
@@ -0,0 +1,23 @@
+-module(ephraim_conv).
+-compile([debug_info, export_all]).
+
+-record(conv_state, {
+ jid :: exmpp_jid:jid()
+ }).
+
+-spec init(exmpp_jid:jid()) -> ok.
+init(JID) ->
+ loop(#conv_state{jid=JID}).
+
+-spec loop(#conv_state{}) -> ok.
+loop(State) ->
+ receive
+ stop ->
+ ok;
+ {receive_message, Packet} ->
+ io:format("Received packet from ~p: ~p~n", [State#conv_state.jid, Packet]),
+ loop(State);
+ Msg ->
+ io:format("ephraim_conv (~p): ~p~n", [State#conv_state.jid, Msg]),
+ loop(State)
+ end.