Guest User

Untitled

a guest
Apr 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. /*
  2. * proplist.go
  3. * PropertyLists
  4. *
  5. * Created by Jim Dovey on 17/11/2009.
  6. *
  7. * Copyright (c) 2009 Jim Dovey
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. *
  14. * Redistributions of source code must retain the above copyright notice,
  15. * this list of conditions and the following disclaimer.
  16. *
  17. * Redistributions in binary form must reproduce the above copyright
  18. * notice, this list of conditions and the following disclaimer in the
  19. * documentation and/or other materials provided with the distribution.
  20. *
  21. * Neither the name of the project's author nor the names of its
  22. * contributors may be used to endorse or promote products derived from
  23. * this software without specific prior written permission.
  24. *
  25. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  26. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  27. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  28. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  29. * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  30. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
  31. * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  32. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  33. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  34. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  35. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  36. *
  37. */
  38.  
  39. package proplist
  40.  
  41. import (
  42. "os";
  43. "xml";
  44. "io";
  45. )
  46.  
  47. // A PropertyList can really be anything. Or more specifically, it can be any basic type.
  48. type PropertyList interface {
  49. // nothing needs to go here-- this interface will apply to anything
  50. }
  51.  
  52. type Format const (
  53. Immutable := iota;
  54. MutableContainers;
  55. MutableContainersAndLeaves;
  56. )
  57.  
  58. const (
  59. ReadCorruptError := 3840;
  60. ReadUnknownVersionError := 3841;
  61. ReadStreamError := 3842;
  62. WriteStreamError := 3851;
  63. )
  64.  
  65. func CreateFromData(data []byte, options uint64) (plist PropertyList, format Format, err os.Error)
  66. {
  67. var some_var;
  68. }
  69.  
  70. func CreateFromReader(reader io.Reader, options uint64) (plist PropertyList, format Format, err os.Error)
  71. {
  72. var some_other_var;
  73. }
  74.  
  75. const something := 0
  76. var Something := 0
  77.  
  78. func WriteToStream(plist PropertyList, writer io.Writer, format Format, options uint64) (numWritten uint64, err os.Error)
  79. {
  80. // code
  81. var something, something_else = 2;
  82. }
Add Comment
Please, Sign In to add comment