OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
defs:SnepMessage
(Results
1 - 4
of
4
) sorted by null
/packages/apps/Nfc/src/com/android/nfc/snep/
SnepClient.java
105
messenger.sendMessage(
SnepMessage
.getPutRequest(msg));
113
public
SnepMessage
get(NdefMessage msg) throws IOException {
124
messenger.sendMessage(
SnepMessage
.getGetRequest(mAcceptableLength, msg));
SnepMessage.java
27
public final class
SnepMessage
{
53
public static
SnepMessage
getGetRequest(int acceptableLength, NdefMessage ndef) {
54
return new
SnepMessage
(VERSION, REQUEST_GET, 4 + ndef.toByteArray().length,
58
public static
SnepMessage
getPutRequest(NdefMessage ndef) {
59
return new
SnepMessage
(VERSION, REQUEST_PUT, ndef.toByteArray().length, 0, ndef);
62
public static
SnepMessage
getMessage(byte field) {
63
return new
SnepMessage
(VERSION, field, 0, 0, null);
66
public static
SnepMessage
getSuccessResponse(NdefMessage ndef) {
68
return new
SnepMessage
(VERSION, RESPONSE_SUCCESS, 0, 0, null);
70
return new
SnepMessage
(VERSION, RESPONSE_SUCCESS, ndef.toByteArray().length, 0, ndef)
[
all
...]
SnepServer.java
56
public
SnepMessage
doPut(NdefMessage msg);
57
public
SnepMessage
doGet(int acceptableLength, NdefMessage msg);
141
SnepMessage
request;
147
messenger.sendMessage(
SnepMessage
.getMessage(
148
SnepMessage
.RESPONSE_BAD_REQUEST));
155
if (((request.getVersion() & 0xF0) >> 4) !=
SnepMessage
.VERSION_MAJOR) {
156
messenger.sendMessage(
SnepMessage
.getMessage(
157
SnepMessage
.RESPONSE_UNSUPPORTED_VERSION));
158
} else if (request.getField() ==
SnepMessage
.REQUEST_GET) {
161
} else if (request.getField() ==
SnepMessage
.REQUEST_PUT)
[
all
...]
/packages/apps/Nfc/tests/src/com/android/nfc/snep/
SnepBasicTests.java
55
SnepMessage
response = null;
57
client.sendMessage(
SnepMessage
.getGetRequest(ACCEPTABLE_LENGTH, getSmallNdef()));
64
assertEquals(
SnepMessage
.RESPONSE_SUCCESS, response.getField());
86
SnepMessage
response = null;
88
client.sendMessage(
SnepMessage
.getGetRequest(ACCEPTABLE_LENGTH, getNdef(900)));
95
assertEquals(
SnepMessage
.RESPONSE_SUCCESS, response.getField());
117
SnepMessage
response = null;
119
client.sendMessage(
SnepMessage
.getGetRequest(10, getSmallNdef()));
126
assertEquals(
SnepMessage
.RESPONSE_EXCESS_DATA, response.getField());
148
SnepMessage
response = null
[
all
...]
Completed in 508 milliseconds