~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/sasl/doc/src/rel/gs2.1.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20090215164252-dxpjjuq108nz4noa
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-module(gs2).
 
2
-vsn(1).
 
3
-behaviour(gen_server).
 
4
 
 
5
-export([is_operation_ok/1]).
 
6
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, 
 
7
         terminate/2, code_change/3]).
 
8
 
 
9
is_operation_ok(Op) -> 
 
10
    gen_server:call(gs2, {is_operation_ok, Op}).
 
11
 
 
12
init([Data]) ->
 
13
    {ok, []}.
 
14
 
 
15
handle_call({is_operation_ok, Op}, _From, State) ->
 
16
    Data = gs1:get_data(),
 
17
    Reply = lists2:assoc(Op, Data),
 
18
    {reply, Reply, State}.
 
19
 
 
20
handle_cast(_Request, State) ->
 
21
    {noreply, State}.
 
22
 
 
23
handle_info(_Info, State) ->
 
24
    {noreply, State}.
 
25
 
 
26
terminate(_Reason, _State) ->
 
27
    ok.
 
28
 
 
29
code_change(_OldVsn, State, _Extra) ->
 
30
    {ok, State}.
 
31