Compare commits

...
9 Commits
17 changed files with 106 additions and 216 deletions
@@ -1,54 +0,0 @@
/*
* Copyright (c) 1995, 1999
* Berkeley Software Design, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
*/
#ifndef _IFADDRS_H_
#define _IFADDRS_H_
struct ifaddrs {
struct ifaddrs *ifa_next;
char *ifa_name;
unsigned int ifa_flags;
struct sockaddr *ifa_addr;
struct sockaddr *ifa_netmask;
struct sockaddr *ifa_dstaddr;
void *ifa_data;
};
/*
* This may have been defined in <net/if.h>. Note that if <net/if.h> is
* to be included it must be included before this header file.
*/
#ifndef ifa_broadaddr
#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
#endif
#include <sys/cdefs.h>
__BEGIN_DECLS
extern int getifaddrs(struct ifaddrs **ifap);
extern void freeifaddrs(struct ifaddrs *ifa);
__END_DECLS
#endif
Binary file not shown.
@@ -1,54 +0,0 @@
/*
* Copyright (c) 1995, 1999
* Berkeley Software Design, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
*/
#ifndef _IFADDRS_H_
#define _IFADDRS_H_
struct ifaddrs {
struct ifaddrs *ifa_next;
char *ifa_name;
unsigned int ifa_flags;
struct sockaddr *ifa_addr;
struct sockaddr *ifa_netmask;
struct sockaddr *ifa_dstaddr;
void *ifa_data;
};
/*
* This may have been defined in <net/if.h>. Note that if <net/if.h> is
* to be included it must be included before this header file.
*/
#ifndef ifa_broadaddr
#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
#endif
#include <sys/cdefs.h>
__BEGIN_DECLS
extern int getifaddrs(struct ifaddrs **ifap);
extern void freeifaddrs(struct ifaddrs *ifa);
__END_DECLS
#endif
Binary file not shown.
@@ -1,54 +0,0 @@
/*
* Copyright (c) 1995, 1999
* Berkeley Software Design, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
*/
#ifndef _IFADDRS_H_
#define _IFADDRS_H_
struct ifaddrs {
struct ifaddrs *ifa_next;
char *ifa_name;
unsigned int ifa_flags;
struct sockaddr *ifa_addr;
struct sockaddr *ifa_netmask;
struct sockaddr *ifa_dstaddr;
void *ifa_data;
};
/*
* This may have been defined in <net/if.h>. Note that if <net/if.h> is
* to be included it must be included before this header file.
*/
#ifndef ifa_broadaddr
#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
#endif
#include <sys/cdefs.h>
__BEGIN_DECLS
extern int getifaddrs(struct ifaddrs **ifap);
extern void freeifaddrs(struct ifaddrs *ifa);
__END_DECLS
#endif
Binary file not shown.
-54
View File
@@ -1,54 +0,0 @@
/*
* Copyright (c) 1995, 1999
* Berkeley Software Design, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
*/
#ifndef _IFADDRS_H_
#define _IFADDRS_H_
struct ifaddrs {
struct ifaddrs *ifa_next;
char *ifa_name;
unsigned int ifa_flags;
struct sockaddr *ifa_addr;
struct sockaddr *ifa_netmask;
struct sockaddr *ifa_dstaddr;
void *ifa_data;
};
/*
* This may have been defined in <net/if.h>. Note that if <net/if.h> is
* to be included it must be included before this header file.
*/
#ifndef ifa_broadaddr
#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
#endif
#include <sys/cdefs.h>
__BEGIN_DECLS
extern int getifaddrs(struct ifaddrs **ifap);
extern void freeifaddrs(struct ifaddrs *ifa);
__END_DECLS
#endif
Binary file not shown.
+22
View File
@@ -0,0 +1,22 @@
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSUInteger, Gender) {
Gender_Unknown,
Gender_Male,
Gender_Female
};
@interface CAAccount : NSObject
+ (void)loginStart;
+ (void)loginSuccess:(NSString*)uid;
+ (void)loginFailed;
+ (void)logout;
+ (void)setAccountType:(NSString*)accountType;
+ (void)setAge:(int)age;
+ (void)setGender:(int)gender;
+ (void)createRole:(NSString*)roleID userName:(NSString*)userName race:(NSString*)race
roleClass:(NSString*)roleClass gameServer:(NSString*)gameServer;
+ (void)setLevel:(int)level;
@end
+14
View File
@@ -0,0 +1,14 @@
#import <Foundation/Foundation.h>
@interface CAAgent : NSObject
+ (void)init:(NSString*)channelID appID:(NSString*)appID appSecret:(NSString*)appSecret;
+ (void)onResume;
+ (void)onPause;
+ (void)onDestroy;
+ (void)enableDebug:(BOOL)enable;
+ (BOOL)isInited;
@end
+9
View File
@@ -0,0 +1,9 @@
#import <Foundation/Foundation.h>
@interface CAEvent : NSObject
+ (void)onEvent:(NSString*)eventName;
+ (void)onEventStart:(NSString*)eventName;
+ (void)onEventEnd:(NSString*)eventName;
@end
+10
View File
@@ -0,0 +1,10 @@
#import <Foundation/Foundation.h>
@interface CAItem : NSObject
+ (void)buy:(NSString*)itemID type:(NSString*)itemType count:(int)itemCount virtualCoin:(int)virtualCoin
virtualType:(NSString*)virtualType consumePoint:(NSString*)consumePoint;
+ (void)get:(NSString*)itemID type:(NSString*)itemType count:(int)itemCount reason:(NSString*)reason;
+ (void)consume:(NSString*)itemID type:(NSString*)itemType count:(int)itemCount reason:(NSString*)reason;
@end
+9
View File
@@ -0,0 +1,9 @@
#import <Foundation/Foundation.h>
@interface CALevels : NSObject
+ (void)begin:(NSString*)level;
+ (void)complete:(NSString*)level;
+ (void)failed:(NSString*)level reason:(NSString*)reason;
@end
+10
View File
@@ -0,0 +1,10 @@
#import <Foundation/Foundation.h>
@interface CAPeiment : NSObject
+ (void)peiBegin:(int)amount orderID:(NSString*)orderID peiType:(NSString*)peiType pppID:(NSString*)pppID currencyType:(NSString*)currencyType;
+ (void)peiSuccess:(int)amount orderID:(NSString*)orderID peiType:(NSString*)peiType pppID:(NSString*)pppID currencyType:(NSString*)currencyType;
+ (void)peiFailed:(int)amount orderID:(NSString*)orderID peiType:(NSString*)peiType pppID:(NSString*)pppID currencyType:(NSString*)currencyType;
+ (void)peiCanceled:(int)amount orderID:(NSString*)orderID peiType:(NSString*)peiType pppID:(NSString*)pppID currencyType:(NSString*)currencyType;
@end
+23
View File
@@ -0,0 +1,23 @@
#import <Foundation/Foundation.h>
@interface CATask : NSObject
@property (readonly) int GuideLine; // 新手任务
@property (readonly) int MainLine; // 主线任务
@property (readonly) int BranchLine; // 分支任务
@property (readonly) int Daily; // 日常任务
@property (readonly) int Activity; // 活动任务
@property (readonly) int Other; // 其他任务,默认值
+ (void)begin:(NSString*)taskID taskType:(int)taskType;
+ (void)complete:(NSString*)taskID;
+ (void)failed:(NSString*)taskID reason:(NSString*)reason;
+ (int)GuideLine;
+ (int)MainLine;
+ (int)BranchLine;
+ (int)Daily;
+ (int)Activity;
+ (int)Other;
@end
+9
View File
@@ -0,0 +1,9 @@
#import <Foundation/Foundation.h>
@interface CAVirtual : NSObject
+ (void)setVirtualNum:(NSString*)type count:(long)count;
+ (void)get:(NSString*)type count:(long)count reason:(NSString*)reason;
+ (void)consume:(NSString*)type count:(long)count reason:(NSString*)reason;
@end
Binary file not shown.