Browse Source

Remove "public" from unnecessarily-public classes, methods, and vars

Tim Burks 9 years ago
parent
commit
ffe5ef979e

+ 0 - 1
Packages/QuickProto/Sources/Field.swift

@@ -168,5 +168,4 @@ public class Field {
   public func setBool(_ value:Bool) {
     self.value = value
   }
-
 }

+ 1 - 1
Packages/QuickProto/Sources/FieldDescriptor.swift

@@ -33,7 +33,7 @@
 import Foundation
 
 /// A description of a field in a protocol buffer message
-public class FieldDescriptor {
+class FieldDescriptor {
   var type : FieldType
   var label : FieldLabel
   var name : String = ""

+ 1 - 1
Packages/QuickProto/Sources/FieldLabel.swift

@@ -33,7 +33,7 @@
 import Foundation
 
 /// The "label" of a protocol buffer field
-public enum FieldLabel: Int {
+enum FieldLabel: Int {
   case OPTIONAL      = 1
   case REQUIRED      = 2
   case REPEATED      = 3

+ 4 - 4
Packages/gRPC/Sources/ByteBuffer.swift

@@ -51,14 +51,14 @@ class ByteBuffer {
   /// Initializes a ByteBuffer
   ///
   /// - Parameter string: a string to store in the buffer
-  public init(string: String) {
+  init(string: String) {
     self.b = cgrpc_byte_buffer_create_with_string(string)
   }
 
   /// Initializes a ByteBuffer
   ///
   /// - Parameter data: data to store in the buffer
-  public init(data: Data) {
+  init(data: Data) {
     data.withUnsafeBytes { (bytes) in
       self.b = cgrpc_byte_buffer_create_with_data(bytes, data.count)
     }
@@ -71,7 +71,7 @@ class ByteBuffer {
   /// Gets a string from the contents of the ByteBuffer
   ///
   /// - Returns: a string formed from the ByteBuffer contents
-  public func string() -> String {
+  func string() -> String {
     return String(cString:cgrpc_byte_buffer_as_string(b),
                   encoding:String.Encoding.utf8)!
   }
@@ -79,7 +79,7 @@ class ByteBuffer {
   /// Gets raw data from the contents of the ByteBuffer
   ///
   /// - Returns: data formed from the ByteBuffer contents
-  public func data() -> Data {
+  func data() -> Data {
     var length : Int = 0
     let bytes = cgrpc_byte_buffer_as_data(b, &length)
     return Data(bytes:bytes!, count: length)

+ 1 - 1
Packages/gRPC/Sources/Client.swift

@@ -41,7 +41,7 @@ public class Client {
   var c: UnsafeMutableRawPointer!
 
   /// Completion queue for client call operations
-  public var completionQueue: CompletionQueue
+  private var completionQueue: CompletionQueue
 
   /// Initializes a gRPC client
   ///

+ 1 - 1
Packages/gRPC/Sources/CompletionQueue.swift

@@ -35,7 +35,7 @@
 #endif
 
 /// A gRPC Completion Queue
-public class CompletionQueue {
+class CompletionQueue {
 
   var name : String!
 

+ 1 - 1
Packages/gRPC/Sources/Handler.swift

@@ -41,7 +41,7 @@ public class Handler {
   var h: UnsafeMutableRawPointer!
 
   /// Completion queue for handler response operations
-  public var completionQueue: CompletionQueue
+  var completionQueue: CompletionQueue
 
   /// Metadata received with the request
   public var requestMetadata: Metadata

+ 1 - 0
Packages/gRPC/Sources/Mutex.swift

@@ -35,6 +35,7 @@
 #endif
 
 /// A general-purpose Mutex used to synchronize gRPC operations
+/// but it can be used anywhere
 public class Mutex {
 
   /// Pointer to underlying C representation

+ 1 - 1
Packages/gRPC/Sources/OperationGroup.swift

@@ -50,7 +50,7 @@ class OperationGroup {
   static var nextTag : Int64 = 1
 
   /// Automatically-assigned tag that is used with the completion queue.
-  public var tag : Int64
+  var tag : Int64
 
   /// The call associated with the operation group. Retained while the operations are running.
   var call : Call