Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add files

  • Loading branch information...
commit 9cdcb928627d568fbf7f4b2676b38ec18585a4bd 1 parent 37b3878
@Zert Zert authored
View
2  .gitignore
@@ -0,0 +1,2 @@
+*~
+*.beam
View
8 ebin/metalkia_xmpp.app
@@ -0,0 +1,8 @@
+{application,metalkia_xmpp,
+ [{description,"Metalkia XMPP interface"},
+ {vsn,"0.1"},
+ {registered,[]},
+ {applications,[kernel,stdlib,exmpp,metalkia_riak]},
+ {mod,{mtxmpp_app,[]}},
+ {env,[]},
+ {modules,[mtxmpp_app,mtxmpp_sup]}]}.
View
20 rebar.config
@@ -0,0 +1,20 @@
+%% -*- mode: Erlang; -*-
+
+{erl_opts, [
+ debug_info,
+ warn_format,
+ %% warn_export_all,
+ warn_export_vars,
+ warn_obsolete_guard,
+ warn_bif_clash
+ %% warn_missing_spec,
+ %% warn_untyped_record
+ ]}.
+
+{sub_dirs, ["rel"]}.
+{lib_dirs, ["../"]}.
+{deps_dir, "../"}.
+
+{deps, [
+ {exmpp, ".*", {git, "git://github.com/Zert/exmpp.git", "rebar"}}
+ ]}.
View
5 src/Makefile
@@ -0,0 +1,5 @@
+all:
+ (cd ../ && rebar compile)
+
+clean:
+ (cd ../ && rebar clean)
View
16 src/metalkia_xmpp.app.src
@@ -0,0 +1,16 @@
+%% -*- mode: Erlang; -*-
+
+{application, metalkia_xmpp,
+ [
+ {description, "Metalkia XMPP interface"},
+ {vsn, "0.1"},
+ {registered, []},
+ {applications, [
+ kernel,
+ stdlib,
+ exmpp,
+ metalkia_riak
+ ]},
+ {mod, { mtxmpp_app, []}},
+ {env, []}
+ ]}.
View
16 src/mtxmpp_app.erl
@@ -0,0 +1,16 @@
+-module(mtxmpp_app).
+
+-behaviour(application).
+
+%% Application callbacks
+-export([start/2, stop/1]).
+
+%% ===================================================================
+%% Application callbacks
+%% ===================================================================
+
+start(_StartType, _StartArgs) ->
+ mtxmpp_sup:start_link().
+
+stop(_State) ->
+ ok.
View
28 src/mtxmpp_sup.erl
@@ -0,0 +1,28 @@
+
+-module(mtxmpp_sup).
+
+-behaviour(supervisor).
+
+%% API
+-export([start_link/0]).
+
+%% Supervisor callbacks
+-export([init/1]).
+
+%% Helper macro for declaring children of supervisor
+-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
+
+%% ===================================================================
+%% API functions
+%% ===================================================================
+
+start_link() ->
+ supervisor:start_link({local, ?MODULE}, ?MODULE, []).
+
+%% ===================================================================
+%% Supervisor callbacks
+%% ===================================================================
+
+init([]) ->
+ {ok, { {one_for_one, 5, 10}, []} }.
+
Please sign in to comment.
Something went wrong with that request. Please try again.