io.qt.purchasing.QInAppProduct Maven / Gradle / Ivy
Show all versions of qtjambi-purchasing Show documentation
package io.qt.purchasing;
import io.qt.*;
/**
* A product registered in the store
* Java wrapper for Qt class QInAppProduct
*/
public abstract class QInAppProduct extends io.qt.core.QObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QInAppProduct.class);
@NativeAccess
private static final class ConcreteWrapper extends QInAppProduct {
@NativeAccess
private ConcreteWrapper(QPrivateConstructor p) { super(p); }
@Override
public void purchase(){
purchase_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void purchase_native(long __this__nativeId);
}
/**
* Java wrapper for Qt enum QInAppProduct::ProductType
*/
@QtUnlistedEnum
public enum ProductType implements QtEnumerator {
/**
* Representing QInAppProduct::Consumable
*/
Consumable(0),
/**
* Representing QInAppProduct::Unlockable
*/
Unlockable(1);
static {
QtJambi_LibraryUtilities.initialize();
}
private ProductType(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull ProductType resolve(int value) {
switch (value) {
case 0: return Consumable;
case 1: return Unlockable;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Overloaded constructor for {@link #QInAppProduct(java.lang.String, java.lang.String, java.lang.String, io.qt.purchasing.QInAppProduct.ProductType, java.lang.String, io.qt.core.QObject)}
* with parent = null
.
*/
protected QInAppProduct(java.lang.@NonNull String price, java.lang.@NonNull String title, java.lang.@NonNull String description, io.qt.purchasing.QInAppProduct.@NonNull ProductType productType, java.lang.@NonNull String identifier) {
this(price, title, description, productType, identifier, (io.qt.core.QObject)null);
}
/**
* See QInAppProduct::QInAppProduct(QString,QString,QString,QInAppProduct::ProductType,QString,QObject*)
*/
protected QInAppProduct(java.lang.@NonNull String price, java.lang.@NonNull String title, java.lang.@NonNull String description, io.qt.purchasing.QInAppProduct.@NonNull ProductType productType, java.lang.@NonNull String identifier, io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, price, title, description, productType, identifier, parent);
}
private native static void initialize_native(QInAppProduct instance, java.lang.String price, java.lang.String title, java.lang.String description, io.qt.purchasing.QInAppProduct.ProductType productType, java.lang.String identifier, io.qt.core.QObject parent);
/**
* Kotlin property getter. In Java use {@link #description()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final java.lang.@NonNull String getDescription() {
return description();
}
/**
* See QInAppProduct::description()const
*/
@QtPropertyReader(name="description")
@QtPropertyConstant
@QtUninvokable
public final java.lang.@NonNull String description(){
return description_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String description_native_constfct(long __this__nativeId);
/**
* Kotlin property getter. In Java use {@link #identifier()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final java.lang.@NonNull String getIdentifier() {
return identifier();
}
/**
* See QInAppProduct::identifier()const
*/
@QtPropertyReader(name="identifier")
@QtPropertyConstant
@QtUninvokable
public final java.lang.@NonNull String identifier(){
return identifier_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String identifier_native_constfct(long __this__nativeId);
/**
* Kotlin property getter. In Java use {@link #price()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final java.lang.@NonNull String getPrice() {
return price();
}
/**
* See QInAppProduct::price()const
*/
@QtPropertyReader(name="price")
@QtPropertyConstant
@QtUninvokable
public final java.lang.@NonNull String price(){
return price_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String price_native_constfct(long __this__nativeId);
/**
* Kotlin property getter. In Java use {@link #productType()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.purchasing.QInAppProduct.@NonNull ProductType getProductType() {
return productType();
}
/**
* See QInAppProduct::productType()const
*/
@QtPropertyReader(name="productType")
@QtPropertyConstant
@QtUninvokable
public final io.qt.purchasing.QInAppProduct.@NonNull ProductType productType(){
return io.qt.purchasing.QInAppProduct.ProductType.resolve(productType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int productType_native_constfct(long __this__nativeId);
/**
* Kotlin property getter. In Java use {@link #title()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final java.lang.@NonNull String getTitle() {
return title();
}
/**
* See QInAppProduct::title()const
*/
@QtPropertyReader(name="title")
@QtPropertyConstant
@QtUninvokable
public final java.lang.@NonNull String title(){
return title_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String title_native_constfct(long __this__nativeId);
/**
*
*/
public abstract void purchase();
private native void purchase_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QInAppProduct(QPrivateConstructor p) { super(p); }
}