corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmke...@apache.org
Subject [67/92] [abbrv] incubator-corinthia git commit: DFAbstractDocument: Getter/setter for HTML doc
Date Wed, 17 Dec 2014 13:29:17 GMT
DFAbstractDocument: Getter/setter for HTML doc


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/3dfc28d6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/3dfc28d6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/3dfc28d6

Branch: refs/heads/stable
Commit: 3dfc28d651eece30092ca458d9ff5e4fc8f863a8
Parents: ef86c30
Author: Peter Kelly <peter@uxproductivity.com>
Authored: Sat Dec 6 12:24:23 2014 +0700
Committer: Peter Kelly <peter@uxproductivity.com>
Committed: Sat Dec 6 12:24:23 2014 +0700

----------------------------------------------------------------------
 DocFormats/api/headers/DocFormats/Operations.h |  3 +++
 DocFormats/api/src/Operations.c                | 11 +++++++++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/3dfc28d6/DocFormats/api/headers/DocFormats/Operations.h
----------------------------------------------------------------------
diff --git a/DocFormats/api/headers/DocFormats/Operations.h b/DocFormats/api/headers/DocFormats/Operations.h
index 192cb80..0cf7cae 100644
--- a/DocFormats/api/headers/DocFormats/Operations.h
+++ b/DocFormats/api/headers/DocFormats/Operations.h
@@ -17,6 +17,7 @@
 
 #include "DFError.h"
 #include "DFPackage.h"
+#include "DFXMLForward.h"
 
 // Abstraction level 2
 
@@ -32,6 +33,8 @@ void DFConcreteDocumentRelease(DFConcreteDocument *concrete);
 DFAbstractDocument *DFAbstractDocumentNew(DFPackage *package);
 DFAbstractDocument *DFAbstractDocumentRetain(DFAbstractDocument *abstract);
 void DFAbstractDocumentRelease(DFAbstractDocument *abstract);
+DFDocument *DFAbstractDocumentGetHTML(DFAbstractDocument *abstract);
+void DFAbstractDocumentSetHTML(DFAbstractDocument *abstract, DFDocument *htmlDoc);
 
 int DFGet(DFConcreteDocument *concrete, DFAbstractDocument *abstract, DFError **error);
 int DFPut(DFConcreteDocument *concrete, DFAbstractDocument *abstract, DFError **error);

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/3dfc28d6/DocFormats/api/src/Operations.c
----------------------------------------------------------------------
diff --git a/DocFormats/api/src/Operations.c b/DocFormats/api/src/Operations.c
index 3b55180..cd4aa12 100644
--- a/DocFormats/api/src/Operations.c
+++ b/DocFormats/api/src/Operations.c
@@ -129,6 +129,17 @@ void DFAbstractDocumentRelease(DFAbstractDocument *abstract)
     free(abstract);
 }
 
+DFDocument *DFAbstractDocumentGetHTML(DFAbstractDocument *abstract)
+{
+    return abstract->htmlDoc;
+}
+
+void DFAbstractDocumentSetHTML(DFAbstractDocument *abstract, DFDocument *htmlDoc)
+{
+    DFDocumentRelease(abstract->htmlDoc);
+    abstract->htmlDoc = DFDocumentRetain(htmlDoc);
+}
+
 int DFGet(DFConcreteDocument *concrete, DFAbstractDocument *abstract, DFError **error)
 {
     if (DFPackageFormat(abstract->package) != DFFileFormatHTML) {


Mime
View raw message