Skip to content
Browse files

Add files

  • Loading branch information...
1 parent 37b3878 commit 9cdcb928627d568fbf7f4b2676b38ec18585a4bd @Zert Zert committed Oct 18, 2011
Showing with 95 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +8 −0 ebin/metalkia_xmpp.app
  3. +20 −0 rebar.config
  4. +5 −0 src/Makefile
  5. +16 −0 src/metalkia_xmpp.app.src
  6. +16 −0 src/mtxmpp_app.erl
  7. +28 −0 src/mtxmpp_sup.erl
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}, []} }.
+

0 comments on commit 9cdcb92

Please sign in to comment.
Something went wrong with that request. Please try again.