Permalink
Browse files

Add some deadweight in the form of a call-through IRI library.

  • Loading branch information...
jlouis committed Oct 16, 2010
1 parent 2582228 commit 1f7d2c015a4f54fe00b0b7c0c5a50b4938e781d5
Showing with 43 additions and 2 deletions.
  1. +4 −0 ebin/Makefile
  2. +5 −2 ebin/{odata.app → webstuff.app}
  3. +34 −0 src/iri.erl
View
@@ -0,0 +1,4 @@
+.PHONY: all
+
+all:
+ cd .. && $(MAKE)
@@ -1,8 +1,11 @@
-{application,odata,
+%% This is obviously wrong, but we will change it later on
+{application,webstuff,
[{description,[]},
{vsn,"1"},
{registered,[]},
{applications,[kernel,stdlib]},
{mod,{odata_app,[]}},
{env,[]},
- {modules,[odata,odata_app,odata_sup,uri]}]}.
+ {modules,
+ [odata,odata_app,odata_sup,
+ uri,iri]}]}.
View
@@ -0,0 +1,34 @@
+%%%-------------------------------------------------------------------
+%%% File : iri.erl
+%%% Author : Jesper Louis Andersen <jesper.louis.andersen@gmail.com>
+%%% Description : IRI handling code, see RFC http://www.ietf.org/rfc/rfc3987.txt
+%%%
+%%% Created : 14 Oct 2010 by Jesper Louis Andersen <jesper.louis.andersen@gmail.com>
+%%%-------------------------------------------------------------------
+-module(iri).
+
+%% This whole module is one big hack at the moment. It just calls through
+%% to URI
+
+%% API
+-export([mk_iri/2, mk_iri/3, mk_iri/4,
+ to_iolist/1, to_string/1]).
+
+%%====================================================================
+%% API
+%%====================================================================
+mk_iri(S, H) ->
+ uri:mk_uri(S,H,[],none).
+
+mk_iri(S,H,Q) ->
+ uri:mk_uri(S,H,Q,none).
+
+mk_iri(S,H,Q,F) ->
+ uri:mk_uri(S,H,Q,F).
+
+to_iolist(Iri) ->
+ uri:to_iolist(Iri).
+
+to_string(IRI) ->
+ uri:to_string(IRI).
+

0 comments on commit 1f7d2c0

Please sign in to comment.