public class TypeDetails extends Object implements Parcelable, JSONifiable
Type
class. Instances of this class may be obtained via
the PrinterConnector.getPrinterTypeDetails(Printer)
method. The
fromCursor(Cursor)
method may also be used to read an instance passed via JSON in
Cursor rows from the column PrinterContract.DevicesColumns.TYPE_DETAILS
.Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
JSONifiable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<TypeDetails> |
CREATOR |
static JSONifiable.Creator<TypeDetails> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
TypeDetails(String typeName,
String model,
List<Category> supportedCategories,
int numDotsWidth,
boolean local,
int numCashDrawersSupported,
String imageUrl) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(Object o) |
static TypeDetails |
fromCursor(Cursor cursor)
Searches for a
PrinterContract.DevicesColumns.TYPE_DETAILS column in the given cursor and
extracts a TypeDetails instance from it. |
String |
getImageUrl()
Returns an HTTP URL that points to an image of this printer type.
|
JSONObject |
getJSONObject() |
String |
getModel()
A human readable model name for this printer.
|
int |
getNumCashDrawersSupported()
Deprecated.
Use
CashDrawers.list() to get cash drawer information instead. |
int |
getNumDotsWidth()
If this printer can print bitmaps this is number of dots per that the printer is capable
of printing.
|
List<Category> |
getSupportedCategories()
A list of the categories this printer supports.
|
String |
getTypeName()
A unique string that identifies this type of printer (matches
Type.name() ). |
int |
hashCode() |
boolean |
isLocal()
True if this printer is physically attached in some way as opposed to being connected via
network or other wireless interface.
|
String |
toString() |
void |
writeToParcel(Parcel dest,
int flags) |
public static final Parcelable.Creator<TypeDetails> CREATOR
public static final JSONifiable.Creator<TypeDetails> JSON_CREATOR
public String getTypeName()
Type.name()
).public String getModel()
public List<Category> getSupportedCategories()
public int getNumDotsWidth()
public boolean isLocal()
@Deprecated public int getNumCashDrawersSupported()
CashDrawers.list()
to get cash drawer information instead.public String getImageUrl()
String
, the URL, or null if no URL is available.public static TypeDetails fromCursor(Cursor cursor)
PrinterContract.DevicesColumns.TYPE_DETAILS
column in the given cursor and
extracts a TypeDetails instance from it. Returns null if the column cannot be found.public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable