anchor.diff:      messages:encode_msg(Message).
   
   generate_open_file_message(FileGuid, MsgId) ->
  -    Message = #'ClientMessage'{message_id = MsgId, message_body =
  -    {fuse_request, #'FuseRequest'{fuse_request = {file_request,
  -        #'FileRequest'{context_guid = FileGuid,
  -            file_request = {open_file, #'OpenFile'{flag = 'READ_WRITE'}}}
  -    }}}
  +    generate_open_file_message(FileGuid, 'READ_WRITE', MsgId).
  +
  +generate_open_file_message(FileGuid, Mode, MsgId) ->
  +    Message = #'ClientMessage'{
  +        message_id = MsgId,
  +        message_body = {fuse_request, #'FuseRequest'{
  +            fuse_request = {file_request, #'FileRequest'{
  +                context_guid = FileGuid,
  +                file_request = {open_file, #'OpenFile'{flag = Mode}}}
  +            }
  +        }}
       },
       messages:encode_msg(Message).
   
  
positive.code:     MacaroonAuthMessage = #'ClientMessage'{message_body = {client_handshake_request,
          #'ClientHandshakeRequest'{
              session_id = SessId,
              macaroon = #'Macaroon'{macaroon = ?MACAROON, disch_macaroons = ?DISCH_MACAROONS},
              version = list_to_binary(Version)
          }
      }},
  
negative.code: -author("Michal Stanisz").
  
  -include("fuse_utils.hrl").
  -include("modules/fslogic/fslogic_common.hrl").
  -include("global_definitions.hrl").
  -include("proto/oneclient/message_id.hrl").
  -include("proto/oneclient/common_messages.hrl").
  