forked from microsoft/AdaptiveCards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add parser warnings to the shared model and UWP (microsoft#1222)
* Add parser warnings to the shared model and UWP * Fixed shared model build * Small fixes * Add parser warnings to the shared model and UWP * Fixed shared model build * Small fixes * iOS changes * ios update * ios changes * ios changes * merge * Updating Android/Xamarin with new ParseResult. * Fixing indentation * Responding to code review feedback
- Loading branch information
RebeccaAnne
authored and
Gilles Khouzam
committed
Mar 6, 2018
1 parent
c55ac43
commit 7bd22bd
Showing
40 changed files
with
939 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
372 changes: 354 additions & 18 deletions
372
source/android/adaptivecards/src/main/cpp/objectmodel_wrap.cpp
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...id/adaptivecards/src/main/java/io/adaptivecards/objectmodel/AdaptiveCardParseWarning.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* ---------------------------------------------------------------------------- | ||
* This file was automatically generated by SWIG (http://www.swig.org). | ||
* Version 3.0.12 | ||
* | ||
* Do not make changes to this file unless you know what you are doing--modify | ||
* the SWIG interface file instead. | ||
* ----------------------------------------------------------------------------- */ | ||
|
||
package io.adaptivecards.objectmodel; | ||
|
||
public class AdaptiveCardParseWarning { | ||
private transient long swigCPtr; | ||
private transient boolean swigCMemOwn; | ||
|
||
protected AdaptiveCardParseWarning(long cPtr, boolean cMemoryOwn) { | ||
swigCMemOwn = cMemoryOwn; | ||
swigCPtr = cPtr; | ||
} | ||
|
||
protected static long getCPtr(AdaptiveCardParseWarning obj) { | ||
return (obj == null) ? 0 : obj.swigCPtr; | ||
} | ||
|
||
protected void finalize() { | ||
delete(); | ||
} | ||
|
||
public synchronized void delete() { | ||
if (swigCPtr != 0) { | ||
if (swigCMemOwn) { | ||
swigCMemOwn = false; | ||
AdaptiveCardObjectModelJNI.delete_AdaptiveCardParseWarning(swigCPtr); | ||
} | ||
swigCPtr = 0; | ||
} | ||
} | ||
|
||
public AdaptiveCardParseWarning(WarningStatusCode statusCode, String message) { | ||
this(AdaptiveCardObjectModelJNI.new_AdaptiveCardParseWarning(statusCode.swigValue(), message), true); | ||
} | ||
|
||
public WarningStatusCode GetStatusCode() { | ||
return WarningStatusCode.swigToEnum(AdaptiveCardObjectModelJNI.AdaptiveCardParseWarning_GetStatusCode(swigCPtr, this)); | ||
} | ||
|
||
public String GetReason() { | ||
return AdaptiveCardObjectModelJNI.AdaptiveCardParseWarning_GetReason(swigCPtr, this); | ||
} | ||
|
||
} |
79 changes: 79 additions & 0 deletions
79
...ptivecards/src/main/java/io/adaptivecards/objectmodel/AdaptiveCardParseWarningVector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* ---------------------------------------------------------------------------- | ||
* This file was automatically generated by SWIG (http://www.swig.org). | ||
* Version 3.0.12 | ||
* | ||
* Do not make changes to this file unless you know what you are doing--modify | ||
* the SWIG interface file instead. | ||
* ----------------------------------------------------------------------------- */ | ||
|
||
package io.adaptivecards.objectmodel; | ||
|
||
public class AdaptiveCardParseWarningVector { | ||
private transient long swigCPtr; | ||
protected transient boolean swigCMemOwn; | ||
|
||
protected AdaptiveCardParseWarningVector(long cPtr, boolean cMemoryOwn) { | ||
swigCMemOwn = cMemoryOwn; | ||
swigCPtr = cPtr; | ||
} | ||
|
||
protected static long getCPtr(AdaptiveCardParseWarningVector obj) { | ||
return (obj == null) ? 0 : obj.swigCPtr; | ||
} | ||
|
||
protected void finalize() { | ||
delete(); | ||
} | ||
|
||
public synchronized void delete() { | ||
if (swigCPtr != 0) { | ||
if (swigCMemOwn) { | ||
swigCMemOwn = false; | ||
AdaptiveCardObjectModelJNI.delete_AdaptiveCardParseWarningVector(swigCPtr); | ||
} | ||
swigCPtr = 0; | ||
} | ||
} | ||
|
||
public AdaptiveCardParseWarningVector() { | ||
this(AdaptiveCardObjectModelJNI.new_AdaptiveCardParseWarningVector__SWIG_0(), true); | ||
} | ||
|
||
public AdaptiveCardParseWarningVector(long n) { | ||
this(AdaptiveCardObjectModelJNI.new_AdaptiveCardParseWarningVector__SWIG_1(n), true); | ||
} | ||
|
||
public long size() { | ||
return AdaptiveCardObjectModelJNI.AdaptiveCardParseWarningVector_size(swigCPtr, this); | ||
} | ||
|
||
public long capacity() { | ||
return AdaptiveCardObjectModelJNI.AdaptiveCardParseWarningVector_capacity(swigCPtr, this); | ||
} | ||
|
||
public void reserve(long n) { | ||
AdaptiveCardObjectModelJNI.AdaptiveCardParseWarningVector_reserve(swigCPtr, this, n); | ||
} | ||
|
||
public boolean isEmpty() { | ||
return AdaptiveCardObjectModelJNI.AdaptiveCardParseWarningVector_isEmpty(swigCPtr, this); | ||
} | ||
|
||
public void clear() { | ||
AdaptiveCardObjectModelJNI.AdaptiveCardParseWarningVector_clear(swigCPtr, this); | ||
} | ||
|
||
public void add(AdaptiveCardParseWarning x) { | ||
AdaptiveCardObjectModelJNI.AdaptiveCardParseWarningVector_add(swigCPtr, this, AdaptiveCardParseWarning.getCPtr(x), x); | ||
} | ||
|
||
public AdaptiveCardParseWarning get(int i) { | ||
long cPtr = AdaptiveCardObjectModelJNI.AdaptiveCardParseWarningVector_get(swigCPtr, this, i); | ||
return (cPtr == 0) ? null : new AdaptiveCardParseWarning(cPtr, true); | ||
} | ||
|
||
public void set(int i, AdaptiveCardParseWarning val) { | ||
AdaptiveCardObjectModelJNI.AdaptiveCardParseWarningVector_set(swigCPtr, this, i, AdaptiveCardParseWarning.getCPtr(val), val); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
source/android/adaptivecards/src/main/java/io/adaptivecards/objectmodel/ParseResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* ---------------------------------------------------------------------------- | ||
* This file was automatically generated by SWIG (http://www.swig.org). | ||
* Version 3.0.12 | ||
* | ||
* Do not make changes to this file unless you know what you are doing--modify | ||
* the SWIG interface file instead. | ||
* ----------------------------------------------------------------------------- */ | ||
|
||
package io.adaptivecards.objectmodel; | ||
|
||
public class ParseResult { | ||
private transient long swigCPtr; | ||
private transient boolean swigCMemOwn; | ||
|
||
protected ParseResult(long cPtr, boolean cMemoryOwn) { | ||
swigCMemOwn = cMemoryOwn; | ||
swigCPtr = cPtr; | ||
} | ||
|
||
protected static long getCPtr(ParseResult obj) { | ||
return (obj == null) ? 0 : obj.swigCPtr; | ||
} | ||
|
||
protected void finalize() { | ||
delete(); | ||
} | ||
|
||
public synchronized void delete() { | ||
if (swigCPtr != 0) { | ||
if (swigCMemOwn) { | ||
swigCMemOwn = false; | ||
AdaptiveCardObjectModelJNI.delete_ParseResult(swigCPtr); | ||
} | ||
swigCPtr = 0; | ||
} | ||
} | ||
|
||
public ParseResult(AdaptiveCard adaptiveCard, AdaptiveCardParseWarningVector warnings) { | ||
this(AdaptiveCardObjectModelJNI.new_ParseResult(AdaptiveCard.getCPtr(adaptiveCard), adaptiveCard, AdaptiveCardParseWarningVector.getCPtr(warnings), warnings), true); | ||
} | ||
|
||
public AdaptiveCard GetAdaptiveCard() { | ||
long cPtr = AdaptiveCardObjectModelJNI.ParseResult_GetAdaptiveCard(swigCPtr, this); | ||
return (cPtr == 0) ? null : new AdaptiveCard(cPtr, true); | ||
} | ||
|
||
public AdaptiveCardParseWarningVector GetWarnings() { | ||
return new AdaptiveCardParseWarningVector(AdaptiveCardObjectModelJNI.ParseResult_GetWarnings(swigCPtr, this), true); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.